Skip to content

Commit 7cceaba

Browse files
committed
remove real llm provider info
Signed-off-by: Filinto Duran <[email protected]>
1 parent f9371fb commit 7cceaba

File tree

6 files changed

+275
-276
lines changed

6 files changed

+275
-276
lines changed

conversation/python/http/README.md

Lines changed: 159 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -16,162 +16,173 @@ This section shows how to run the application using the [multi-app run template
1616

1717
This example uses the default LLM Component provided by Dapr which simply echoes the input provided, for testing purposes. Here are other [supported Conversation components](https://docs.dapr.io/reference/components-reference/supported-conversation/).
1818

19-
1. Install dependencies:
20-
21-
<!-- STEP
22-
name: Install Python dependencies
23-
-->
24-
25-
```bash
26-
cd ./conversation
27-
```
28-
29-
<details open="true">
30-
<summary>Option 1: Using venv (Python's built-in virtual environment)</summary>
31-
32-
```bash
33-
python3 -m venv .venv
34-
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
35-
pip3 install -r requirements.txt
36-
```
37-
38-
</details>
39-
40-
<details>
41-
<summary>Option 2: Using uv (faster alternative to pip)</summary>
42-
43-
```bash
44-
python3 -m venv .venv
45-
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
46-
# If you don't have uv installed yet, install it first:
47-
# pip install uv
48-
uv pip install -r requirements.txt
49-
```
50-
51-
</details>
52-
53-
```bash
54-
# Return to the parent directory
55-
cd ..
56-
```
57-
58-
<!-- END_STEP -->
19+
1. Install dependencies:
20+
21+
<details open="true">
22+
<summary>Option 2: Using uv (faster modern alternative to pip)</summary>
23+
24+
```
25+
cd conversation
26+
27+
python3 -m venv .venv
28+
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
29+
30+
# If you don't have uv installed yet, install it first:
31+
# pip install uv
32+
uv pip install -r requirements.txt
33+
```
34+
35+
</details>
36+
37+
<details>
38+
<summary>Option 1: Using classic pip</summary>
39+
40+
<!-- STEP
41+
name: Install Python dependencies
42+
-->
43+
44+
```bash
45+
cd conversation
46+
47+
python3 -m venv .venv
48+
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
49+
50+
pip install -r requirements.txt
51+
```
52+
53+
<!-- END_STEP -->
54+
55+
</details>
56+
57+
```bash
58+
# Return to the parent directory
59+
cd ..
60+
```
5961
6062
2. Open a new terminal window and run the multi app run template:
6163
62-
<!-- STEP
63-
name: Run multi app run template
64-
expected_stdout_lines:
65-
- '== APP - conversation == Conversation input sent: What is dapr?'
66-
- '== APP - conversation == Output response: What is dapr?'
67-
- '== APP - conversation == Tool calling input sent: What is the weather like in San Francisco in celsius?'
68-
- '== APP - conversation == Output message: What is the weather like in San Francisco in celsius?'
69-
- '== APP - conversation == No tool calls in response'
70-
expected_stderr_lines:
71-
output_match_mode: substring
72-
match_order: none
73-
background: true
74-
sleep: 15
75-
timeout_seconds: 30
76-
-->
77-
78-
```bash
79-
dapr run -f .
80-
```
81-
82-
The terminal console output should look similar to this, where:
83-
84-
- The app first sends an input `What is dapr?` to the `echo` Component mock LLM.
85-
- The mock LLM echoes `What is dapr?`.
86-
- The app then sends a weather request to the component with tools available to the LLM.
87-
- The LLM will either respond back with a tool call for the user, or an ask for more information.
88-
89-
```text
90-
== APP - conversation == Input sent: What is dapr?
91-
== APP - conversation == Output response: What is dapr?
92-
```
93-
94-
- The app then sends an input `What is the weather like in San Francisco in celsius?` to the `echo` Component mock LLM.
95-
- The mock LLM echoes `What is the weather like in San Francisco in celsius?` and calls the `get_weather` tool.
96-
- Since we are using the `echo` Component mock LLM, the tool call is not executed and the LLM returns `No tool calls in response`.
97-
98-
```text
99-
== APP == Tool calling input sent: What is the weather like in San Francisco in celsius?
100-
== APP == Output message: What is the weather like in San Francisco in celsius?
101-
== APP == No tool calls in response
102-
```
103-
```
104-
105-
<!-- END_STEP -->
106-
107-
2. Stop and clean up application processes.
108-
109-
<!-- STEP
110-
name: Stop multi-app run
111-
sleep: 5
112-
-->
113-
114-
```bash
115-
dapr stop -f .
116-
```
117-
118-
<!-- END_STEP -->
64+
<!-- STEP
65+
name: Run multi app run template
66+
expected_stdout_lines:
67+
- '== APP - conversation == Conversation input sent: What is dapr?'
68+
- '== APP - conversation == Output response: What is dapr?'
69+
- '== APP - conversation == Tool calling input sent: What is the weather like in San Francisco in celsius?'
70+
- '== APP - conversation == Output message: What is the weather like in San Francisco in celsius?'
71+
- '== APP - conversation == Tool calls detected:'
72+
- '== APP - conversation == Tool call: {'id': '0', 'function': {'name': 'get_weather', 'arguments': 'location,unit'}}'
73+
- '== APP - conversation == Function name: get_weather'
74+
- '== APP - conversation == Function arguments: location,unit'
75+
expected_stderr_lines:
76+
output_match_mode: substring
77+
match_order: none
78+
background: true
79+
sleep: 15
80+
timeout_seconds: 30
81+
-->
82+
83+
```bash
84+
source conversation/.venv/bin/activate
85+
dapr run -f .
86+
```
87+
88+
The terminal console output should look similar to this, where:
89+
90+
- The app first sends an input `What is dapr?` to the `echo` Component mock LLM.
91+
- The mock LLM echoes `What is dapr?`.
92+
- The app then sends a weather request to the component with tools available to the LLM.
93+
- The LLM will either respond back with a tool call for the user, or an ask for more information.
94+
95+
```text
96+
== APP - conversation == Input sent: What is dapr?
97+
== APP - conversation == Output response: What is dapr?
98+
```
99+
100+
- The app then sends an input `What is the weather like in San Francisco in celsius?` to the `echo` Component mock LLM.
101+
- The mock LLM echoes `What is the weather like in San Francisco in celsius?` and calls the `get_weather` tool.
102+
- Since we are using the `echo` Component mock LLM, the tool call is not executed and the LLM returns `No tool calls in response`.
103+
104+
```text
105+
== APP == Tool calling input sent: What is the weather like in San Francisco in celsius?
106+
== APP == Output message: What is the weather like in San Francisco in celsius?
107+
== APP - conversation == Tool calls detected:
108+
== APP - conversation == Tool call: {'id': '0', 'function': {'name': 'get_weather', 'arguments': 'location,unit'}}
109+
== APP - conversation == Function name: get_weather
110+
== APP - conversation == Function arguments: location,unit
111+
```
112+
113+
<!-- END_STEP -->
114+
115+
3. Stop and clean up application processes.
116+
117+
<!-- STEP
118+
name: Stop multi-app run
119+
sleep: 5
120+
-->
121+
122+
```bash
123+
dapr stop -f .
124+
```
125+
126+
<!-- END_STEP -->
119127
120128
## Run the app with the Dapr CLI
121129
122130
1. Install dependencies:
123131
124-
Open a terminal and run:
125-
126-
```bash
127-
cd ./conversation
128-
```
129-
130-
<details open="true">
131-
<summary>Option 1: Using venv (Python's built-in virtual environment)</summary>
132-
133-
```bash
134-
python3 -m venv .venv
135-
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
136-
pip3 install -r requirements.txt
137-
```
138-
139-
</details>
140-
141-
<details>
142-
<summary>Option 2: Using uv (faster alternative to pip)</summary>
143-
144-
```bash
145-
python3 -m venv .venv
146-
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
147-
# If you don't have uv installed yet, install it first:
148-
# pip install uv
149-
uv pip install -r requirements.txt
150-
```
151-
152-
</details>
132+
Open a terminal and run:
133+
134+
```bash
135+
cd ./conversation
136+
```
137+
138+
<details open="true">
139+
<summary>Option 1: Using uv (faster alternative to pip)</summary>
140+
141+
```bash
142+
python3 -m venv .venv
143+
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
144+
# If you don't have uv installed yet, install it first:
145+
# pip install uv
146+
uv pip install -r requirements.txt
147+
```
148+
149+
</details>
150+
151+
<details>
152+
<summary>Option 2: Using classic pip</summary>
153+
154+
```bash
155+
python3 -m venv .venv
156+
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
157+
pip3 install -r requirements.txt
158+
```
159+
160+
</details>
153161
154162
2. Run the application:
155163
156-
```bash
157-
# Make sure your virtual environment is activated
158-
# If not already activated, run:
159-
# source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
160-
161-
dapr run --app-id conversation --resources-path ../../../components -- python3 app.py
162-
```
163-
164-
The terminal console output should look similar to this, where:
165-
166-
- The app first sends an input `What is dapr?` to the `echo` Component mock LLM.
167-
- The mock LLM echoes `What is dapr?`.
168-
- The app then sends an input `What is the weather like in San Francisco in celsius?` to the `echo` Component mock LLM.
169-
- The mock LLM echoes `What is the weather like in San Francisco in celsius?`
170-
171-
```text
172-
== APP - conversation == Conversation input sent: What is dapr?
173-
== APP - conversation == Output response: What is dapr?
174-
== APP - conversation == Tool calling input sent: What is the weather like in San Francisco in celsius?
175-
== APP - conversation == Output message: What is the weather like in San Francisco in celsius?
176-
== APP - conversation == No tool calls in response
177-
```
164+
```bash
165+
# Make sure your virtual environment is activated
166+
# If not already activated, run:
167+
# source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
168+
169+
dapr run --app-id conversation --resources-path ../../../components -- python3 app.py
170+
```
171+
172+
The terminal console output should look similar to this, where:
173+
174+
- The app first sends an input `What is dapr?` to the `echo` Component mock LLM.
175+
- The mock LLM echoes `What is dapr?`.
176+
- The app then sends an input `What is the weather like in San Francisco in celsius?` to the `echo` Component mock LLM.
177+
- The mock LLM echoes `What is the weather like in San Francisco in celsius?`
178+
179+
```text
180+
== APP - conversation == Conversation input sent: What is dapr?
181+
== APP - conversation == Output response: What is dapr?
182+
== APP - conversation == Tool calling input sent: What is the weather like in San Francisco in celsius?
183+
== APP - conversation == Output message: What is the weather like in San Francisco in celsius?
184+
== APP - conversation == Tool calls detected:
185+
== APP - conversation == Tool call: {'id': '0', 'function': {'name': 'get_weather', 'arguments': 'location,unit'}}
186+
== APP - conversation == Function name: get_weather
187+
== APP - conversation == Function arguments: location,unit
188+
```

0 commit comments

Comments
 (0)