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

🔨 feat: Use x-strict attribute in OpenAPI Actions for Strict Function Definition #4639

Merged

Conversation

owengo
Copy link
Contributor

@owengo owengo commented Nov 5, 2024

…tants which generates function calls with stric attribute

Pull Request Template

⚠️ Documentation Updates Notice:

  • Kindly note that documentation updates are managed in this repository: librechat.ai

LibreChat-AI/librechat.ai#219

Summary

#4637

By default the assistant actions are function calls not using the new "strict" mode available since structured output is available in gpt-4o.
With this patch we can use the new strict mode for assistants by simply adding a 'x-strict': true flag in the openapi spec of an action.

Change Type

Please delete any irrelevant options.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Testing

The client must have the updated data-provider package.

  1. add 'x-strict': true in the openapi spec of an existing action
  2. go to the https://platform.openai.com/assistants/ ( or refresh the page )
  3. In the functions list click on the ones matching the change and verify
  • "strict": true is present at the same level as "name"
  • "additionalProperties": false is present in the "parameters" object

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • A pull request for updating the documentation has been submitted.

…tants which generates function calls with stric attribute
@danny-avila
Copy link
Owner

danny-avila commented Feb 7, 2025

Thanks, I will pull this down to test this tomorrow

@danny-avila danny-avila changed the title feat: manage an 'x-strict': true attribute in openapi specs for assis… 🔨 feat: Use x-strict attribute in OpenAPI Actions for Strict Function Definition Feb 10, 2025
@danny-avila danny-avila merged commit d844e56 into danny-avila:main Feb 10, 2025
2 checks passed
@rubentalstra rubentalstra mentioned this pull request Feb 11, 2025
7 tasks
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.

3 participants