Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema template --save --schema support #787

Merged
merged 5 commits into from
Feb 27, 2025
Merged

Schema template --save --schema support #787

merged 5 commits into from
Feb 27, 2025

Conversation

simonw
Copy link
Owner

@simonw simonw commented Feb 27, 2025

Refs:

TODO:

  • Consider the thing where llm -t template-with-schema hangs waiting for stdin
  • Tests
  • Documentation

@simonw simonw added enhancement New feature or request schemas labels Feb 27, 2025
@simonw simonw added this to the 0.23 (schemas) milestone Feb 27, 2025
@simonw simonw linked an issue Feb 27, 2025 that may be closed by this pull request
@simonw
Copy link
Owner Author

simonw commented Feb 27, 2025

OK I got this to work:

llm --schema '{                                                      
    "type": "object", 
    "properties": {
        "name": {
            "type": "string"
        },
        "bio": {
            "type": "string"
        }
    }
}' 'invent a cool dog' --save cool-dog

Then:

llm -t cool-dog

@simonw simonw marked this pull request as ready for review February 27, 2025 15:09
@simonw simonw merged commit a084587 into main Feb 27, 2025
32 checks passed
@simonw simonw deleted the schema-templates branch February 27, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request schemas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template support for schemas
1 participant