Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature-request: automatic truncation with client.chat.completions.create #2435

Closed as not planned
@AlexiaJM

Description

@AlexiaJM

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

  • This is a feature request for the Python library

Describe the feature or improvement you're requesting

I get many "[serving_chat.py:200] ValueError: This model's maximum context length is 32768 tokens. However, you requested 56262 tokens in the messages, Please reduce the length of the messages.".

This is because there is no automatic truncation for client.chat.completions.create, this would be a very useful feature.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions