Comments (6)
Yeah just like to agree here -- tried both npm and pnpm, various different ways of building, same error as show above. I will manually clone, change the version, and see if that works -- seems like an easy enough fix
Update: yes, changing to 2.1.0 does in fact allow it to build and start the server on localhost (pnpm install => pnpm dev) ... BUT there are some issues with the class StreamingTextResponse, which could be a module versioning problem -- seems like this build may actually be dependent on the release of 2.1.1? see tracebacks below, I didn't change anything else about the build other than the version of the ai module (and as you can see even in 2.1.0 StreamingTextResponse seems to be defined as a constructor, making the traceback i got kinda curious)
from ai.
@bcarsley I got around it by simply creating the Response
class on my own, since StreamingTextResponse
is just a wrapper around it:
return new Response(stream, {
status: 200,
headers: {
"Content-Type": "text/plain; charset=utf-8"
}
})
// return new StreamingTextResponse(stream)
from ai.
I'm also getting the same error
Maybe the automated build for version 2.1.1 didn't deploy the package?
from ai.
Thanks for the feedback! Can you try 2.1.2? It should have the problems fixed.
from ai.
Yeah just like to agree here -- tried both npm and pnpm, various different ways of building, same error as show above. I will manually clone, change the version, and see if that works -- seems like an easy enough fix
from ai.
ok thanks @shuding -- installing as expected!
from ai.
Related Issues (20)
- Jest: cannot find module 'ai/rsc' HOT 1
- Documentation and examples how to use Vercel AI in React HOT 3
- Groq models don't return the usage HOT 3
- Missing links in OpenAI provider README HOT 2
- Erratic behavior of useChat - Could SWR be the issue? HOT 2
- `onError` hook not called when an error occurs during streaming in `useAssistant`
- the example of bedrock/anthropic-v3 show error HOT 2
- LangChainAdapter does not support `StringOutParser` HOT 5
- ai/packages/core/react /use-assistant.ts: expose `setThreadId` as helper HOT 1
- Azure OpenAI provider HOT 9
- Add a Vue version of useAssistant hook
- [zod dependency] Is it okay to add zod dependency to the main package? HOT 3
- Prompt gets added as first message in messages array and looses its attention HOT 4
- Stop tokens? HOT 1
- Configure safety filters for google genai / vertex HOT 1
- How to explicitly pass OPEN_AI_TOKEN into `generateText` function HOT 1
- streamUI and chatgpt: Failed after 3 attempts. Last error: Failed to process error response HOT 4
- Increase Timeout Duration or Improve Heuristic Detection for StreamData Hanging Warning
- StreamUI only calls `generate` once (vs on every stream event) HOT 2
- env.local env does not override shell env
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai.