agentai icon indicating copy to clipboard operation
agentai copied to clipboard

json parser + minor function call param change

Open adivik2000 opened this issue 2 years ago • 0 comments

This PR has 3 changes related to function execution with chat.

  1. Added an extra parser from https://github.com/Stevenic/alphawave-py. Some of the function arguments returned by openai weren't being parsed by json.loads(). Hence added this.
  2. Changed the function_call param from True to "auto" as per https://platform.openai.com/docs/api-reference/chat/create#function_call
  3. Commented out argument validator for now as it was failing with (AttributeError: 'function' object has no attribute 'validate'). Anywhere I can read about this, that is not a pydantic decorator?

adivik2000 avatar Sep 12 '23 12:09 adivik2000