-
Notifications
You must be signed in to change notification settings - Fork 42
OpenAILanguageModel + SystemLanguageModel tools calling support #49
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
Conversation
…converted DynamicGenerationSchema Property
… call message to the messages list Tested with opencode.ai/zen/v1 (Chat and Responses) and generativelanguage.googleapis.com/v1beta/openai (Chat only)
|
(branch updated) |
|
@airy10 Thanks for your work on this. Taking a look now. |
|
I've not been able to test it with official Open AI server as I don't have any credit there. But it seems fine with OpenCode/Zen and Google servers. And my free credits on HuggingFace are gone too... I've checked the response content of the withTools test + tested using some modified version of your HuggingFace app and my GEDCOM MCP server and my MCP->FoundationModels bridge. |
mattt
left a comment
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.
This is looking good! I think we can simplify a lot of the conversion logic by leaning more on JSONSchema. Lemme know if you'd like me to take a stab at that.
Co-authored-by: Mattt <[email protected]>
Co-authored-by: Mattt <[email protected]>
|
I've pushed my changes to use JSONSchema to build the FoundationModels dynamic schema |
Invalid type for 'input[2].output': expected one of a string or array of objects, but got an object instead.
|
@airy10 Thanks again for your work on this! I just fixed an issue with OpenAI tool calling, did some refactoring and added test coverage for dynamic schema generation. This is looking solid. |
This is implementing tools calling support for OpenAI (by implementing the "tools calling + sending back results" loop, and for the Apple Models (by implementing a FoundationsModel Tool to bridge the the AnyLanguageModel one). This also has a fix in the DynamicGenerationSchema -> GenerationSchema conversion where properties descriptions were lost
This is fixing #40 and #43