In Index Network, you can engage in conversations with one or multiple Indexes. This interaction is facilitated by our storage system, which processes and stores information to allow natural, meaningful dialogue. Whether it's querying for specific information or engaging in an ongoing conversation, the Index Network enables seamless communication with its indexed data.

Chat Streaming with SDK Client

To initiate a chat stream using the Index Network SDK Client, use the chatStream method. This method allows you to interact with the Indexes conversationally.

// You should consume the response since it is a stream
const response = indexClient.chatStream({
    id: "",         // Unique identifier for the conversation
    did: "",        // Decentralized Identifier (DID) of the user (optional)
    messages: "",   // Array of messages to be sent in the conversation
    type: "",       // Type of indexes to include (e.g., 'owned', 'starred')
    indexIds: []    // Array of Index IDs to include in the conversation (optional)

// Response is:
// {
//     answer: "This approach can be applied across various disciplines, including science, technology, humanities, and social sciences."
// }

API Endpoint Reference

The corresponding API endpoint for initiating a chat with Indexes is described below:

Last updated