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
  • #643
Closed
Open
Issue created Feb 07, 2023 by Administrator@rootOwner

Implement `finish_reason` in API response

Created by: frankxu2004

🚀 Feature Request

Implement finish_reason as in the OpenAI API specification. Currently it's default to "length".

Motivation

It is useful for saving generation times and generate only until needed. It is especially useful for interactive prompt-based NLP tasks.

Note that the finish_reason field in the response should be under response["choices"][0]["finish_reason"] instead of response["choices"][0]["logprobs"]["finish_reason"] as implemented now in https://github.com/facebookresearch/metaseq/blob/51871bd73cd04c038f239ea2a26db1d7f6b37927/metaseq/service/responses.py#L33

Assignee
Assign to
Time tracking