Skip to content

Commit

Permalink
Merge branch 'main' into lilyydu/data-srcs-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyydu committed Jan 22, 2024
2 parents 605c2a3 + 1cb2575 commit ec79fd3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public async Task Test_CompletePromptAsync_PromptResponse_Repair_ExceedMaxRepair
Assert.NotNull(response);
Assert.Equal(PromptResponseStatus.InvalidResponse, response.Status);
Assert.NotNull(response.Error);
Assert.Equal("The response was invalid. Try another strategy.", response.Error.Message);
Assert.Equal("Reached max model response repair attempts. Last feedback given to model: \"The response was invalid. Try another strategy.\"", response.Error.Message);
Assert.Equal(1, memory.Values.Count);
Assert.Equal("hello", memory.Values[options.InputVariable]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ CancellationToken cancellationToken
return new()
{
Status = PromptResponseStatus.InvalidResponse,
Error = new(feedback ?? "The response was invalid. Try another strategy.")
Error = new($"Reached max model response repair attempts. Last feedback given to model: \"{feedback}\"")
};
}

Expand Down
4 changes: 3 additions & 1 deletion js/packages/teams-ai/src/planners/LLMClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ export class LLMClient<TContent = any> {
return {
status: 'invalid_response',
input: undefined,
error: new Error(validation.feedback ?? 'The response was invalid. Try another strategy.')
error: new Error(
`Reached max model response repair attempts. Last feedback given to model: "${feedback}"`
)
};
}

Expand Down

0 comments on commit ec79fd3

Please sign in to comment.