feat: en-version
This commit is contained in:
parent
8f4c8ad1af
commit
63b455dc34
@ -39,7 +39,7 @@ namespace ChatApi
|
||||
else
|
||||
{
|
||||
var msg = new List<ChatMessageContent>();
|
||||
PromptLiliana(msg);
|
||||
PromptEn(msg);
|
||||
string json = JsonSerializer.Serialize(msg);
|
||||
var history = new ChatHistory(JsonSerializer.Deserialize<List<ChatMessageContent>>(json));
|
||||
_keyValues[sessionId] = history;
|
||||
@ -58,5 +58,17 @@ namespace ChatApi
|
||||
msg.Add(new ChatMessageContent(AuthorRole.System, "Você responde sempre em português do Brasil e fala sobre detalhes de projeto, arquitetura e criação de casos de teste."));
|
||||
msg.Add(new ChatMessageContent(AuthorRole.User, "Use sempre portugues do Brasil."));
|
||||
}
|
||||
|
||||
public void PromptEn(List<ChatMessageContent> msg)
|
||||
{
|
||||
msg.Add(new ChatMessageContent(AuthorRole.System, "You are an expert software analyst and QA professional."));
|
||||
msg.Add(new ChatMessageContent(AuthorRole.System, "Please provide a comprehensive response in English. Consider the project context and requirements above to generate accurate and relevant information."));
|
||||
msg.Add(new ChatMessageContent(AuthorRole.System, "If you have test case requests: Use Gherkin format (Given-When-Then) with realistic scenarios covering happy path, edge cases, and error handling."));
|
||||
msg.Add(new ChatMessageContent(AuthorRole.System, "If you have project summaries: Include objectives, key features, technologies, and main challenges."));
|
||||
msg.Add(new ChatMessageContent(AuthorRole.System, "If you have a task list request for one developer: Organize tasks by priority and estimated effort for a single developer, including technical dependencies."));
|
||||
msg.Add(new ChatMessageContent(AuthorRole.System, "If you have a task list request for more than one developer: Organize tasks by priority and estimated effort for a every developer, including technical dependencies."));
|
||||
//msg.Add(new ChatMessageContent(AuthorRole.User, "Use sempre portugues do Brasil."));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,20 @@ namespace ChatRAG.Services.ResponseService
|
||||
|
||||
var project = $"Nome: {projectData.Nome} \n\n Descrição:{projectData.Descricao}";
|
||||
|
||||
question = $"Para responder à solicitação/pergunta: \"{question }\" por favor, considere o projeto: \"{project}\" e os requisitos: \"{resposta}\"";
|
||||
//question = $"Para responder à solicitação/pergunta: \"{question}\" por favor, considere o projeto: \"{project}\" e os requisitos: \"{resposta}\"";
|
||||
// Base prompt template
|
||||
string basePrompt = @"You are an expert software analyst and QA professional.
|
||||
|
||||
Project Context: {0}
|
||||
Requirements: {1}
|
||||
|
||||
User Request: ""{2}""
|
||||
|
||||
Please answer the question above from User Request with a comprehensive response in English. Consider the project context and requirements above to generate accurate and relevant information.";
|
||||
|
||||
// Usage
|
||||
question = string.Format(basePrompt, project, resposta, question);
|
||||
|
||||
ChatHistory history = _chatHistoryService.GetSumarizer(sessionId);
|
||||
|
||||
history.AddUserMessage(question);
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{
|
||||
"DomvsDatabase": {
|
||||
"ConnectionString": "mongodb://admin:c4rn31r0@k3sw2:27017,k3ss1:27017/?authSource=admin",
|
||||
"DatabaseName": "RAGProjects-dev",
|
||||
"DatabaseName": "RAGProjects-dev-en",
|
||||
"TextCollectionName": "Texts",
|
||||
"ProjectCollectionName": "Projects",
|
||||
"ProjectCollectionName": "Groups",
|
||||
"UserDataName": "UserData"
|
||||
},
|
||||
"Logging": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user