mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
fix embedding
This commit is contained in:
parent
7d3d15a324
commit
c48d16d475
1 changed files with 4 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ class OllamaMessageBase:
|
|||
if tpe == "text":
|
||||
return msg["text"], None
|
||||
elif tpe == "image_url":
|
||||
return None, msg["image_url"]["url"][self._image_b64_rms :]
|
||||
return None, msg["image_url"]["url"][self._image_b64_rms:]
|
||||
else:
|
||||
raise ValueError
|
||||
else:
|
||||
|
|
@ -291,3 +291,6 @@ class OllamaEmbeddings(OllamaLLM):
|
|||
|
||||
async def _achat_completion_stream(self, messages: list[dict], timeout: int = USE_CONFIG_TIMEOUT) -> str:
|
||||
return await self._achat_completion(messages, timeout=self.get_timeout(timeout))
|
||||
|
||||
def get_choice_text(self, rsp):
|
||||
return rsp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue