Skip to content

generate_text_func: support finish_reason=TOKEN_LIMIT #253

Description

@dtrifiro

generate_text_func currently does not correctly return finish_reason=TOKEN_LIMIT when reaching the model token limit:

TOKEN_LIMIT refers to the maximum number of tokens limit defined by the model whereas the MAX_TOKENS refers to the maximum number defined by the user. So one can reach TOKEN_LIMIT before MAX_TOKENS

Originally posted by @gkumbhat in #210 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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