Skip to content

Commit

Permalink
Merge branch 'dotnet-dev' of https://github.com/microsoft/teams-ai in…
Browse files Browse the repository at this point in the history
…to dotnet-dev
  • Loading branch information
singhk97 committed Dec 10, 2024
2 parents 0e3ce84 + bc4c3a5 commit f40dbc9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ public async Task Test_CompletePromptAsync_PromptResponse_NotSuccess()
LLMClientOptions<object> options = new(promptCompletionModel, promptTemplate) { MaxHistoryMessages = 1 };
LLMClient<object> client = new(options, null);
TestMemory memory = new();
ChatMessage message = new ChatMessage("Hi there");
promptCompletionModel.Results.Enqueue(new()
{
Input = new List<ChatMessage>() { message },
Status = PromptResponseStatus.Error,
Error = new TeamsAIException("test")
});
Expand All @@ -113,7 +115,10 @@ public async Task Test_CompletePromptAsync_PromptResponse_NotSuccess()
Assert.Equal(PromptResponseStatus.Error, response.Status);
Assert.NotNull(response.Error);
Assert.Equal("test", response.Error.Message);
Assert.Empty(memory.Values);
Assert.Single(memory.Values);

IList<ChatMessage> conversation_history = (IList<ChatMessage>)memory.GetValue("conversation.history")!;
Assert.True(conversation_history[0].Content == message.Content);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<PackageReference Include="AdaptiveCards" Version="3.1.0" />
<PackageReference Include="Azure.AI.ContentSafety" Version="1.0.0" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0-beta.1" />
<PackageReference Include="JsonSchema.Net" Version="5.5.1" />
<PackageReference Include="JsonSchema.Net" Version="6.1.2" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.9" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.9" />
Expand Down

0 comments on commit f40dbc9

Please sign in to comment.