github.com/instill-ai/component@v0.16.0-beta/pkg/connector/redis/v0/README.mdx (about) 1 --- 2 title: "Redis" 3 lang: "en-US" 4 draft: false 5 description: "Learn about how to set up a VDP Redis connector https://github.com/instill-ai/instill-core" 6 --- 7 8 The Redis component is a data connector that allows users to manage data in NoSQL Redis databases. 9 It can carry out the following tasks: 10 11 - [Retrieve Chat History](#retrieve-chat-history) 12 - [Write Chat Message](#write-chat-message) 13 - [Write Multi Modal Chat Message](#write-multi-modal-chat-message) 14 15 ## Release Stage 16 17 `Alpha` 18 19 ## Configuration 20 21 The component configuration is defined and maintained [here](https://github.com/instill-ai/component/blob/main/pkg/connector/redis/v0/config/definition.json). 22 23 ## Connection 24 25 | Field | Field ID | Type | Note | 26 | :--- | :--- | :--- | :--- | 27 | Host (required) | `host` | string | Redis host to connect to | 28 | Port (required) | `port` | integer | Port of Redis | 29 | Username | `username` | string | Username associated with Redis | 30 | Password | `password` | string | Password associated with Redis | 31 | 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. | 32 | SSL Configuration | `ssl_mode` | object | SSL connection modes. <b>verify-full</b> - This is the most secure mode. Always require encryption and verifies the identity of the source database server | 33 34 ## Supported Tasks 35 36 ### Retrieve Chat History 37 38 Retrieve chat history from Redis. 39 40 | Input | ID | Type | Description | 41 | :--- | :--- | :--- | :--- | 42 | Task ID (required) | `task` | string | `TASK_RETRIEVE_CHAT_HISTORY` | 43 | Session ID (required) | `session_id` | string | A unique identifier for the chat session | 44 | 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. | 45 | Include System Message If Exists | `include_system_message` | boolean | Include system message in the retrieved conversation turns if exists | 46 47 | Output | ID | Type | Description | 48 | :--- | :--- | :--- | :--- | 49 | Chat Message | `messages` | array[object] | Messages | 50 51 ### Write Chat Message 52 53 Write chat message into Redis. 54 55 | Input | ID | Type | Description | 56 | :--- | :--- | :--- | :--- | 57 | Task ID (required) | `task` | string | `TASK_WRITE_CHAT_MESSAGE` | 58 | Session ID (required) | `session_id` | string | A unique identifier for the chat session | 59 | Role (required) | `role` | string | The message role, i.e. 'system', 'user' or 'assistant' | 60 | Content (required) | `content` | string | The message content | 61 | Metadata | `metadata` | object | The message metadata | 62 63 | Output | ID | Type | Description | 64 | :--- | :--- | :--- | :--- | 65 | Status | `status` | boolean | The status of the write operation | 66 67 ### Write Multi Modal Chat Message 68 69 Write multi-modal chat message into Redis. 70 71 | Input | ID | Type | Description | 72 | :--- | :--- | :--- | :--- | 73 | Task ID (required) | `task` | string | `TASK_WRITE_MULTI_MODAL_CHAT_MESSAGE` | 74 | Session ID (required) | `session_id` | string | A unique identifier for the chat session | 75 | Role (required) | `role` | string | The message role, i.e. 'system', 'user' or 'assistant' | 76 | Content (required) | `content` | string | The multi-modal message content | 77 | Metadata | `metadata` | object | The message metadata | 78 79 | Output | ID | Type | Description | 80 | :--- | :--- | :--- | :--- | 81 | Status | `status` | boolean | The status of the write operation |