updated custom categories docs (#2207)

This commit is contained in:
Prateek Chhikara
2025-02-13 11:55:04 -08:00
committed by GitHub
parent 2c63f4d866
commit 0bb6137877
2 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ Here are the typical latency ranges for each search mode:
| **Mode** | **Latency** | | **Mode** | **Latency** |
|---------------------|------------------| |---------------------|------------------|
| **Keyword Search** | **>10ms** | | **Keyword Search** | **<10ms** |
| **Reranking** | **150-200ms** | | **Reranking** | **150-200ms** |
| **Filtering** | **200-300ms** | | **Filtering** | **200-300ms** |

View File

@@ -28,7 +28,7 @@ new_categories = [
{"personal_information": "Basic information about the user including name, preferences, and personality traits"} {"personal_information": "Basic information about the user including name, preferences, and personality traits"}
] ]
response = client.update_custom_instructions_and_categories({"custom_categories": new_categories}) response = client.update_project(custom_categories = new_categories)
print(response) print(response)
``` ```
@@ -51,7 +51,7 @@ messages = [
] ]
# Add memories with custom categories # Add memories with custom categories
client.add(messages, user_id="alice")) client.add(messages, user_id="alice")
``` ```
```python Memories with categories ```python Memories with categories
@@ -172,11 +172,11 @@ Name is Alice (personal_details)
``` ```
</CodeGroup> </CodeGroup>
You can check whether default categories are being used by calling `get_custom_instructions_and_categories()`. If `custom_categories` returns `None`, it means the default categories are being used. You can check whether default categories are being used by calling `get_project()`. If `custom_categories` returns `None`, it means the default categories are being used.
<CodeGroup> <CodeGroup>
```python Code ```python Code
client.get_custom_instructions_and_categories(["custom_categories"]) client.get_project(["custom_categories"])
``` ```
```json Output ```json Output