Skip to content

Commit 8e526b2

Browse files
Update for redisvl 0.8.0
1 parent 5e1b0aa commit 8e526b2

23 files changed

+469
-546
lines changed

content/develop/ai/redisvl/api/_index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ linkTitle: RedisVL API
33
title: RedisVL API
44
weight: 5
55
hideListLinks: true
6-
aliases:
7-
- /integrate/redisvl/api
86
---
97

108

@@ -59,6 +57,3 @@ Reference documentation for the RedisVL API.
5957
* [Route](router/#route)
6058
* [Route Match](router/#route-match)
6159
* [Distance Aggregation Method](router/#distance-aggregation-method)
62-
* [Threshold Optimizers](threshold_optimizer/)
63-
* [CacheThresholdOptimizer](threshold_optimizer/#cachethresholdoptimizer)
64-
* [RouterThresholdOptimizer](threshold_optimizer/#routerthresholdoptimizer)

content/develop/ai/redisvl/api/cache.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
linkTitle: LLM cache
33
title: LLM Cache
4-
aliases:
5-
- /integrate/redisvl/api/cache
64
---
75

86

@@ -79,7 +77,7 @@ LLM responses.
7977

8078
```python
8179
response = await cache.acheck(
82-
prompt="What is the captial city of France?"
80+
prompt="What is the capital city of France?"
8381
)
8482
```
8583

@@ -169,7 +167,7 @@ Async stores the specified key-value pair in the cache along with metadata.
169167

170168
```python
171169
key = await cache.astore(
172-
prompt="What is the captial city of France?",
170+
prompt="What is the capital city of France?",
173171
response="Paris",
174172
metadata={"city": "Paris", "country": "France"}
175173
)
@@ -233,7 +231,7 @@ LLM responses.
233231

234232
```python
235233
response = cache.check(
236-
prompt="What is the captial city of France?"
234+
prompt="What is the capital city of France?"
237235
)
238236
```
239237

@@ -347,7 +345,7 @@ Stores the specified key-value pair in the cache along with metadata.
347345

348346
```python
349347
key = cache.store(
350-
prompt="What is the captial city of France?",
348+
prompt="What is the capital city of France?",
351349
response="Paris",
352350
metadata={"city": "Paris", "country": "France"}
353351
)
@@ -408,7 +406,7 @@ The default TTL, in seconds, for entries in the cache.
408406

409407
<a id="embeddings-cache-api"></a>
410408

411-
### `class EmbeddingsCache(name='embedcache', ttl=None, redis_client=None, redis_url='redis://localhost:6379', connection_kwargs={})`
409+
### `class EmbeddingsCache(name='embedcache', ttl=None, redis_client=None, async_redis_client=None, redis_url='redis://localhost:6379', connection_kwargs={})`
412410

413411
Bases: `BaseCache`
414412

@@ -419,9 +417,10 @@ Initialize an embeddings cache.
419417
* **Parameters:**
420418
* **name** (*str*) – The name of the cache. Defaults to “embedcache”.
421419
* **ttl** (*Optional* *[* *int* *]*) – The time-to-live for cached embeddings. Defaults to None.
422-
* **redis_client** (*Optional* *[* *Redis* *]*) – Redis client instance. Defaults to None.
420+
* **redis_client** (*Optional* *[* *SyncRedisClient* *]*) – Redis client instance. Defaults to None.
423421
* **redis_url** (*str*) – Redis URL for connection. Defaults to “redis://localhost:6379”.
424422
* **connection_kwargs** (*Dict* *[* *str* *,* *Any* *]*) – Redis connection arguments. Defaults to {}.
423+
* **async_redis_client** (*Redis* *|* *RedisCluster* *|* *None*)
425424
* **Raises:**
426425
**ValueError** – If vector dimensions are invalid
427426

content/develop/ai/redisvl/api/filter.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
linkTitle: Filter
33
title: Filter
4-
aliases:
5-
- /integrate/redisvl/api/filter
64
---
75

86

content/develop/ai/redisvl/api/message_history.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
linkTitle: LLM message history
33
title: LLM Message History
4-
aliases:
5-
- /integrate/redisvl/api/message_history
64
---
75

86

@@ -93,7 +91,7 @@ Remove a specific exchange from the message history.
9391

9492
#### `get_recent(top_k=5, as_text=False, raw=False, session_tag=None)`
9593

96-
Retreive the recent message history in sequential order.
94+
Retrieve the recent message history in sequential order.
9795

9896
* **Parameters:**
9997
* **top_k** (*int*) – The number of previous exchanges to return. Default is 5.

content/develop/ai/redisvl/api/query.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
linkTitle: Query
33
title: Query
4-
aliases:
5-
- /integrate/redisvl/api/query
64
---
75

86

@@ -174,6 +172,8 @@ Add fields to return fields.
174172
Use a different scoring function to evaluate document relevance.
175173
Default is TFIDF.
176174

175+
Since Redis 8.0 default was changed to BM25STD.
176+
177177
* **Parameters:**
178178
**scorer** (*str*) – The scoring function to use
179179
(e.g. TFIDF.DOCNORM or BM25)
@@ -488,6 +488,8 @@ Add fields to return fields.
488488
Use a different scoring function to evaluate document relevance.
489489
Default is TFIDF.
490490

491+
Since Redis 8.0 default was changed to BM25STD.
492+
491493
* **Parameters:**
492494
**scorer** (*str*) – The scoring function to use
493495
(e.g. TFIDF.DOCNORM or BM25)
@@ -934,7 +936,7 @@ A query for running a full text search, along with an optional filter expression
934936
* **text_field_name** (*str*) – The name of the document field to perform text search on.
935937
* **text_scorer** (*str* *,* *optional*) – The text scoring algorithm to use.
936938
Defaults to BM25STD. Options are {TFIDF, BM25STD, BM25, TFIDF.DOCNORM, DISMAX, DOCSCORE}.
937-
See [https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/scoring/](https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/scoring/)
939+
See [https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/scoring/](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/scoring/)
938940
* **filter_expression** (*Union* *[* *str* *,* [*FilterExpression*]({{< relref "filter/#filterexpression" >}}) *]* *,* *optional*) – A filter to apply
939941
along with the text search. Defaults to None.
940942
* **return_fields** (*List* *[* *str* *]*) – The declared fields to return with search
@@ -1070,6 +1072,8 @@ Add fields to return fields.
10701072
Use a different scoring function to evaluate document relevance.
10711073
Default is TFIDF.
10721074

1075+
Since Redis 8.0 default was changed to BM25STD.
1076+
10731077
* **Parameters:**
10741078
**scorer** (*str*) – The scoring function to use
10751079
(e.g. TFIDF.DOCNORM or BM25)
@@ -1282,6 +1286,8 @@ Add fields to return fields.
12821286
Use a different scoring function to evaluate document relevance.
12831287
Default is TFIDF.
12841288

1289+
Since Redis 8.0 default was changed to BM25STD.
1290+
12851291
* **Parameters:**
12861292
**scorer** (*str*) – The scoring function to use
12871293
(e.g. TFIDF.DOCNORM or BM25)
@@ -1499,6 +1505,8 @@ Add fields to return fields.
14991505
Use a different scoring function to evaluate document relevance.
15001506
Default is TFIDF.
15011507

1508+
Since Redis 8.0 default was changed to BM25STD.
1509+
15021510
* **Parameters:**
15031511
**scorer** (*str*) – The scoring function to use
15041512
(e.g. TFIDF.DOCNORM or BM25)

content/develop/ai/redisvl/api/reranker.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
linkTitle: Rerankers
33
title: Rerankers
4-
aliases:
5-
- /integrate/redisvl/api/reranker
64
---
75

86

content/develop/ai/redisvl/api/router.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
linkTitle: Semantic router
33
title: Semantic Router
4-
aliases:
5-
- /integrate/redisvl/api/router
64
---
75

86

@@ -21,7 +19,7 @@ Initialize the SemanticRouter.
2119
* **routes** (*List* *[*[Route](#route) *]*) – List of Route objects.
2220
* **vectorizer** (*BaseVectorizer* *,* *optional*) – The vectorizer used to embed route references. Defaults to default HFTextVectorizer.
2321
* **routing_config** ([RoutingConfig](#routingconfig) *,* *optional*) – Configuration for routing behavior. Defaults to the default RoutingConfig.
24-
* **redis_client** (*Optional* *[* *Redis* *]* *,* *optional*) – Redis client for connection. Defaults to None.
22+
* **redis_client** (*Optional* *[* *SyncRedisClient* *]* *,* *optional*) – Redis client for connection. Defaults to None.
2523
* **redis_url** (*str* *,* *optional*) – The redis url. Defaults to redis://localhost:6379.
2624
* **overwrite** (*bool* *,* *optional*) – Whether to overwrite existing index. Defaults to False.
2725
* **connection_kwargs** (*Dict* *[* *str* *,* *Any* *]*) – The connection arguments
@@ -99,7 +97,7 @@ Return SemanticRouter instance from existing index.
9997

10098
* **Parameters:**
10199
* **name** (*str*)
102-
* **redis_client** (*Redis* *|* *None*)
100+
* **redis_client** (*Redis* *|* *RedisCluster* *|* *None*)
103101
* **redis_url** (*str*)
104102
* **Return type:**
105103
[SemanticRouter](#semanticrouter)

content/develop/ai/redisvl/api/schema.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
linkTitle: Schema
33
title: Schema
4-
aliases:
5-
- /integrate/redisvl/api/schema
64
---
75

86

0 commit comments

Comments
 (0)