-
Notifications
You must be signed in to change notification settings - Fork 246
send parameter in request when args is nil #818
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
base: master
Are you sure you want to change the base?
Conversation
As you can see from the comment in the original code, OpenAI complains if the function takes no arguments but the tool spec contains a So this needs to be tested carefully against all OpenAI compatible APIs. |
@karthink Thank you for the explanation. |
At least, llama-server expect the |
This will not work -- consider the case where you switch your backend from OpenAI to llama.cpp. |
…sending parameters
@karthink I updated the code, the default behavior will be still the same as before, then for some user who knows what they are doing, there is still a way for them to always send parameters when needed. |
@longlene As I mentioned above, a user option is not the solution here. Could you check if the OpenAI API works correctly after your original change? It did not use to, but things might be different now. If it works with Also |
@karthink ok, let me see if I can test it with OpenAI API. |
(list :paramters nil) would cause gptel send |
Yes. In your testing, do |
@karthink Yes, both OpenAI and llama-server can work with paramters: {} and null. I updated pr as null. |
In the log file I uploaded, the value is null. gpt can call |
No description provided.