Replies: 1 comment 5 replies
-
Have you updated |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the documentation it says that: "Anthropic language models can also be used in the streamText, generateObject, streamObject, and streamUI functions (see AI SDK Core and AI SDK RSC)."
until now I've worked only with OpenAI models with the streamUI function and everything worked flawlessly, I want to try anthropic models now, but it looks like the "model" property in the streamUI options can't use the anthropic provider (even though the docs says it does), this is the error: "Type 'AnthropicMessagesLanguageModel' is not assignable to type 'LanguageModelV1'."
const result = await streamUI({
system,
model: anthropic('claude-3-haiku-20240307'),
maxTokens: 1024,
messages: [...history.get()],
text: ({ content, done }) => {...},
tools: {...}
temperature: 0,
});
return {... };
}
what am I missing here?
Beta Was this translation helpful? Give feedback.
All reactions