Skip to content

Commit 9aef603

Browse files
Conversation quickstarts updates - Python and Go (#1169)
* Adds python conversation api sdk quickstart. Updates python sdk version. Updates parameter name in conversation quickstart in Go. Signed-off-by: Elena Kolevska <[email protected]> * Fixes .net http quickstart for Conversation API Signed-off-by: Elena Kolevska <[email protected]> * rename Signed-off-by: Elena Kolevska <[email protected]> * Fixes js conversation quickstart Signed-off-by: Elena Kolevska <[email protected]> * Older dependency Signed-off-by: Elena Kolevska <[email protected]> * Sets up a clean virtual environment for every quickstart Signed-off-by: Elena Kolevska <[email protected]> * Apply suggestions from code review Co-authored-by: Mark Fussell <[email protected]> Signed-off-by: Elena Kolevska <[email protected]> * Adds uvicorn in requirements.txt Signed-off-by: Elena Kolevska <[email protected]> * Runs the install step Signed-off-by: Elena Kolevska <[email protected]> --------- Signed-off-by: Elena Kolevska <[email protected]> Signed-off-by: Elena Kolevska <[email protected]> Co-authored-by: Mark Fussell <[email protected]>
1 parent 000e127 commit 9aef603

File tree

29 files changed

+210
-32
lines changed

29 files changed

+210
-32
lines changed

.github/workflows/validate_python_quickstarts.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,15 @@ jobs:
105105
else
106106
pushd $building_block/python/$variant
107107
echo "Validating $building_block/python/$variant quickstart"
108+
109+
python3 -m venv .venv
110+
source .venv/bin/activate
111+
108112
make validate
113+
114+
deactivate
115+
rm -rf .venv
116+
109117
popd
110118
fi
111119
done

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# General
22
.venv
3+
venv
34
.env
5+
env
46
*.exe
57
*.suo
68
*.user
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
requests
22
Flask
3+
uvicorn
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
dapr>=1.15.0rc2
1+
dapr>=1.15.0rc3
22
Flask
3+
uvicorn
34
typing-extensions
45
werkzeug>=3.0.3 # not directly required, pinned by Snyk to avoid a vulnerability
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
requests
2-
flask
2+
Flask
3+
uvicorn
34
urllib3>=2.2.2 # not directly required, pinned by Snyk to avoid a vulnerability
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dapr>=1.15.0rc2
1+
dapr>=1.15.0rc3
22
typing-extensions

conversation/csharp/http/conversation/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static async Task Main(string[] args)
3434
var inputBody = new
3535
{
3636
name = "echo",
37-
inputs = new[] { new { message = "What is dapr?" } },
37+
inputs = new[] { new { content = "What is dapr?" } },
3838
parameters = new { },
3939
metadata = new { }
4040
};
@@ -49,7 +49,7 @@ static async Task Main(string[] args)
4949
var response = await client.PostAsync(daprUrl, content);
5050
response.EnsureSuccessStatusCode();
5151

52-
Console.WriteLine("Input sent: " + inputBody.inputs[0].message);
52+
Console.WriteLine("Input sent: " + inputBody.inputs[0].content);
5353

5454
var responseBody = await response.Content.ReadAsStringAsync();
5555

conversation/go/http/conversation/conversation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func main() {
4343

4444
var inputBody = `{
4545
"name": "echo",
46-
"inputs": [{"message":"What is dapr?"}],
46+
"inputs": [{"content":"What is dapr?"}],
4747
"parameters": {},
4848
"metadata": {}
4949
}`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module conversation
22

3-
go 1.23.5
3+
go 1.23.6

conversation/go/sdk/conversation/conversation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ func main() {
2929
}
3030

3131
input := dapr.ConversationInput{
32-
Message: "What is dapr?",
32+
Content: "What is dapr?",
3333
// Role: nil, // Optional
3434
// ScrubPII: nil, // Optional
3535
}
3636

37-
fmt.Println("Input sent:", input.Message)
37+
fmt.Println("Input sent:", input.Content)
3838

3939
var conversationComponent = "echo"
4040

0 commit comments

Comments
 (0)