mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
fix lint
This commit is contained in:
parent
c49b3e7378
commit
d02e852631
1 changed files with 2 additions and 9 deletions
|
|
@ -2,7 +2,6 @@ import json
|
|||
import hashlib
|
||||
import os
|
||||
from typing import TYPE_CHECKING, Any, Dict, Optional, Type
|
||||
|
||||
from pydantic import BaseModel
|
||||
from typing_extensions import override
|
||||
|
||||
|
|
@ -777,18 +776,12 @@ def _extract_chain_output(
|
|||
for field in ("output_text", "result"):
|
||||
text = _coerce_text(response_obj_dict.get(field))
|
||||
if text:
|
||||
mime = (
|
||||
"application/json"
|
||||
if isinstance(response_obj_dict.get(field), (list, dict))
|
||||
else None
|
||||
)
|
||||
mime = "application/json" or None
|
||||
return text, mime
|
||||
|
||||
content = response_obj_dict.get("content")
|
||||
if content:
|
||||
return _coerce_text(content), (
|
||||
"application/json" if isinstance(content, (list, dict)) else None
|
||||
)
|
||||
return _coerce_text(content), ("application/json" or None)
|
||||
|
||||
# 4. Reranker results
|
||||
results = response_obj_dict.get("results")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue