Public Access
Handle settings logs agent failures
PR and Push Build/Test / build-and-test (push) Successful in 9m8s
PR and Push Build/Test / build-and-test (push) Successful in 9m8s
This commit is contained in:
@@ -126,12 +126,14 @@ public sealed class LiteLlmResponsesChatClientTests
|
||||
}
|
||||
""")
|
||||
});
|
||||
using var client = CreateClient(handler, reconnectionAttempts: 1);
|
||||
var retryCount = 0;
|
||||
using var client = CreateClient(handler, reconnectionAttempts: 1, retrying: () => retryCount++);
|
||||
|
||||
var response = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "write summary")]);
|
||||
|
||||
Assert.Equal("Done.", response.Text);
|
||||
Assert.Equal(2, handler.RequestCount);
|
||||
Assert.Equal(1, retryCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -303,7 +305,8 @@ public sealed class LiteLlmResponsesChatClientTests
|
||||
private static LiteLlmResponsesChatClient CreateClient(
|
||||
HttpMessageHandler handler,
|
||||
int reconnectionAttempts,
|
||||
LiteLlmResponsesCompactionOptions? compactionOptions = null)
|
||||
LiteLlmResponsesCompactionOptions? compactionOptions = null,
|
||||
Action? retrying = null)
|
||||
{
|
||||
return new LiteLlmResponsesChatClient(
|
||||
new HttpClient(handler)
|
||||
@@ -316,7 +319,8 @@ public sealed class LiteLlmResponsesChatClientTests
|
||||
reasoningEffort: "none",
|
||||
reconnectionAttempts,
|
||||
TimeSpan.Zero,
|
||||
compactionOptions);
|
||||
compactionOptions,
|
||||
retrying: retrying);
|
||||
}
|
||||
|
||||
private sealed class SequencedHttpMessageHandler : HttpMessageHandler
|
||||
|
||||
Reference in New Issue
Block a user