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
@@ -16,162 +16,173 @@ This section shows how to run the application using the [multi-app run template
16
16
17
17
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/).
18
18
19
-
1. Install dependencies:
20
-
21
-
<!-- STEP
22
-
name: Install Python dependencies
23
-
-->
24
-
25
-
```bash
26
-
cd ./conversation
27
-
```
28
-
29
-
<detailsopen="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
+
<detailsopen="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
+
```
59
61
60
62
2. Open a new terminal window and run the multi app run template:
61
63
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?'
0 commit comments