You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I use the OpenAI Python SDK with the
llama-serverendpoint, I couldn't get theresponse_formatto work!$ uv run llm.py ... openai.InternalServerError: Error code: 500 - {'error': {'code': 500, 'message': 'Failed to parse input at pos 610: <|start|>assistant<|channel|>final<|message|>**Event Information**\n\n- **Event**: Science Fair \n- **Date**: Friday \n- **Participants**: Alice, Bob', 'type': 'server_error'}}I found some issues related to this problem and it seem like they all fixed but I don't really know why it's not working
Also I intercepted the payload send by the SDK
{ "messages": [ { "role": "system", "content": "Extract the event information." }, { "role": "user", "content": "Alice and Bob are going to a science fair on Friday." } ], "model": "gpt-oss-20b", "response_format": { "type": "json_schema", "json_schema": { "schema": { "properties": { "name": { "title": "Name", "type": "string" }, "date": { "title": "Date", "type": "string" }, "participants": { "items": { "type": "string" }, "title": "Participants", "type": "array" } }, "required": [ "name", "date", "participants" ], "title": "CalendarEvent", "type": "object", "additionalProperties": false }, "name": "CalendarEvent", "strict": true } }, "stream": false }Some issue mentioning the fix is to use
json_objectrather thanjson_schemabut I tried using curl with that and got no luck.Beta Was this translation helpful? Give feedback.
All reactions