File tree 2 files changed +12
-2
lines changed
src/Libraries/Microsoft.Extensions.AI
test/Libraries/Microsoft.Extensions.AI.Ollama.Tests
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -83,3 +83,12 @@ Optionally also run the following. The values shown here are the defaults if you
83
83
dotnet user-secrets set AzureAIInference:ChatModel gpt-4o-mini
84
84
dotnet user-secrets set AzureAIInference:EmbeddingModel text-embedding-3-small
85
85
```
86
+
87
+ ### Configuring Ollama tests
88
+
89
+ Run commands like the following. The settings will be saved in your user profile.
90
+
91
+ ```
92
+ cd test/Libraries/Microsoft.Extensions.AI.Integration.Tests
93
+ dotnet user-secrets set Ollama:Endpoint http://localhost:11434/
94
+ ```
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ internal static class IntegrationTestHelpers
13
13
/// <summary>Gets a <see cref="Uri"/> to use for testing, or null if the associated tests should be disabled.</summary>
14
14
public static Uri ? GetOllamaUri ( )
15
15
{
16
- // return new Uri("http://localhost:11434");
17
- return null ;
16
+ return TestRunnerConfiguration . Instance [ "Ollama:Endpoint" ] is string endpoint
17
+ ? new Uri ( endpoint )
18
+ : null ;
18
19
}
19
20
}
You can’t perform that action at this time.
0 commit comments