-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
feat(Instructor): integrate with SQLModel, provide documentation and example #418
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Something look wrong? You can customize Ellipsis by editing the ellipsis.yaml for this repository.
Generated with ❤️ by ellipsis.dev
How are you liking ... |
Can you move this to examples / cookbooks for now. |
Definitely better than what I'd write myself lol |
|
||
|
||
# Define the model that will serve as a Table for the database | ||
class Hero(SQLModel, instructor.OpenAISchema, table=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to name this OpenAISchema its so long.
Summary:
This PR integrates Instructor with SQLModel, providing documentation and an example on how to define models, generate records using OpenAI, and insert the responses into a database.
Key points:
/docs/concepts/sqlmodel.md
explaining the integration of Instructor with SQLModel.Hero
model in both the documentation and the example.Hero
record using OpenAI in thecreate_hero
function./examples/sqlmodel/run.py
demonstrating the process.Generated with ❤️ by ellipsis.dev