* Added example demonstrating creating an AIAgent using the Microsoft.AI.Extensions implementation of IChatClient using Dapr as the inference backend provider - in this example, using Ollama Signed-off-by: Whit Waldo <whit.waldo@innovian.net> * Update dotnet/samples/GettingStarted/AgentProviders/Agent_With_Dapr/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Added copyright statement at top of file Signed-off-by: Whit Waldo <whit.waldo@innovian.net> * Update dotnet/agent-framework-dotnet.slnx That's odd the IDE added it a second time. Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> * Address review nits: configurable Dapr gRPC endpoint and document VersionOverride Make the Dapr sidecar gRPC endpoint configurable via the DAPR_GRPC_ENDPOINT environment variable (defaulting to http://localhost:3501) and document it in the README. Add a comment explaining why the Microsoft.Extensions.* VersionOverride entries are needed and when they can be removed. --------- Signed-off-by: Whit Waldo <whit.waldo@innovian.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
Prerequisites
Before you begin, ensure you have the following prerequisites:
- .NET 10 SDK or later
- Docker installed and running on your machine
- Ollama installed
- Dapr CLI installed (instructions)
You'll need to download a model from Ollama's library to get started. Open
a terminal and run the following, replacing <model_name> with the name of the model you want to use from
Ollama's library (e.g., llama3.2).
ollama run <model_name>
Once it has downloaded and started running, update the component bundled with this example
in ./Components/conversation-ollama.yaml to reflect the name of the model you just installed, modifying the value of
the model metadata property, then save your changes and close the file.
Next, start your Dapr sidecar and tell it where it can look for your components. If launching from this project's directory,
run the following; otherwise, replace ./Components with the path to your components directory.
dapr run --app-id agents --resources-path ./Components --dapr-grpc-port 3501
The sample connects to the sidecar at http://localhost:3501 by default. If you start the sidecar on a
different gRPC port, set the DAPR_GRPC_ENDPOINT environment variable to match before running the sample.
Because the Dapr sidecar needs to continue running while your application is running, please open another terminal window and run the following command from this project's directory to start the demo.
dotnet run