We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AI sdk is not using the bedrock library underneath, not fetch, so the abort signal is not forwarded
import { streamText } from "ai"; import { anthropic } from "@ai-sdk/anthropic"; import { bedrock } from "@ai-sdk/amazon-bedrock"; const main = async () => { const abortController = new AbortController(); const signal = abortController.signal; setTimeout(() => { abortController.abort(); }, 2000); try { const { textStream } = await streamText({ // model: anthropic("claude-3-5-sonnet-20240620"), model: bedrock("anthropic.claude-3-5-sonnet-20240620-v1:0"), messages: [ { role: "user", content: "write a long poem", }, ], abortSignal: signal, }); for await (const message of textStream) { console.log(message); } } catch (e) { console.log("got error", e); } }; main();
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
AI sdk is not using the bedrock library underneath, not fetch, so the abort signal is not forwarded
Code example
Additional context
No response
The text was updated successfully, but these errors were encountered: