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/docs/components/clients/consistentmi.md
+36-9Lines changed: 36 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ ConsistentMI simulates clients in motivational interviewing (MI) sessions with c
24
24
25
25
1.**Load Profile**: Reads the character JSON (personas, beliefs, acceptable plans, motivation topics) and initializes `stage` and `receptivity`.
26
26
2.**Initialize Prompts**: Builds a system prompt that anchors the client’s behavior/goal and injects personas + beliefs for consistency.
27
-
3.**Track Topic Engagement**: Matches the therapist’s latest utterance to a motivation topic, then uses the topic graph distance to update `engagement` and count repeated off-topic turns.
27
+
3.**Track Topic Engagement**: Matches the therapist’s latest utterance to a motivation topic using a reranker-backed topic matcher, then uses the topic graph distance to update `engagement` and count repeated off-topic turns. If reranking is unavailable or returns no valid scores, ConsistentMI falls back to lexical matching.
28
28
4.**Verify Motivation (Optional)**: If the therapist addresses the client’s core motivation, the client enters a short `Motivation` state for an acknowledging response.
29
29
5.**Sample a Stage-Consistent Action**: An LLM predicts an action distribution conditioned on recent context and the current stage.
30
30
6.**Select Grounding Detail**: For actions like `Inform/Downplay/Blame/Hesitate/Plan`, the client selects a relevant persona/belief/plan (only when the therapist asks a question) to ground the next reply.
Copy file name to clipboardExpand all lines: docs/docs/getting-started/configuration.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,13 @@ For example,
22
22
OPENAI_API_KEY=your_openai_key
23
23
OPENAI_BASE_URL=https://api.openai.com
24
24
25
-
# For VLLM (n this case, model_type = VLLM)
26
-
VLLM_BASE_URL=http://127.0.0.1
27
-
VLLM_API_KEY=None
25
+
# For local OpenAI-compatible servers (model_type = LOCAL)
26
+
LOCAL_BASE_URL=http://127.0.0.1:8000/v1
27
+
LOCAL_API_KEY=EMPTY
28
28
```
29
29
30
+
`model_type` is used to select the environment-variable namespace. For example, `model_type=LOCAL` makes PatientHub read `LOCAL_BASE_URL` and `LOCAL_API_KEY`.
`ConsistentMI` uses the main `model_type` / `model_name` pair for response generation and a separate `reranker_model_type` / `reranker_model_name` pair for topic matching. The reranker currently reuses `LOCAL_BASE_URL` and `LOCAL_API_KEY`.
Use `0.0.0.0` for the server listen address, but use `127.0.0.1` or the machine's real IP in `LOCAL_BASE_URL`.
106
+
:::
107
+
108
+
:::tip Proxy settings
109
+
If your shell exports `http_proxy` or `https_proxy`, local requests to the reranker can be sent to the proxy instead of your vLLM server. For local testing, either unset those variables or set:
110
+
111
+
```bash
112
+
export NO_PROXY=127.0.0.1,localhost
113
+
```
114
+
:::
115
+
78
116
:::note vLLM fails to start
79
117
it’s usually a CUDA/driver mismatch on the serving machine—check your NVIDIA driver/CUDA runtime and use a vLLM version compatible with your environment.
0 commit comments