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

Clarify docs - is there a difference between calling a ChatCompletion with response_model parameter vs. using model.openai_schema and then using a function_call in the ChatCompletion? #127

Closed
ldorigo opened this issue Oct 28, 2023 · 2 comments

Comments

@ldorigo
Copy link

ldorigo commented Oct 28, 2023

https://jxnl.github.io/instructor/#section-2-adding-additional-prompting Both options are shown, it's unclear if both can be used interchangeably? Or can OpenAISchema's only be used with function_call parameters of ChatCompletion s?

@jxnl
Copy link
Owner

jxnl commented Oct 28, 2023

one is a helper and wraps the other,.

with function_call, you have to parse the result yourself. with response_model you're always going to get a response of type respone__model

@ldorigo
Copy link
Author

ldorigo commented Oct 29, 2023

I see. Maybe it's there and I missed it, but might be good to write that in the docs, wasn't clear to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants