fix: anthropic image error

This commit is contained in:
wxg0103 2025-02-10 14:16:42 +08:00
parent 3e90a9f102
commit 6482e030ee

View File

@ -48,7 +48,7 @@ class AnthropicImageModelCredential(BaseForm, BaseModelCredential):
return False
try:
model = provider.get_model(model_type, model_name, model_credential)
res = model.stream([HumanMessage(content=[{"type": "text", "text": _("Hello")}])])
res = model.stream([HumanMessage(content=[{"type": "text", "text": gettext("Hello")}])])
for chunk in res:
print(chunk)
except Exception as e: