Skip to content

Enhance the expansibility of function call #1032

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

Closed
aRookieMan opened this issue Jul 12, 2024 · 3 comments
Closed

Enhance the expansibility of function call #1032

aRookieMan opened this issue Jul 12, 2024 · 3 comments
Assignees
Labels

Comments

@aRookieMan
Copy link

Spring AI is wonderful, but the form of calling function is not easy to extend. For example, I need to fetch the function calling state and result, send the function name or some thing for user to comfirm. In this case, I have to use my own Function interface, AbstractFunctionCall class and FunctionContext to define, invoke and manager the tool.

Can you make some progress to enhance the expansibility of function call ? plz...

@tzolov tzolov added tool/function calling enhancement New feature or request labels Jul 25, 2024
@tzolov
Copy link
Contributor

tzolov commented Jul 25, 2024

Thank you for the valuable feedback @aRookieMan !

We are considering two (likely exclusive) approaches to handle this:

  1. Optionally, return the message conversation history in the ChatResponse's metadata. E.g. the list of UserMessage, AssistantMessage and TooResponseMessage used in the function call interactions.
  2. After the recent refactoring of our function calling API we will make it possible to disable the automatic/internal function call loops but let the application perform those itself using the plain messages + some provided utility helpers. This is primary targetted for use cases and applications that want to deliberately shortcut some of the function calling steps (on their own risk).

What do you think. Would those help your use cases?

@tzolov
Copy link
Contributor

tzolov commented Sep 23, 2024

@aRookieMan I believe that 5017749 addresses this issue?
Please, check the OpenAiChatModelProxyToolCallsIT.java for examples how to run the function calling entirely on the client side.
Let me know if you have further questions.

@aRookieMan
Copy link
Author

aRookieMan commented Sep 29, 2024

@tzolov Thanks every much, it is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants