-
is there an example how to use function calling ? , I see the FunctionMessage class , but i'm a bit lost on how to use it. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
@MQahawish we are working on providing a generic function calling support. It is still a WIP, but if you are interested, here is the spike branch. The (OpenAI) function calling looks like this: You can, already, use the low-level But this is too involving and breaks the portability. In the spike we’ve mange to generalise the approach and hide the complexity within the ChatClient implementation. Now you can call a functions that are registered as Beans like in OpenAiChatClientToolFunction3IT or dynamically passed through the prompt call: OpenAiChatClientToolFunction4IT. NOTE: This is still a WIP, but hopefully will have something stable soon. Let me know if you have some Function calling experience examples, other models … that I can use to validate the suggested approach. |
Beta Was this translation helpful? Give feedback.
-
For you information the #299 will bring initial function calling support for OpenAI. |
Beta Was this translation helpful? Give feedback.
-
@MQahawish , about
There is a PR that is to close to be merged. It would provide samples and documentation as explained here -> #193 (comment) |
Beta Was this translation helpful? Give feedback.
-
Initial support for Function calling is provided with: ffd8222 |
Beta Was this translation helpful? Give feedback.
Initial support for Function calling is provided with: ffd8222
Follow the related documentation: https://docs.spring.io/spring-ai/reference/api/clients/functions/openai-chat-functions.html
Further improvements, extensions and simplifications will come with next (0.9.0) release.