Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M metaseq
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 95
    • Issues 95
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • metaseq
  • Issues
  • #174
Closed
Open
Issue created Jun 23, 2022 by Administrator@rootOwner

[api] Passing n=None with the openai client breaks the service

Created by: tbmihailov

What

Passing n=None with the openai client breaks the service. This can be fixed by adding the same default values if the params are None. See OpenAI api defaults https://beta.openai.com/docs/api-reference/completions/create

See request and error in the log:

INFO - message='Request to OpenAI API' method=post path=http://52.190.63.124:6011/engines/opt/completions
DEBUG - api_version=None data='{"prompt": "The man drank heavily at the party sothe toilet filled with water.", "max_tokens": 0, "temperature": 0, "logprobs": 1, "echo": true, "stop": null, "n": null}' message='Post details'
DEBUG - http://52.190.63.124:6011/ "POST /engines/opt/completions HTTP/1.1" 500 708
INFO - message='OpenAI API response' path=http://52.190.63.124:6011/engines/opt/completions processing_ms=None response_code=500
INFO - error_code=None error_message="int() argument must be a string, a bytes-like object or a number, not 'NoneType'" error_param=None error_type=oops message='OpenAI API error received' stream_error=False
API error: int() argument must be a string, a bytes-like object or a number, not 'NoneType', retrying
Assignee
Assign to
Time tracking