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: Docs/troubleshooting.md
+47-23Lines changed: 47 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ Use this guide when local memory works but Cosmos DB, embeddings, Durable Functi
9
9
| Symptom | First checks |
10
10
|---------|--------------|
11
11
| Import errors | Install with `pip install -e ".[dev]"` and import `CosmosMemoryClient` or `AsyncCosmosMemoryClient`. |
12
-
| Missing configuration | Verify `.env`, `azure_functions/local.settings.json`, and Azure Function App settings use the same endpoint, database, and container values. |
12
+
| Missing configuration | Verify `.env`, `function_app/local.settings.json`, and Azure Function App settings use the same endpoint, database, container, and AI deployment values. |
13
13
| Cosmos 401 or 403 | Run `az login` and confirm Cosmos DB data-plane RBAC is assigned. |
14
14
| Cosmos operations fail before connecting | Call `create_memory_store()` or `connect_cosmos()` before cloud operations. |
15
-
| Search returns no vector results | Confirm embeddings are generated and `EMBEDDING_DIMENSIONS` matches the container vector policy. |
16
-
| Durable Function calls fail| Start the Functions host and check `ADF_ENDPOINT`, `ADF_KEY`, and the orchestrator route. |
15
+
| Search returns no vector results | Confirm embeddings are generated and `AI_FOUNDRY_EMBEDDING_DIMENSIONS` matches the container vector policy. |
16
+
| Durable Functions processing fails| Start the Functions host and check `function_app/local.settings.json`, the change feed trigger, and the orchestrator logs. |
17
17
| Change feed does not create summaries or facts | Confirm change feed settings, thresholds, lease container, counter container, and that inserted documents have `type: "turn"`. |
18
18
19
19
---
@@ -24,7 +24,7 @@ Install the package from the repository root:
24
24
25
25
```bash
26
26
pip install -e ".[dev]"
27
-
pip install -r azure_functions/requirements.txt
27
+
pip install -r function_app/requirements.txt
28
28
```
29
29
30
30
The public clients are:
@@ -40,21 +40,45 @@ If notebooks cannot import the package, run them from the repo root with paths s
40
40
41
41
## 2. Configuration And Authentication
42
42
43
-
For local runs, keep `.env` and `azure_functions/local.settings.json` aligned:
43
+
For local runs, keep `.env`, `function_app/local.settings.json`, and deployed Function App settings aligned:
`AI_FOUNDRY_EMBEDDING_DIMENSIONS`, `AI_FOUNDRY_EMBEDDING_DATA_TYPE`, and `AI_FOUNDRY_EMBEDDING_DISTANCE_FUNCTION` are read by the toolkit when creating the Cosmos DB vector policy. The Function App also reads `COSMOS_DB__accountEndpoint` for its identity-based Cosmos DB trigger binding; set it to the same value as `COSMOS_DB_ENDPOINT`.
81
+
58
82
Run `az login` before using `DefaultAzureCredential`.
59
83
60
84
Required roles:
@@ -89,8 +113,8 @@ Use `COSMOS_DB_THROUGHPUT_MODE=serverless` for the default setup. Use `autoscale
89
113
Embedding failures usually mean one of these is wrong:
90
114
91
115
-`AI_FOUNDRY_ENDPOINT`
92
-
-`EMBEDDING_MODEL`
93
-
-`EMBEDDING_DIMENSIONS`
116
+
-`AI_FOUNDRY_EMBEDDING_DEPLOYMENT_NAME`
117
+
-`AI_FOUNDRY_EMBEDDING_DIMENSIONS`
94
118
- Azure OpenAI / AI Services RBAC
95
119
96
120
For hybrid search, `search_terms` is required when `hybrid_search=True`.
@@ -101,23 +125,17 @@ If search returns documents but scores look poor, check that records have an `em
101
125
102
126
## 5. Durable Functions Processing
103
127
104
-
Thread summaries, fact extraction, and user summaries require the Functions host.
128
+
Durable Functions processing requires the Functions host.
For local testing, `ADF_ENDPOINT` is usually `http://localhost:7071/api` and `ADF_KEY` is blank. For Azure, use the deployed Function App URL and set `ADF_KEY` if function-key auth is enabled.
138
+
The SDK does not post to a Function endpoint. With `DurableFunctionProcessor`, the SDK writes turns to Cosmos DB and the deployed Function App picks them up from the Cosmos DB change feed. For local testing, keep `function_app/local.settings.json` aligned with `.env` and confirm the Functions host starts the change feed trigger.
121
139
122
140
If orchestration polling times out, check the Functions logs first. The orchestration may still be running, or an activity may be waiting on Cosmos DB or the LLM endpoint.
123
141
@@ -129,24 +147,30 @@ Automatic processing requires these settings in the Functions app or `local.sett
Set a threshold to `"0"` to disable that processing type.
140
164
141
-
Only documents with `type: "turn"` increment counters. Derived memories such as `summary`, `fact`, and `user_summary` do not trigger threshold counts.
165
+
Cosmos DB memory documents store their category in the JSON `type` field. Only documents with `type: "turn"` increment counters. Derived memories with `type: "summary"`, `type: "fact"`, or `type: "user_summary"` do not trigger threshold counts.
142
166
143
167
If nothing fires:
144
168
145
169
- verify the Functions host shows the Cosmos DB trigger
146
170
- confirm the `leases` container exists
147
171
- confirm the `counter` container is writable
148
172
- insert enough new turn documents to cross the configured threshold
149
-
- check for generated documents with `memory_type="summary"`, `memory_type="fact"`, or `get_user_summary(user_id=...)`
173
+
- check for generated documents where the Cosmos JSON field is `type="summary"`, `type="fact"`, or `type="user_summary"`
0 commit comments