This page shows you how to create a new conversation for your AI Assistant app on the Instill Cloud platform. Conversations are essential for managing user interactions within your AI Assistant, allowing you to track and store dialogues over time.
Creating a conversation is a prerequisite before you can send messages and interact with your AI Assistant. This guide will walk you through the API call required to create a conversation and explain the necessary parameters.
#Create Conversation via API
The NAMESPACE_ID
and APP_ID
path parameters must be replaced with the app
owner's ID and the app ID, respectively.
#Body Parameters
conversationId
(string, required): The unique identifier for your conversation. It must follow the kebab-case format (lowercase letters and hyphens). This ID helps you identify and manage the conversation within your app.
#Example Response
A successful response will return a JSON object containing the details of the newly created conversation.
{ "conversation": { "uid": "generated-conversation-uid", "namespaceId": "your-namespace-id", "appId": "your-app-id", "id": "your-conversation-id", "lastUsedCatalogUid": "", "lastUsedTopK": 0, "createTime": "2024-10-08T12:34:56Z", "updateTime": "2024-10-08T12:34:56Z" }}
#Output Description
conversation
: An object containing the details of the created conversation.uid
(string): The unique identifier of the conversation generated by the system.namespaceId
(string): The ID of your namespace.appId
(string): The ID of the app the conversation belongs to.id
(string): The conversation ID you provided.lastUsedCatalogUid
(string): The UID of the last used Catalog (optional).lastUsedTopK
(integer): The last used top K value for searches (optional).createTime
(string): The timestamp when the conversation was created.updateTime
(string): The timestamp when the conversation was last updated.
#Create Conversation via Console
To create a new conversation for your AI Assistant using the Instill Console, follow these steps:
- Launch Instill Console on Instill Cloud.
- Navigate to the Applications page using the navigation bar.
- Click on the AI Assistant card you wish to interact with.
- If this is a new AI Assistant, starting a conversation will automatically
create a new conversation. The
conversationId
will be auto-generated and displayed in the Chat Playground's header. - To start a new conversation or switch to a different Catalog, click the
Restart
button next to the header. This will create a new conversation and generate a newconversationId
.
Note: Instill Console simplifies conversation management by handling conversation IDs and creation automatically when you interact with your AI Assistant.