增加labels文件。
This commit is contained in:
@@ -95,8 +95,10 @@ def chat_vision(
|
||||
if not text:
|
||||
# Some servers might put text in 'choices[0].text' (rare for chat) – try fallback
|
||||
text = choice0.get("text") or ""
|
||||
_preview = (text[:120]).replace("\n", " ")
|
||||
print(f"[Ollama] Text length={len(text)} preview={_preview}...")
|
||||
# _preview = (text[:120]).replace("\n", " ")
|
||||
result = text.replace("\n", " ")
|
||||
# print(f"[Ollama] Text length={len(text)} preview={_preview}...")
|
||||
print(f"[Ollama] Text length={len(text)} preview={result}")
|
||||
if not text:
|
||||
raise RuntimeError("Empty content in choices[0].message.content")
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user