quickstarts/conversation/csharp/http
Bilgin Ibryam 26e520c35e
Conversation API quickstart cleanup - remaining part
Signed-off-by: Bilgin Ibryam <bibryam@gmail.com>
2025-03-24 09:29:24 +00:00
..
conversation Merge 1.15 into master (#1172) 2025-02-28 06:14:51 -08:00
README.md Conversation API quickstart cleanup - remaining part 2025-03-24 09:29:24 +00:00
dapr.yaml Csharp conversation quickstarts 2025-01-23 23:07:49 +00:00
makefile Csharp conversation quickstarts 2025-01-23 23:07:49 +00:00

README.md

Dapr Conversation API (C# HTTP)

In this quickstart, you'll send an input to a mock Large Language Model (LLM) using Dapr's Conversation API. This API is responsible for providing one consistent API entry point to talk to underlying LLM providers.

Visit this link for more information about Dapr and the Conversation API.

Note: This example leverages HTTP requests only. If you are looking for the example using the Dapr Client SDK (recommended) click here.

This quickstart includes one app:

  • Conversation, responsible for sending an input to the underlying LLM and retrieving an output.

Run the app with the template file

This section shows how to run the application using the multi-app run template file and Dapr CLI with dapr run -f ..

This example uses the default LLM Component provided by Dapr which simply echoes the input provided, for testing purposes. Integrate with popular LLM models by using one of the other supported conversation components.

Open a new terminal window and run the multi app run template:

dapr run -f .

The terminal console output should look similar to this, where:

  • The app sends an input What is dapr? to the echo Component mock LLM.
  • The mock LLM echoes What is dapr?.
== APP - conversation == Input sent: What is dapr?
== APP - conversation == Output response: What is dapr?

Stop and clean up application processes.

dapr stop -f .

Run the app individually

  1. Open a terminal and run the conversation app. Build the dependencies if you haven't already.
cd ./conversation
dotnet build
  1. Run the Dapr process alongside the application.
dapr run --app-id conversation --resources-path ../../../components/ -- dotnet run

The terminal console output should look similar to this, where:

  • The app sends an input What is dapr? to the echo Component mock LLM.
  • The mock LLM echoes What is dapr?.
== APP - conversation == Input sent: What is dapr?
== APP - conversation == Output response: What is dapr?