Skip to content

server: chat completions returns wrong logprobs model #1787

Closed
@domdomegg

Description

@domdomegg

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest code. Development is very rapid so there are no tagged versions as of now.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior

The OpenAI Compatible Server to match the response structure of the OpenAI API for chat completion with logprobs.

This means returning an object with 'content' and 'refusal' keys, each with logprob information.

Reference: https://platform.openai.com/docs/api-reference/chat/object

Current Behavior

The server returns the logprobs format for the legacy completions API, rather that the chat completions API, when calling the chat completions API.

Environment and Context

Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.

  • Physical (or virtual) hardware you are using, e.g. for Linux: Macbook Pro with Apple Silicon chip

$ lscpu

  • Operating System, e.g. for Linux: macOS

$ uname -a

  • SDK version, e.g. for Linux: Python 3.12.6, Make 3.81, clang 1500.3.9.4
$ python3 --version
$ make --version
$ g++ --version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions