OpenAILanguageModel + SystemLanguageModel tools calling support#49
OpenAILanguageModel + SystemLanguageModel tools calling support#49mattt merged 19 commits intomattt:mainfrom
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.
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 <mattt@me.com>
Co-authored-by: Mattt <mattt@me.com>
|
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