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
Copy file name to clipboardExpand all lines: content/develop/ai/langcache/_index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,15 +52,15 @@ The following diagram displays how you can integrate LangCache into your GenAI a
52
52
{{< image filename="images/rc/langcache-process.png" alt="The LangCache process diagram." >}}
53
53
54
54
1. A user sends a prompt to your AI app.
55
-
1. Your app sends the prompt to LangCache through the `POST /v1/caches/{cacheId}/search` endpoint.
55
+
1. Your app sends the prompt to LangCache through the `POST /v1/caches/{cacheId}/entries/search` endpoint.
56
56
1. LangCache calls an embedding model service to generate an embedding for the prompt.
57
57
1. LangCache searches the cache to see if a similar response already exists by matching the embeddings of the new query with the stored embeddings.
58
58
1. If a semantically similar entry is found (also known as a cache hit), LangCache gets the cached response and returns it to your app. Your app can then send the cached response back to the user.
59
59
1. If no match is found (also known as a cache miss), your app receives an empty response from LangCache. Your app then queries your chosen LLM to generate a new response.
60
60
1. Your app sends the prompt and the new response to LangCache through the `POST /v1/caches/{cacheId}/entries` endpoint.
61
61
1. LangCache stores the embedding with the new response in the cache for future use.
62
62
63
-
See the [LangCache API reference]({{< relref "/develop/ai/langcache/api-reference" >}}) for more information on how to use the LangCache API.
63
+
See the [LangCache API and SDK examples]({{< relref "/develop/ai/langcache/api-examples" >}}) for more information on how to use the LangCache API.
0 commit comments