Skip to content
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

Invalid schema for function 'get_current_weather': None is not of type 'object' #432

Closed
mehulgohil opened this issue Jul 10, 2023 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@mehulgohil
Copy link
Contributor

mehulgohil commented Jul 10, 2023

Describe the bug
When calling CreateChatCompletion with function call getting error 400.
ChatCompletion error: error, status code: 400, message: Invalid schema for function 'get_current_weather': None is not of type 'object'

Expected behavior
Expected behaviorwas to return the function call definition

Screenshots/Logs
image

Environment (please complete the following information):

  • go-openai version: [e.g. v1.12.0]
  • Go version: [e.g. 1.18]
  • OpenAI API version: [e.g. v1]
  • OS: [e.g. Ubuntu 20.04]
@mehulgohil mehulgohil added the bug Something isn't working label Jul 10, 2023
@vvatanabe
Copy link
Collaborator

Duplicate #429

@vvatanabe vvatanabe added the duplicate This issue or pull request already exists label Jul 10, 2023
vvatanabe added a commit to vvatanabe/go-openai that referenced this issue Jul 11, 2023
sashabaranov pushed a commit that referenced this issue Jul 11, 2023
…ject' (#429)(#432) (#434)

* fix: invalid schema for function 'func_name': None is not of type 'object' (#429)(#432)

* test: add integration test for function call (#429)(#432)

* style: remove duplicate import (#429)(#432)
@vvatanabe
Copy link
Collaborator

Fixed #434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants