diff --git a/packages/core/src/chat.ts b/packages/core/src/chat.ts index f39d7e7ed..9a5fec966 100644 --- a/packages/core/src/chat.ts +++ b/packages/core/src/chat.ts @@ -833,6 +833,14 @@ export function collapseChatMessages(messages: ChatCompletionMessageParam[]) { }) } } + + // remove emty text contents + messages + .filter((m) => m.role === "user") + .forEach((m) => { + if (typeof m.content !== "string") + m.content = m.content.filter((c) => c.type !== "text" || c.text) + }) } export async function executeChatSession( diff --git a/packages/core/src/llms.json b/packages/core/src/llms.json index 278551bd7..61ccebe37 100644 --- a/packages/core/src/llms.json +++ b/packages/core/src/llms.json @@ -45,7 +45,8 @@ "prediction": false, "aliases": { "large": "claude-3-5-sonnet-latest", - "small": "claude-3-5-haiku-latest" + "small": "claude-3-5-haiku-latest", + "vision": "claude-3-5-sonnet-latest" } }, { @@ -85,7 +86,7 @@ "large": "Qwen/Qwen2.5-72B-Instruct", "small": "Qwen/Qwen2.5-Coder-32B-Instruct", "vision": "Qwen/Qwen2-VL-7B-Instruct", - "embeddings": "nomic-ai/nomic-embed-text-v1.5", + "embeddings": "nomic-ai/nomic-embed-text-v1.5:", "reasoning": "Qwen/QwQ-32B-Preview", "reasoning_small": "Qwen/QwQ-32B-Preview" }