newtw2
This commit is contained in:
@@ -164,7 +164,9 @@ class ImageAnalyzerService:
|
||||
timeout=30
|
||||
)
|
||||
|
||||
content = response.choices[0].message.content
|
||||
if not response.choices:
|
||||
return self._fallback(image_url, "API 返回空 choices")
|
||||
content = response.choices[0].message.content or ""
|
||||
elapsed = time.monotonic() - start
|
||||
|
||||
result = self._parse_result(image_url, content)
|
||||
|
||||
Reference in New Issue
Block a user