Comments (8)
@athrael-soju
How does genUI work with assistants?
from ai-chatbot.
@athrael-soju How does genUI work with assistants?
Sorry for the late reply. Just saw this.
Assistants can also use function calls, but this template is too embedded with Completions API via Vercel AI and also has several unresolved issues. I really wouldn't suggest you integrate assistants here and instead use this: https://github.com/openai/openai-assistants-quickstart
You can then integrate genUI on top of that template instead.
Either that, or wait for the next Vercel genUI template, which will likely be based on next.js 15 and hopefully less buggy.
I hope that helps.
from ai-chatbot.
There isn't really any implementation of Assistants in the template, so you'd have to implement it from scratch. There's a lot of reusable code though, and tools/GenUI work well with Assistants too, So You can draw inspiration from that.
from ai-chatbot.
... but I can't seem to figure out where I can update this
submitUserMessage()
function in lib/chat/actions.tsx is probably a good start
from ai-chatbot.
Same question here
from ai-chatbot.
@burn2delete did you manage to replace completion with assistant?
from ai-chatbot.
I spent quite a bit of time yesterday trying to get this template to work with OpenAI Assistants ... did not have any luck tbh
Kept running into one issue after another.
It's not just the lib/chat/actions.tsx
file that needs to be updated ... all of the logic that currently stores messages and maps the messages to threads and threads to users in Vercel KV also needs to be updated to instead store thread IDs of the Assistant threads in OpenAI. Vercel KV can be used to keep track of which threads belong to which user, but there's no need to store all messages in KV anymore.
It would be really great if the maintainers of this template created a version that worked out of the box with OAI Assistants. Would be much more powerful.
Some of the stock UI streaming stuff is overkill and takes a long time to remove from the template. Very cool demo though.
from ai-chatbot.
@athrael-soju How does genUI work with assistants?
Sorry for the late reply. Just saw this.
Assistants can also use function calls, but this template is too embedded with Completions API via Vercel AI and also has several unresolved issues. I really wouldn't suggest you integrate assistants here and instead use this: https://github.com/openai/openai-assistants-quickstart
You can then integrate genUI on top of that template instead.
Either that, or wait for the next Vercel genUI template, which will likely be based on next.js 15 and hopefully less buggy.
I hope that helps.
I agree with this ... the OpenAI template is very good, though the UI is bare bones (https://github.com/openai/openai-assistants-quickstart)[https://github.com/openai/openai-assistants-quickstart]
from ai-chatbot.
Related Issues (20)
- No error handling for submitUserMessage
- System messages `Cannot destructure property 'role' error` HOT 1
- streamUI vs render 😢
- Type error in type checking step in vercel deployment
- No response after 6 rounds of dialogues HOT 1
- huggingface support HOT 1
- Error: .update(): Value stream is already closed. HOT 3
- server problem (500) HOT 9
- The theme flashes when switching between modes
- tools : File_search
- streamUI & Call Tools in Parallel
- Cannot render UI HOT 1
- Feature request for means to store props to inject into system prompt. HOT 2
- How to handle multistep toll call with streamUI? HOT 6
- When building and using Redis on-premise HOT 1
- Google OAuth HOT 1
- Chat messages disappearing when clicked on New Chat button and coming back to last chat, chats showing after page refresh HOT 3
- All non OpenAI providers giving errors like Type 'GoogleGenerativeAILanguageModel' is not assignable to type 'LanguageModelV1'. HOT 2
- Vercel.json
- When using tools call - double divider is rendered
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-chatbot.