Added a chat role called RAG

This commit is contained in:
Thorsten Sommer 2025-02-17 22:31:32 +01:00
parent f01cf498e2
commit 42d1e8fb9d
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
9 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,7 @@ public enum ChatRole
USER,
AI,
AGENT,
RAG,
}
/// <summary>

View File

@ -37,6 +37,7 @@ public sealed class ProviderAnthropic(ILogger logger) : BaseProvider("https://ap
ChatRole.USER => "user",
ChatRole.AI => "assistant",
ChatRole.AGENT => "assistant",
ChatRole.RAG => "assistant",
_ => "user",
},

View File

@ -49,6 +49,7 @@ public class ProviderFireworks(ILogger logger) : BaseProvider("https://api.firew
ChatRole.AI => "assistant",
ChatRole.AGENT => "assistant",
ChatRole.SYSTEM => "system",
ChatRole.RAG => "assistant",
_ => "user",
},

View File

@ -50,6 +50,7 @@ public class ProviderGoogle(ILogger logger) : BaseProvider("https://generativela
ChatRole.AI => "assistant",
ChatRole.AGENT => "assistant",
ChatRole.SYSTEM => "system",
ChatRole.RAG => "assistant",
_ => "user",
},

View File

@ -50,6 +50,7 @@ public class ProviderGroq(ILogger logger) : BaseProvider("https://api.groq.com/o
ChatRole.AI => "assistant",
ChatRole.AGENT => "assistant",
ChatRole.SYSTEM => "system",
ChatRole.RAG => "assistant",
_ => "user",
},

View File

@ -48,6 +48,7 @@ public sealed class ProviderMistral(ILogger logger) : BaseProvider("https://api.
ChatRole.AI => "assistant",
ChatRole.AGENT => "assistant",
ChatRole.SYSTEM => "system",
ChatRole.RAG => "assistant",
_ => "user",
},

View File

@ -76,6 +76,7 @@ public sealed class ProviderOpenAI(ILogger logger) : BaseProvider("https://api.o
ChatRole.USER => "user",
ChatRole.AI => "assistant",
ChatRole.AGENT => "assistant",
ChatRole.RAG => "assistant",
ChatRole.SYSTEM => systemPromptRole,
_ => "user",

View File

@ -46,6 +46,7 @@ public sealed class ProviderSelfHosted(ILogger logger, Host host, string hostnam
ChatRole.AI => "assistant",
ChatRole.AGENT => "assistant",
ChatRole.SYSTEM => "system",
ChatRole.RAG => "assistant",
_ => "user",
},

View File

@ -50,6 +50,7 @@ public sealed class ProviderX(ILogger logger) : BaseProvider("https://api.x.ai/v
ChatRole.AI => "assistant",
ChatRole.AGENT => "assistant",
ChatRole.SYSTEM => "system",
ChatRole.RAG => "assistant",
_ => "user",
},