Conversations

Introduction

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 chat method. This method allows you to interact with the Indexes conversationally.

const queryResponse = await indexClient.chat({
  id: uuidv4(), // Provide a unique chat id for the query
  messages: [
    {
      content: "How do you evaluate a startup?",
      role: "user",
    },
  ],
  indexes: [indexId], // You can add all the indexes of a user as well
  // did: '...' // Optionally, provide a did
});


// Response is:
// {
//     answer: "This approach can be applied across various ..."
// }

API Endpoint Reference

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

Last updated