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

This commit is contained in:
David Carreto Fidalgo
2025-03-13 06:04:29 +01:00
committed by GitHub
parent 18c27131f5
commit f7f88b706c

View File

@@ -1147,7 +1147,7 @@ def v1_chat_generate_response(
"tool_calls": tool_calls,
"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 ""),
"matched_stop": (
finish_reason["matched"]