Stevenic / alphawave

AlphaWave is a very opinionated client for interfacing with Large Language Models.
MIT License
98 stars 9 forks source link

Functions without parameters #11

Closed rmolinamir closed 11 months ago

rmolinamir commented 1 year ago

Hi @Stevenic 👋

Piggybacking from #10, I ran into a few issues while working with the function calling API, it happened when declaring functions without parameters.

I was getting a 400 error when using functions with no parameters, I think this was originating client-side though.

I later found that if I declared parameters as an empty object it would basically enter a feedback loop inside the JSON response validator of the function, such as:

Hello, how can I help you?
User: show all items
REPAIRING RESPONSE:
null
feedback: "No arguments were sent with function call. Call the "getAll" with required arguments as a valid JSON object."
feedback: "No arguments were sent with function call. Call the "getAll" with required arguments as a valid JSON object."
feedback: "No arguments were sent with function call. Call the "getAll" with required arguments as a valid JSON object."
Response Repair Failed

Let me know if you'd like me to open a PR with a fix for this issue 😃

Stevenic commented 1 year ago

A PR would be great. I can publish a 0.6.2 update. I honestly hadn’t tested that so great catch

rmolinamir commented 1 year ago

Sounds good! I'll work on it later today or tomorrow, will open a PR once I get it working.

Stevenic commented 1 year ago

Can't wait!

Stevenic commented 11 months ago

Fixed by PR