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

bug: Completion request returns wrong response #83

Closed
gaocegege opened this issue Jun 20, 2023 · 0 comments · Fixed by #85
Closed

bug: Completion request returns wrong response #83

gaocegege opened this issue Jun 20, 2023 · 0 comments · Fixed by #85

Comments

@gaocegege
Copy link
Member

gaocegege commented Jun 20, 2023

https://platform.openai.com/docs/api-reference/completions/create

It should return:

{
  "id": "cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7",
  "object": "text_completion",
  "created": 1589478378,
  "model": "text-davinci-003",
  "choices": [
    {
      "text": "\n\nThis is indeed a test",
      "index": 0,
      "logprobs": null,
      "finish_reason": "length"
    }
  ],
  "usage": {
    "prompt_tokens": 5,
    "completion_tokens": 7,
    "total_tokens": 12
  }
}

But we get:

{
    "id": "1306c25e-968f-4a02-adcb-5bcfbd19524a",
    "object": "chat",
    "created": "2023-06-20T19:58:12.437203",
    "model": "bigscience/bloomz-560m",
    "usage": {
        "prompt_tokens": 7,
        "completion_tokens": 5,
        "total_tokens": 12
    },
    "choices": [
        {
            "message": {
                "content": " The Dark Knight Rises",
                "role": "assistant",
                "name": ""
            },
            "index": 0,
            "finish_reason": "stop"
        }
    ]
}
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 a pull request may close this issue.

1 participant