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

Structured Outputs by supplying strict: true #173

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

ghost
Copy link

@ghost ghost commented Aug 28, 2024

https://platform.openai.com/docs/guides/function-calling

When you enable Structured Outputs by supplying strict: true, the OpenAI API will pre-process your supplied schema on your first request, and then use this artifact to constrain the model to your schema.

@brainlid
Copy link
Owner

brainlid commented Sep 6, 2024

Thanks @cristineguadelupe! I'd seen the change from OpenAI but I'm super happy you added it!

❤️💛💙💜

@brainlid brainlid merged commit 5b392d5 into brainlid:main Sep 6, 2024
brainlid added a commit that referenced this pull request Oct 28, 2024
* 'main' of github.com:brainlid/langchain:
  Add AWS Bedrock support to ChatAnthropic (#154)
  Handle functions with no parameters for Google AI (#183)
  Handle missing token usage fields for Google AI (#184)
  Handle empty text parts from GoogleAI responses (#181)
  Support system instructions for Google AI (#182)
  feat: add OpenAI's new structured output API (#180)
  Support strict mode for tools (#173)
  Do not duplicate tool call parameters if they are identical (#174)
  🐛 cast tool_calls arguments correctly inside message_deltas (#175)
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

Successfully merging this pull request may close these issues.

1 participant