mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
fix: normalize finish reason in CreateResult response (#5085)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
This commit is contained in:
@@ -575,7 +575,7 @@ class BaseOpenAIChatCompletionClient(ChatCompletionClient):
|
||||
for x in choice.logprobs.content
|
||||
]
|
||||
response = CreateResult(
|
||||
finish_reason=finish_reason, # type: ignore
|
||||
finish_reason=normalize_stop_reason(finish_reason),
|
||||
content=content,
|
||||
usage=usage,
|
||||
cached=False,
|
||||
|
||||
Reference in New Issue
Block a user