You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Databases with the [default user]({{< relref "/operate/rc/security/access-control/data-access-control/default-user" >}}) turned off
26
27
{{< /note >}}
28
+
27
29
- An [OpenAI API key](https://platform.openai.com/api-keys). LangCache uses OpenAI to generate embeddings for prompts and responses.
28
30
29
31
## Create a LangCache service
30
32
31
-
1.From the [Redis Cloud console](https://cloud.redis.io/), select **LangCache** from the left-hand menu.
33
+
From the [Redis Cloud console](https://cloud.redis.io/), select **LangCache** from the left-hand menu.
32
34
33
-
1.When you access the LangCache page for the first time, you will see a page with an introduction to LangCache. Select **Let's create a service** to create your first service.
35
+
When you access the LangCache page for the first time, you will see a page with an introduction to LangCache. Select **Let's create a service** to create your first service.
34
36
35
-
{{<imagefilename="images/rc/langcache-create-first-service.png"alt="The Let's create a service button."width="200px" >}}
37
+
{{<imagefilename="images/rc/langcache-create-first-service.png"alt="The Let's create a service button."width="200px" >}}
36
38
37
-
If you have already created a LangCache service, select **New service** to create another one.
39
+
If you have already created a LangCache service, select **New service** to create another one.
38
40
39
-
{{<imagefilename="images/rc/langcache-new-service.png"alt="The New service button."width="150px" >}}
41
+
{{<imagefilename="images/rc/langcache-new-service.png"alt="The New service button."width="150px" >}}
40
42
41
43
This takes you to the **Create LangCache service** page. The page is divided into the following sections:
42
44
@@ -68,7 +70,7 @@ The **Embedding settings** section defines the embedding model used by your serv
68
70
|**Supported Embedding Provider**| The embedding provider to use for your service. LangCache only supports OpenAI during public preview. |
69
71
|**Embedding provider API key**| Enter your embedding provider's API key. |
70
72
|**Model**| Select the embedding model to use for your service. |
71
-
|**Similarity threshold**| Set the minimum similarity score required to consider a cached response a match. Range: `0.0` to `1.0`. Default: `0.9`<br/>A higher value means more precise matches, but if it's too high, you will compromise on the number of matches and may lose relevant matches. A lower value means more matches, but may include less relevant matches. We recommend starting between `0.8` and `0.9` and then fine-tuning based on your results. |
73
+
|**Similarity threshold**| Set the minimum similarity score required to consider a cached response a match. Range: `0.0` to `1.0`. Default: `0.9`<br/><br/>A higher value means more precise matches, but if it's too high, you will compromise on the number of matches and may lose relevant matches. A lower value means more matches, but may include less relevant matches. We recommend starting between `0.8` and `0.9` and then fine-tuning based on your results. |
72
74
73
75
### Attributes settings
74
76
@@ -102,6 +104,16 @@ When you are done setting the details of your LangCache service, select **Create
102
104
103
105
{{<imagefilename="images/rc/button-access-management-user-key-create.png"alt="Use the Create button to create a LangCache service." >}}
104
106
107
+
A window containing your LangCache service key will appear. Select **Copy** to copy the key to your clipboard.
108
+
109
+
{{<imagefilename="images/rc/langcache-service-key.png"alt="The LangCache service key window. Use the Copy button to save the service key to the clipboard." >}}
110
+
111
+
{{<warning>}}
112
+
This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.<br/><br/>
113
+
114
+
If you lose the service key value, you will need to [replace the service key]({{< relref "/operate/rc/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API.
115
+
{{</warning>}}
116
+
105
117
You'll be taken to your LangCache service's **Configuration** page. You'll also be able to see your LangCache service in the LangCache service list.
106
118
107
119
{{<imagefilename="images/rc/langcache-service-list.png"alt="The LangCache service in the LangCache service list." >}}
Copy file name to clipboardExpand all lines: content/operate/rc/langcache/use-langcache.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,14 @@ You can use the LangCache API from your client app to store and retrieve LLM, RA
16
16
To access the LangCache API, you need:
17
17
18
18
- LangCache API base URL
19
-
- LangCache API token
19
+
- LangCache service API key
20
20
- Cache ID
21
21
22
-
All of these values are available in the LangCache service's **Configuration** page.
22
+
The base URL and cache ID are available in the LangCache service's **Configuration** page in the [**Connectivity** section]({{< relref "/operate/rc/langcache/view-edit-cache#connectivity" >}}).
23
23
24
-
When you call the API, you need to pass the LangCache API token in the `Authorization` header as a Bearer token and the Cache ID as the `cacheId` path parameter.
24
+
The LangCache API key is only available immediately after you create the LangCache service. If you lost this value, you will need to [replace the service API key]({{< relref "/operate/rc/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API.
25
+
26
+
When you call the API, you need to pass the LangCache API key in the `Authorization` header as a Bearer token and the Cache ID as the `cacheId` path parameter.
25
27
26
28
For example, to check the health of the cache using `cURL`:
Copy file name to clipboardExpand all lines: content/operate/rc/langcache/view-edit-cache.md
+35-4Lines changed: 35 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -39,20 +39,47 @@ The **Connectivity** section provides the connection details for your LangCache
39
39
|**Cache ID**| The unique ID of your LangCache service. |
40
40
|**API Base URL**| The base URL for LangCache API requests. |
41
41
42
-
Select the **Copy** button next to each value to copy them to the clipboard. See [use the LangCache API]({{< relref "/operate/rc/langcache/use-langcache" >}}) for more information on how to use these values.
42
+
Select the **Copy** button next to the Cache ID and API Base URL to copy them to the clipboard. If you lost the API key value or need to rotate the key, you can [replace the service API key](#replace-service-api-key) at any time.
43
+
44
+
See [use the LangCache API]({{< relref "/operate/rc/langcache/use-langcache" >}}) for more information on how to use these values.
45
+
46
+
#### Replace service API key
47
+
48
+
The API key is only available immediately after you create the LangCache service. If you lost this value, or need to rotate the key, you can replace the service key at any time.
1. A confirmation dialog will appear. Select **Confirm** to confirm.
57
+
58
+
1. The new key will appear in a dialog box. Select **Copy** to copy the key to the clipboard.
59
+
60
+
{{<imagefilename="images/rc/langcache-service-key.png"alt="The LangCache service key window. Use the Copy button to save the service key to the clipboard." >}}
61
+
62
+
{{<warning>}}
63
+
This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box. <br/><br/>
64
+
65
+
If you lose the service key value, you will need to replace the key again.
66
+
{{</warning>}}
43
67
44
68
### General
45
69
46
70
The **General** section provides configuration details for your LangCache service.
47
71
72
+
{{<imagefilename="images/rc/langcache-view-general.png"alt="The general settings for the LangCache service." >}}
73
+
48
74
| Setting name |Description|
49
75
|:----------------------|:----------|
50
-
|**Service name**| The name of the LangCache service. _(Editable)_|
76
+
|**Service name**| The name of the LangCache service. |
51
77
|**Database**| The database that stores your cache data. |
52
-
|**Distance threshold**| The minimum similarity score required to consider a cached response a match. _(Editable)_|
78
+
|**Similarity threshold**| The minimum similarity score required to consider a cached response a match. _(Editable)_|
79
+
|**TTL**| The number of seconds to cache entries before they expire. _(Editable)_|
53
80
|**Embedding Provider**| The embedding provider to use for your service. |
54
81
55
-
Some of the configuration settings can be changed after cache creation. To do so, select the **Edit** button.
82
+
Some of these settings can be changed after cache creation. To do so, select the **Edit** button.
56
83
57
84
### Attributes
58
85
@@ -93,3 +120,7 @@ To delete your LangCache service:
93
120
1. Select **Delete** again to confirm.
94
121
95
122
Deleting the LangCache service is permanent and cannot be undone.
123
+
124
+
## Metrics tab
125
+
126
+
The **Metrics** tab provides a series of graphs showing performance data for your LangCache service. See [Monitor a LangCache service]({{< relref "/operate/rc/langcache/monitor-cache" >}}) for more information.
0 commit comments