This guide assumes you have basic knowledge of Vercel AI SDK and React.
You’ll also need a Thesys API key from the C1 Console.
- Building an agent
- Building a chatbot
Integrating Thesys C1 with
useCompletion
from Vercel AI SDK allows you to easily create
Generative UI based capabilities for your agent. useCompletion
enables the streaming of text completions from your AI provider, manages the input state,
and updates the UI automatically as new messages are received.1
Create a new Vercel project
2
Initiate the backend endpoint
app/api/completion/route.ts
3
Render the response
app/page.tsx
4
Run the app
View the code
Find more examples and complete code on our GitHub repository.