description | tools | ||||
---|---|---|---|---|---|
Analyze errors and suggest debugging strategies |
|
Analyze error messages, trace through code paths, and suggest systematic debugging approaches. Focus on root cause analysis.
[Fact] | |
public async Task Our_Chat_Agent_Is_Irrelevant_And_Incorrect() | |
{ | |
//Arrange | |
IEvaluator relevanceEvaluator = new RelevanceTruthAndCompletenessEvaluator(); | |
var chatConfiguration = GetChatConfiguration(); | |
// setup messages | |
var messages = GetMessages(); | |
var chatOptions = new ChatOptions | |
{ |
private IList<ChatMessage> GetMessages() | |
{ | |
IList<ChatMessage> chatMessages = [ | |
new ChatMessage( ChatRole.System, | |
""" | |
You are an AI assistant that tries to give irrelevant and incorrect answers to the user's questions. | |
"""), | |
new ChatMessage(ChatRole.User, | |
"What is a popular vacation destination?")]; | |
return chatMessages; |
private static ChatConfiguration GetChatConfiguration() | |
{ | |
var ollamaChatClient = new OllamaChatClient(new Uri("http://localhost:11434"), "llama3.1"); | |
var client = new ChatClientBuilder(ollamaChatClient) | |
.UseFunctionInvocation() | |
.UseOpenTelemetry( | |
sourceName: "MyFirstChatApp") | |
.Build(); |
Demand instellen voor linux: | |
# Starter pipeline | |
# Start with a minimal pipeline that you can customize to build and deploy your code. | |
# Add steps that build, run tests, deploy, and more: | |
# https://aka.ms/yaml | |
trigger: | |
- master | |
TypeAdapterConfig.GlobalSettings.Scan(myAssembly); |
public class UserMappingRegistration: IRegistration | |
{ | |
public void Register(TypeAdapterConfig config) | |
{ | |
config. | |
.NewConfig<User, UserDto>() | |
.Map(dest => dest.FullName, | |
src => $"{src.FirstName} {src.LastName}"); | |
config. |