Threads allow you to easily create a conversation inside a Workflow.A thread is a collection of messages between a user and the AI.You can create as many threads as you want inside a Workflow:
After creating a thread, you can use its ID when sending new messages.This will make the AI continue the conversation and remember all previous messages.
Copy
const message = await itzam.generateText({ threadId: "thread_424242", input: "Hello, I'm Gustavo, how are you?",});console.log(message.content); // "I'm doing well, thank you!"// If you use the same thread ID, the AI will continue the conversationconst message = await itzam.generateText({ threadId: "thread_424242", input: "What's my name?",});console.log(message.content); // "Your name is Gustavo"
You can check how a thread is going by clicking in the threads option inside any run.You can also use our API or SDKs to get the thread by its ID or by Workflow.