增加labels文件。

This commit is contained in:
2025-11-07 10:50:55 +08:00
parent 45ed6b905a
commit d1a32dc8a9
2 changed files with 11009 additions and 2 deletions
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -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