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

Add support for OpenAI style function call support #1384

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

punitvara
Copy link

User should pass OpenAI style dictionary of function and it should be internally converted to same json schema as callable function

@punitvara punitvara force-pushed the 1376-openaifnsupport branch from fa0efbd to 900db31 Compare January 18, 2025 16:39
User should pass OpenAI style dictionary of function and
it should be internally converted to same json schema as
callable function (dottxt-ai#1376)
@rlouf rlouf force-pushed the 1376-openaifnsupport branch from 900db31 to 26f9f21 Compare February 17, 2025 17:09
@rlouf rlouf marked this pull request as ready for review February 17, 2025 17:10
@rlouf rlouf requested a review from RobinPicard February 17, 2025 17:10
Copy link
Contributor

@RobinPicard RobinPicard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks fine to me, but could you do the following please?

  • Update the type-hinting and docstrings in the function to include it as a possible input type
  • Update the documentation in docs/reference/generation/json.md to specify that this schema_object type is available, explain the necessary dict structure and link to the Openai documentation about it
  • Write a test for this new type in tests/generate/test_generate.py

@punitvara
Copy link
Author

yes sure. @RobinPicard will update PR.

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.

2 participants