mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
Bugfix: Vertex AI vision model not support image (#4853)
This commit is contained in:
parent
b234710af9
commit
cdbc260571
|
@ -367,10 +367,8 @@ class VertexAiLargeLanguageModel(LargeLanguageModel):
|
|||
else:
|
||||
metadata, data = c.data.split(',', 1)
|
||||
mime_type = metadata.split(';', 1)[0].split(':')[1]
|
||||
blob = {"inline_data":{"mime_type":mime_type,"data":data}}
|
||||
parts.append(blob)
|
||||
|
||||
glm_content = glm.Content(role="user", parts=[parts])
|
||||
parts.append(glm.Part.from_data(mime_type=mime_type, data=data))
|
||||
glm_content = glm.Content(role="user", parts=parts)
|
||||
return glm_content
|
||||
elif isinstance(message, AssistantPromptMessage):
|
||||
if message.content:
|
||||
|
|
Loading…
Reference in New Issue
Block a user