Redis

The Redis component is a data component that allows users to manage data in NoSQL Redis databases. It can carry out the following tasks:

#Release Stage

Alpha

#Configuration

The component definition and tasks are defined in the definition.json and tasks.json files respectively.

#Setup

In order to communicate with Redis Labs, the following connection details need to be provided. You may specify them directly in a pipeline recipe as key-value pairs within the component's setup block, or you can create a Connection from the Integration Settings page and reference the whole setup as setup: ${connection.<my-connection-id>}.

FieldField IDTypeNote
Host (required)hoststringRedis host to connect to.
Port (required)portintegerPort of Redis.
UsernameusernamestringUsername associated with Redis.
PasswordpasswordstringPassword associated with Redis.
SSL ConnectionsslbooleanIndicates whether SSL encryption protocol will be used to connect to Redis. It is recommended to use SSL connection if possible.

#Supported Tasks

#Retrieve Chat History

Retrieve chat history from Redis.

InputIDTypeDescription
Task ID (required)taskstringTASK_RETRIEVE_CHAT_HISTORY
Session ID (required)session-idstringA unique identifier for the chat session.
Latest Klatest-kintegerThe number of latest conversation turns to retrieve. A conversation turn typically includes one participant speaking or sending a message, and the other participant(s) responding to it.
Include System Message if Existsinclude-system-messagebooleanInclude system message in the retrieved conversation turns if exists.
OutputIDTypeDescription
Chat Messagemessagesarray[object]Messages.
Output Objects in Retrieve Chat History

Chat Message

FieldField IDTypeNote
ContentcontentarrayThe message content
MetadatametadataobjectThe message metadata
RolerolestringThe message role, i.e. 'system', 'user' or 'assistant'

Content

FieldField IDTypeNote
Image URLimage-urlobjectThe image URL
TexttextstringThe text content.
TypetypestringThe type of the content part.

Image URL

FieldField IDTypeNote
URLurlstringEither a URL of the image or the base64 encoded image data.

#Write Chat Message

Write chat message into Redis.

InputIDTypeDescription
Task ID (required)taskstringTASK_WRITE_CHAT_MESSAGE
Session ID (required)session-idstringA unique identifier for the chat session.
Role (required)rolestringThe message role, i.e. 'system', 'user' or 'assistant'.
Content (required)contentstringThe message content.
MetadatametadataobjectThe message metadata.
OutputIDTypeDescription
StatusstatusbooleanThe status of the write operation.

#Write Multi Modal Chat Message

Write multi-modal chat message into Redis.

InputIDTypeDescription
Task ID (required)taskstringTASK_WRITE_MULTI_MODAL_CHAT_MESSAGE
Session ID (required)session-idstringA unique identifier for the chat session.
Role (required)rolestringThe message role, i.e. 'system', 'user' or 'assistant'.
Content (required)contentstringThe multi-modal message content.
MetadatametadataobjectThe message metadata.
OutputIDTypeDescription
StatusstatusbooleanThe status of the write operation.