Files
westey b2a6b64d72 .NET: Add Ollama and custom agent samples, plus ONNX improvements (#639)
* Add ollama and custom agent samples, plus onnx improvements

* Update dotnet/samples/GettingStarted/AgentProviders/Agent_With_CustomImplementation/Program.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Address PR comments.

* Address pr comments.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-09 11:04:31 +00:00

609 B

Prerequisites

WARNING: ONNX doesn't support function calling, so any function tools passed to the agent will be ignored.

Before you begin, ensure you have the following prerequisites:

  • .NET 8.0 SDK or later
  • An ONNX model downloaded to your machine

You can download an ONNX model from hugging face, using git clone:

git clone https://huggingface.co/microsoft/Phi-4-mini-instruct-onnx

Set the following environment variables:

$env:ONNX_MODEL_PATH="C:\repos\Phi-4-mini-instruct-onnx\cpu_and_mobile\cpu-int4-rtn-block-32-acc-level-4" # Replace with your model path