We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This new model from google returns multiple text parts in the response. Sample response
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "The user asked a basic arithmetic question. I need to calculate the result of 2 + 2." }, { "text": "Hi there!\n\n2 + 2 = 4\n" } ] }, "finishReason": "STOP", "avgLogprobs": -0.2444594412138968 } ], "usageMetadata": { "promptTokenCount": 8, "candidatesTokenCount": 33, "totalTokenCount": 41 }, "modelVersion": "gemini-2.0-flash-thinking-exp-1219" }
OpenAI schema has only one message per generation
"choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hi there! How can I assist you today?", "refusal": null }, "logprobs": null, "finish_reason": "stop" } ],
Proposed solution:
There's really no 1:1 mapping for this from the schema, but we could merge two content parts.
{ "id": "portkey-9418aa95-4c0d-4cad-a924-ddcd4e9489a6", "object": "chat_completion", "created": 1735213212, "model": "Unknown", "provider": "vertex-ai", "choices": [ { "message": { "role": "assistant", "content": "\nThe user asked a basic arithmetic question. I need to calculate the result of 2 + 2.\nHi there!\n\n2 + 2 = 4\n" }, "index": 0, "finish_reason": "STOP" } ], "usage": { "prompt_tokens": 8, "completion_tokens": 33, "total_tokens": 41 } }
No response
The text was updated successfully, but these errors were encountered:
(Google-style) { "candidates": [ { "content": { "role": "model", "parts": [ { "text": "The user asked a basic arithmetic question. I need to calculate the result of 2 + 2." }, { "text": "Hi there!\n\n2 + 2 = 4\n" } ] }, "finishReason": "STOP", "avgLogprobs": -0.2444594412138968 } ], "usageMetadata": { "promptTokenCount": 8, "candidatesTokenCount": 33, "totalTokenCount": 41 }, "modelVersion": "gemini-2.0-flash-thinking-exp-1219" } (OpenAI-style) { "id": "portkey-9418aa95-4c0d-4cad-a924-ddcd4e9489a6", "object": "chat_completion", "created": 1735213212, "model": "Unknown", "provider": "vertex-ai", "choices": [ { "message": { "role": "assistant", "content": "The user asked a basic arithmetic question. I need to calculate the result of 2 + 2.\nHi there!\n\n2 + 2 = 4\n" }, "index": 0, "finish_reason": "STOP" } ], "usage": { "prompt_tokens": 8, "completion_tokens": 33, "total_tokens": 41 } }
Sorry, something went wrong.
No branches or pull requests
What Would You Like to See with the Gateway?
This new model from google returns multiple text parts in the response. Sample response
OpenAI schema has only one message per generation
Proposed solution:
There's really no 1:1 mapping for this from the schema, but we could merge two content parts.
Context for your Request
No response
Your Twitter/LinkedIn
No response
The text was updated successfully, but these errors were encountered: