Skip to content

Error 422 for chat completion #1146

@aamirsadiq

Description

@aamirsadiq

Error:
openai.UnprocessableEntityError: Error code: 422 - {'detail': [{'loc': ['body', 'user'], 'msg': 'field required', 'type': 'value_error.missing'}

need to take this user from env and then send it to azure for bridgeIT:

response = client.chat.completions.create(
model="gpt-35-turbo", # model = "deployment_name".
messages=message_with_history,
user=f'{{"appkey": "{app_key}"}}'
)

Need User parameter in the API.
There's no way to pass the parameter.

@[email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions