@@ -39,15 +39,19 @@ curl -s -X GET "https://$HOST/v1/caches/$CACHE_ID/health" \
39
39
This example uses ` cURL ` and Linux shell scripts to demonstrate the API; you can use any standard REST client or library.
40
40
{{% /info %}}
41
41
42
- ## Check cache health
42
+ You can also use the [ LangCache SDKs] ( #langcache-sdk ) for Javascript and Python to access the API.
43
+
44
+ ## API examples
45
+
46
+ ### Check cache health
43
47
44
48
Use ` GET /v1/caches/{cacheId}/health ` to check the health of the cache.
45
49
46
50
``` sh
47
51
GET https://[host]/v1/caches/{cacheId}/health
48
52
```
49
53
50
- ## Search LangCache for similar responses
54
+ ### Search LangCache for similar responses
51
55
52
56
Use ` POST /v1/caches/{cacheId}/search ` to search the cache for matching responses to a user prompt.
53
57
@@ -74,7 +78,7 @@ POST https://[host]/v1/caches/{cacheId}/search
74
78
}
75
79
```
76
80
77
- ## Store a new response in LangCache
81
+ ### Store a new response in LangCache
78
82
79
83
Use ` POST /v1/caches/{cacheId}/entries ` to store a new response in the cache.
80
84
@@ -101,7 +105,7 @@ POST https://[host]/v1/caches/{cacheId}/entries
101
105
}
102
106
```
103
107
104
- ## Delete cached responses
108
+ ### Delete cached responses
105
109
106
110
Use ` DELETE /v1/caches/{cacheId}/entries/{entryId} ` to delete a cached response from the cache.
107
111
@@ -115,3 +119,11 @@ DELETE https://[host]/v1/caches/{cacheId}/entries
115
119
}
116
120
}
117
121
```
122
+ ## LangCache SDK
123
+
124
+ If your app is written in Javascript or Python, you can also use the LangCache Software Development Kits (SDKs) to access the API.
125
+
126
+ To learn how to use the LangCache SDKs:
127
+
128
+ - [ LangCache SDK for Javascript] ( https://www.npmjs.com/package/@redis-ai/langcache )
129
+ - [ LangCache SDK for Python] ( https://pypi.org/project/langcache/ )
0 commit comments