TL;DR
Workflow
The first thing we need to do is create a workflow. Go to the workflows page and click on the “New Workflow” button.
Integration
Integrating a workflow is simple. First, you need to install the Itzam SDK.Sending messages
For this example, we’ll create atalkToTurtle
method that sends a message to the AI model and stream the response.
Creating threads
Threads are the conversations between the user and the AI model. To create a thread, we created acreateThread
method.
Fetching threads
Since we’re using the User ID as a lookup key, we can fetch threads in this workflow by the user ID.Fetching older messages
To fetch older messages, we can use thegetRuns
method. This will return all the runs for a given thread.