Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: logprobs may not exist on completion response choice #375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sohelzerdoumi
Copy link

What:

  • Bug Fix
  • New Feature

Description:

Some openai server implementation miss logprobs attributes (localai).

curl http://localhost:8000/v1/completions -H "Content-Type: application/json" -d '{
          "model": "custom",
          "prompt": "Calculate 2*2"
}'
{
  "created": 1713099889,
  "object": "text_completion",
  "id": "59fd6975-64ff-4220-8576-9b6e3a6848b5",
  "model": "custom",
  "choices": [
    {
      "index": 0,
      "finish_reason": "stop",
      "text": "2 * 2 = 4"
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 11,
    "total_tokens": 11
  }
}

Related:

@debjit
Copy link

debjit commented Apr 20, 2024

When I was working with other compatible OpenAI APIs, I also discovered this issue. Should have been marked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants