mirror of
https://github.com/Hopiu/llm.git
synced 2026-04-01 20:20:31 +00:00
Fix compatibility with llm-anyscale-endpoints, refs #401
This commit is contained in:
parent
9119b03a07
commit
0f8ffbfbbd
1 changed files with 2 additions and 2 deletions
|
|
@ -427,10 +427,10 @@ def combine_chunks(chunks: List) -> dict:
|
|||
|
||||
for item in chunks:
|
||||
for choice in item.choices:
|
||||
if choice.logprobs:
|
||||
if choice.logprobs and hasattr(choice.logprobs, "top_logprobs"):
|
||||
logprobs.append(
|
||||
{
|
||||
"text": choice.text,
|
||||
"text": choice.text if hasattr(choice, "text") else None,
|
||||
"top_logprobs": choice.logprobs.top_logprobs,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue