mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-23 16:37:28 +00:00
quick fix
This commit is contained in:
parent
f02fda0bd7
commit
edd57785a1
3 changed files with 55 additions and 10 deletions
|
@ -111,7 +111,8 @@ async def stream_and_store_openai_completion(
|
|||
final_logprobs = OpenAIChoiceLogprobs(content=logprobs_content) if logprobs_content else None
|
||||
|
||||
# Ensure finish_reason is a string as required by OpenAIChoice
|
||||
finish_reason = choice_data["finish_reason"] or "unknown"
|
||||
# Using explicit None check to guarantee a string value
|
||||
finish_reason = choice_data["finish_reason"] if choice_data["finish_reason"] is not None else "unknown"
|
||||
assembled_choices.append(
|
||||
OpenAIChoice(
|
||||
finish_reason=finish_reason,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue