mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:27:21 +00:00
Refused JSON contracts built by reflection and checked all of them in the trimmed build (#1152)
This commit is contained in:
1 parent
f864359290
commit
0b42c0288e
23 files changed
+535
-99
No files matched your search
@@ -25,11 +25,6 @@ namespace AIStudio.Tests.Provider;
|
||||
[TestFixture]
|
||||
public sealed class SelfHostedModelListTests
|
||||
{
|
||||
private static readonly JsonSerializerOptions AS_THE_PROVIDERS_READ_IT = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// What "GET /v1/models" answers on a local Ollama, shortened to the fields it sends.
|
||||
/// </summary>
|
||||
@@ -51,7 +46,7 @@ public sealed class SelfHostedModelListTests
|
||||
|
||||
private static IReadOnlyList<Model> TheModelsTheEngineListed()
|
||||
{
|
||||
var response = JsonSerializer.Deserialize<SelfHostedModelsResponse>(WHAT_A_LOCAL_OLLAMA_ANSWERS, AS_THE_PROVIDERS_READ_IT);
|
||||
var response = JsonSerializer.Deserialize<SelfHostedModelsResponse>(WHAT_A_LOCAL_OLLAMA_ANSWERS, ProviderJsonOptions.OPTIONS);
|
||||
Assert.That(response.Data, Is.Not.Null, "The answer has to be readable before anything can be sorted out of it.");
|
||||
|
||||
return response.Data!
|
||||
|
||||
Reference in new issue
Block a user