Chat
Create and respond to chats
Chats are stored as sessions and have memory. The intelligent content engine takes the history of chat messages in a session into account when generating responses.
Streaming chat creation
To stream chat output, set the stream
parameter to true
:
Synchronous chat creation
Streaming responses
To respond to a chat with memory of previous messages and stream the result, set the stream
parameter to true
:
Synchronous responses
Identifying users from your platform
An external user ID can be provided when creating a chat from the SDK. Subsequently, chats can be filtered and searched by external ID from the app and with the SDK to analyze support trends and usage patterns for customers.
Create a chat with external user IDs
List chats by external user IDs
Get a chat
List chats
List and paginate through all chats, or filter by externalUserId
, userEmail
, or cortexName
:
Embedded copilots
Cortex Click makes it easy to embed a copilot within your product so that users can get answers to their questions instantenously, and in context. This keeps users within your product, helps them activate and reach the "a-ha" moment faster, and reduces support burden.
Embedded chat
Cortex provides a chat UX that you can host within your own app or product. It is available as either an iframe
or can be be initialized by important a JavaScript script
tag.
Embedded chat is currently in alpha, for more details on integration please reach out for more details.
Tips for building a custom copilot
The Cortex SDK provides everything you need to build custom embedded copilots that answer questions about your platform, docs, and how to use your product offering. In just a few lines of code you can:
- Stream responses to users from the intelligent content engine
- Respond to chat sessions with memory about previous messages
- Save extenal ID from your system on a chat for downstream analytics
- Lookup, list, and retrieve previous sessions for a user
Building your own copilot enables deeper customization of look and feel, and allows building custom features and actions specific to your platform. For instance, if your company provide a data platform your users query with SQL, you might use Cortex Click to generate queries and add customizations in your copilot that allows users to execute the queries on your platform with a single click rather than copying and pasting.
For a live example of a custom copilot, see the Allium.so marketing website.