agentai
agentai copied to clipboard
json parser + minor function call param change
This PR has 3 changes related to function execution with chat.
- 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.
- Changed the function_call param from True to "auto" as per https://platform.openai.com/docs/api-reference/chat/create#function_call
- 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?