last ...
This commit is contained in:
@@ -1342,23 +1342,28 @@ namespace xAiApi.Providers
|
||||
|
||||
//
|
||||
var contextBlock = BuildContextBlock(context);
|
||||
var systemText =
|
||||
$"{introductionPrompt}{Environment.NewLine}{Environment.NewLine}" +
|
||||
$"{ragPrompt}{Environment.NewLine}{Environment.NewLine}" +
|
||||
$"Context:{Environment.NewLine}{contextBlock}";
|
||||
var systemText = introductionPrompt;
|
||||
if (context.HasChild() &&
|
||||
!contextBlock.IsNullOrEmpty())
|
||||
{
|
||||
//
|
||||
systemText =
|
||||
$"{introductionPrompt}{Environment.NewLine}{Environment.NewLine}" +
|
||||
$"{ragPrompt}{Environment.NewLine}{Environment.NewLine}" +
|
||||
$"Context:{Environment.NewLine}{contextBlock}";
|
||||
}
|
||||
|
||||
//
|
||||
// Apply Project Prompt as System Text ...
|
||||
if (!project.IsNullOrDefault() &&
|
||||
!project.Prompt.IsNullOrEmpty())
|
||||
{
|
||||
systemText += $"Project:{Environment.NewLine}{project.Prompt}";
|
||||
systemText += $"{project.Prompt}{Environment.NewLine}";
|
||||
}
|
||||
|
||||
//
|
||||
// Add System Message ...
|
||||
result
|
||||
.Add(new ChatMessage(ChatRole.System, systemText));
|
||||
result.Add(new ChatMessage(ChatRole.System, systemText));
|
||||
|
||||
//
|
||||
// Attach Message ...
|
||||
|
||||
Reference in New Issue
Block a user