The Redis component is a data component that allows users to manage data in NoSQL Redis databases.
It can carry out the following tasks:
Alpha
The component definition and tasks are defined in the definition.yaml and tasks.yaml files respectively.
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>}
.
Field | Field ID | Type | Note |
---|
Host (required) | host | string | Redis host to connect to. |
Port (required) | port | integer | Port of Redis. |
Username | username | string | Username associated with Redis. |
Password | password | string | Password associated with Redis. |
SSL Connection | ssl | boolean | Indicates whether SSL encryption protocol will be used to connect to Redis. It is recommended to use SSL connection if possible. |
Retrieve chat history from Redis.
Input | Field ID | Type | Description |
---|
Task ID (required) | task | string | TASK_RETRIEVE_CHAT_HISTORY |
Session ID (required) | session-id | string | A unique identifier for the chat session. |
Latest K | latest-k | integer | The 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 Exists | include-system-message | boolean | Include system message in the retrieved conversation turns if exists. |
Output | Field ID | Type | Description |
---|
Chat Message | messages | array[object] | Messages. |
Output Objects in Retrieve Chat History
Chat Message
Field | Field ID | Type | Note |
---|
Content | content | array | The message content |
Metadata | metadata | json | The message metadata |
Role | role | string | The message role, i.e. 'system', 'user' or 'assistant' |
Content
Field | Field ID | Type | Note |
---|
Image URL | image-url | object | The image URL |
Text | text | string | The text content. |
Type | type | string | The type of the content part. |
Image URL
Field | Field ID | Type | Note |
---|
URL | url | string | Either a URL of the image or the base64 encoded image data. |
Write chat message into Redis.
Input | Field ID | Type | Description |
---|
Task ID (required) | task | string | TASK_WRITE_CHAT_MESSAGE |
Session ID (required) | session-id | string | A unique identifier for the chat session. |
Role (required) | role | string | The message role, i.e. 'system', 'user' or 'assistant'. |
Content (required) | content | string | The message content. |
Metadata | metadata | object | The message metadata. |
Output | Field ID | Type | Description |
---|
Status | status | boolean | The status of the write operation. |
Write multi-modal chat message into Redis.
Input | Field ID | Type | Description |
---|
Task ID (required) | task | string | TASK_WRITE_MULTI_MODAL_CHAT_MESSAGE |
Session ID (required) | session-id | string | A unique identifier for the chat session. |
Role (required) | role | string | The message role, i.e. 'system', 'user' or 'assistant'. |
Content (required) | content | string | The multi-modal message content. |
Metadata | metadata | object | The message metadata. |
Output | Field ID | Type | Description |
---|
Status | status | boolean | The status of the write operation. |