Improved the quickstart to work with new rc4 Echo

Signed-off-by: Constantin Chirila <constantin@diagrid.io>
This commit is contained in:
Constantin Chirila 2025-08-28 13:32:20 +03:00
parent 864c8663de
commit d6857a88a4
2 changed files with 8 additions and 8 deletions

View File

@ -38,7 +38,7 @@ expected_stdout_lines:
- '== APP - conversation == Output response: What is dapr?'
- '== APP - conversation == Tool calling input sent: What is the weather like in San Francisco in celsius?'
- '== APP - conversation == Output message: What is the weather like in San Francisco in celsius?'
- '== APP - conversation == No tool calls in response'
- '== APP - conversation == Tool calls detected: [{"id":"0","function":{"name":"get_weather","arguments":"location,unit"}}]'
expected_stderr_lines:
output_match_mode: substring
match_order: none
@ -63,12 +63,12 @@ The terminal console output should look similar to this, where:
- The app then sends an input `What is the weather like in San Francisco in celsius?` to the `echo` Component mock LLM.
- The mock LLM echoes `What is the weather like in San Francisco in celsius?` and calls the `get_weather` tool.
- Since we are using the `echo` Component mock LLM, the tool call is not executed and the LLM returns `No tool calls in response`.
- The echo Component returns the tool call information.s
```text
== APP == Tool calling input sent: What is the weather like in San Francisco in celsius?
== APP == Output message: What is the weather like in San Francisco in celsius?
== APP == No tool calls in response
== APP == Tool calls detected: [{"id":"0","function":{"name":"get_weather","arguments":"location,unit"}}]
```
<!-- END_STEP -->
@ -106,12 +106,12 @@ The terminal console output should look similar to this, where:
- The app first sends an input `What is dapr?` to the `echo` Component mock LLM.
- The mock LLM echoes `What is dapr?`.
- The app then sends an input `What is the weather like in San Francisco in celsius?` to the `echo` Component mock LLM.
- The mock LLM echoes `What is the weather like in San Francisco in celsius?`
- The echo Component returns the tool call information.
```text
== APP - conversation == Conversation input sent: What is dapr?
== APP - conversation == Output response: What is dapr?
== APP - conversation == Tool calling input sent: What is the weather like in San Francisco in celsius?
== APP - conversation == Output message: What is the weather like in San Francisco in celsius?
== APP - conversation == No tool calls in response
== APP == Tool calls detected: [{"id":"0","function":{"name":"get_weather","arguments":"location,unit"}}]
```

View File

@ -114,10 +114,10 @@ async function main() {
const result = data?.outputs?.[0]?.choices?.[0]?.message?.content;
console.log("Output message:", result);
if (data?.outputs?.[1]?.choices?.[0]?.message?.toolCalls) {
if (data?.outputs?.[0]?.choices?.[0]?.message?.toolCalls) {
console.log(
"Output message:",
JSON.stringify(data.outputs[1].choices[0].message?.toolCalls, null, 2)
"Tool calls detected:",
JSON.stringify(data.outputs[0].choices[0].message?.toolCalls)
);
} else {
console.log("No tool calls in response");