You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to perform some operations on the CompletedResponseGenerated events, but I noticed that this event occurs twice. When I was examining the source code, I couldn't understand why the OnCompletedResponseGenerated method is being called twice.
Help me understand if this behavior is expected?
Steps to reproduce the bug
static async Task Main(string[] args)
{
Console.WriteLine("Welcome to LangChain .NET");
var provider = new BedrockProvider(RegionEndpoint.USEast1);
var llm = new Claude3SonnetModel(provider)
{
Settings = new BedrockChatSettings
{
UseStreaming = true
}
};
llm.PromptSent += (_, prompt) => Console.WriteLine($"Prompt: {prompt}");
llm.PartialResponseGenerated += (_, delta) => Console.Write(delta);
llm.CompletedResponseGenerated += (_, prompt) => Console.WriteLine($"Completed response: {prompt}");
var prompt = @"
Who was the President of the United States in the year 2000? Just give me answer, no explaination";
var response = await llm.GenerateAsync(prompt);
Console.Read();
}
Expected behavior
No response
Screenshots
NuGet package version
0.15.0
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
I want to perform some operations on the CompletedResponseGenerated events, but I noticed that this event occurs twice. When I was examining the source code, I couldn't understand why the OnCompletedResponseGenerated method is being called twice.
Help me understand if this behavior is expected?
Steps to reproduce the bug
Expected behavior
No response
Screenshots
NuGet package version
0.15.0
Additional context
No response
The text was updated successfully, but these errors were encountered: