Compare commits

..

No commits in common. "feat/en-version" and "main" have entirely different histories.

4 changed files with 4 additions and 47 deletions

View File

@ -39,7 +39,7 @@ namespace ChatApi
else
{
var msg = new List<ChatMessageContent>();
PromptEn(msg);
PromptLiliana(msg);
string json = JsonSerializer.Serialize(msg);
var history = new ChatHistory(JsonSerializer.Deserialize<List<ChatMessageContent>>(json));
_keyValues[sessionId] = history;
@ -58,17 +58,5 @@ 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."));
}
}
}

View File

@ -89,24 +89,6 @@ namespace ChatApi.Controllers
}
}
[HttpPost]
[Route("savetexts")]
public async Task<IActionResult> SaveTexts([FromBody] List<TextRequest> requests)
{
try
{
foreach(var request in requests)
{
await _textData.SalvarNoMongoDB(request.Id, request.Title, request.Content, request.ProjectId);
}
return Created();
}
catch (Exception ex)
{
return StatusCode(500, ex.Message);
}
}
[HttpGet]
[Route("texts")]
public async Task<IEnumerable<TextResponse>> GetTexts()

View File

@ -49,20 +49,7 @@ 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}\"";
// 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);
question = $"Para responder à solicitação/pergunta: \"{question }\" por favor, considere o projeto: \"{project}\" e os requisitos: \"{resposta}\"";
ChatHistory history = _chatHistoryService.GetSumarizer(sessionId);
history.AddUserMessage(question);

View File

@ -1,9 +1,9 @@
{
"DomvsDatabase": {
"ConnectionString": "mongodb://admin:c4rn31r0@k3sw2:27017,k3ss1:27017/?authSource=admin",
"DatabaseName": "RAGProjects-dev-en",
"DatabaseName": "RAGProjects-dev",
"TextCollectionName": "Texts",
"ProjectCollectionName": "Groups",
"ProjectCollectionName": "Projects",
"UserDataName": "UserData"
},
"Logging": {