Skip to content

Commit b9cd54f

Browse files
Add recipe for LiteLLM + Redis (#85)
1 parent 12160d6 commit b9cd54f

File tree

4 files changed

+1369
-6
lines changed

4 files changed

+1369
-6
lines changed

.github/ignore-notebooks.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
01_routing_optimization
77
02_semantic_cache_optimization
88
spring_ai_redis_rag.ipynb
9+
00_litellm_proxy_redis.ipynb

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,14 @@ pyrightconfig.json
217217
pyvenv.cfg
218218
pip-selfcheck.json
219219

220+
# other
220221
libs/redis/docs/.Trash*
221222
.python-version
222223
.idea/*
223224
java-recipes/.*
224225

225226
python-recipes/vector-search/beir_datasets
226227
python-recipes/vector-search/datasets
228+
229+
litellm_proxy.log
230+
litellm_redis.yml

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ No faster way to get started than by diving in and playing around with a demo.
3838

3939
Need quickstarts to begin your Redis AI journey? **Start here.**
4040

41+
### Non-Python Redis AI Recipes
42+
43+
#### ☕️ Java
44+
45+
A set of Java recipes can be found under [/java-recipes](/java-recipes/README.md).
46+
47+
4148
### Getting started with Redis & Vector Search
4249

4350
| Recipe | Description |
@@ -48,11 +55,6 @@ Need quickstarts to begin your Redis AI journey? **Start here.**
4855
| [/vector-search/02_hybrid_search.ipynb](/python-recipes/vector-search/02_hybrid_search.ipynb) | Hybrid search techniques with Redis (BM25 + Vector) |
4956
| [/vector-search/03_dtype_support.ipynb](/python-recipes/vector-search/03_dtype_support.ipynb) | Shows how to convert a float32 index to float16 or integer dataypes|
5057

51-
### Non-Python Redis AI Recipes
52-
53-
#### ☕️ Java
54-
55-
A set of Java recipes can be found under [/java-recipes](/java-recipes/README.md).
5658

5759
### Retrieval Augmented Generation (RAG)
5860

@@ -77,7 +79,7 @@ LLMs are stateless. To maintain context within a conversation chat sessions must
7779
| [/llm-message-history/00_message_history.ipynb](python-recipes/llm-message-history/00_llm_message_history.ipynb) | LLM message history with semantic similarity |
7880
| [/llm-message-history/01_multiple_sessions.ipynb](python-recipes/llm-message-history/01_multiple_sessions.ipynb) | Handle multiple simultaneous chats with one instance |
7981

80-
### Semantic Cache
82+
### Semantic Caching
8183
An estimated 31% of LLM queries are potentially redundant ([source](https://arxiv.org/pdf/2403.02694)). Redis enables semantic caching to help cut down on LLM costs quickly.
8284

8385
| Recipe | Description |
@@ -94,6 +96,15 @@ Routing is a simple and effective way of preventing misuses with your AI applica
9496
| [/semantic-router/00_semantic_routing.ipynb](python-recipes/semantic-router/00_semantic_routing.ipynb) | Simple examples of how to build an allow/block list router in addition to a multi-topic router |
9597
| [/semantic-router/01_routing_optimization.ipynb](python-recipes/semantic-router/01_routing_optimization.ipynb) | Use RouterThresholdOptimizer from redisvl to setup best router config |
9698

99+
100+
### AI Gateways
101+
AI gateways manage LLM traffic through a centralized, managed layer that can implement routing, rate limiting, caching, and more.
102+
103+
| Recipe | Description |
104+
| --- | --- |
105+
| [/gateway/00_litellm_proxy_redis.ipynb](python-recipes/gateway/00_litellm_proxy_redis.ipynb) | Getting started with LiteLLM proxy and Redis. |
106+
107+
97108
### Agents
98109

99110
| Recipe | Description |

0 commit comments

Comments
 (0)