Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Libraries/Microsoft.Extensions.AI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,12 @@ Optionally also run the following. The values shown here are the defaults if you
dotnet user-secrets set AzureAIInference:ChatModel gpt-4o-mini
dotnet user-secrets set AzureAIInference:EmbeddingModel text-embedding-3-small
```

### Configuring Ollama tests

Run commands like the following. The settings will be saved in your user profile.

```
cd test/Libraries/Microsoft.Extensions.AI.Integration.Tests
dotnet user-secrets set Ollama:Endpoint http://localhost:11434/
```
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ internal static class IntegrationTestHelpers
/// <summary>Gets a <see cref="Uri"/> to use for testing, or null if the associated tests should be disabled.</summary>
public static Uri? GetOllamaUri()
{
// return new Uri("http://localhost:11434");
return null;
return TestRunnerConfiguration.Instance["Ollama:Endpoint"] is string endpoint
? new Uri(endpoint)
: null;
}
}