Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

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

Closed
wants to merge 1 commit into 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.

@angristan
Copy link

I had this issue by trying to use the OpenAI API from Ollama: ollama/ollama#2415

@iBotPeaches
Copy link
Collaborator

oops sorry didn't see this PR!

I believe my PR + test has this resolved - #550

@iBotPeaches iBotPeaches closed this Apr 8, 2025
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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.