Unverified Commit f7f88b70 authored by David Carreto Fidalgo's avatar David Carreto Fidalgo Committed by GitHub
Browse files

HotFix: json serialization error when using OAI v1/batches endpoint with logprobs (#3896)

parent 18c27131
...@@ -1147,7 +1147,7 @@ def v1_chat_generate_response( ...@@ -1147,7 +1147,7 @@ def v1_chat_generate_response(
"tool_calls": tool_calls, "tool_calls": tool_calls,
"reasoning_content": reasoning_text, "reasoning_content": reasoning_text,
}, },
"logprobs": choice_logprobs, "logprobs": choice_logprobs.model_dump() if choice_logprobs else None,
"finish_reason": (finish_reason["type"] if finish_reason else ""), "finish_reason": (finish_reason["type"] if finish_reason else ""),
"matched_stop": ( "matched_stop": (
finish_reason["matched"] finish_reason["matched"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment