[ACS-8398] Unit tests for agents and search ai (#9974)

* ACS-8398 Unit tests for search ai api and agents api

* ACS-8398 Unit tests for getAnswer function from SearchAiApi, corrections for unit tests for SearchAiApi and AgentsApi

* ACS-8398 Unit tests for SearchAiService and AgentService
This commit is contained in:
AleksanderSklorz
2024-07-22 15:56:28 +02:00
committed by Aleksander Sklorz
parent ad9c1a0ce0
commit 16e851e6b5
8 changed files with 648 additions and 3 deletions

View File

@@ -33,9 +33,9 @@ export class SearchAiApi extends BaseApi {
ask(questions: QuestionRequest[]): Promise<QuestionModel[]> {
return this.get({
path: 'questions',
bodyParam: questions.map((question) => ({
...question,
restrictionQuery: question.nodeIds.join(',')
bodyParam: questions.map((questionRequest) => ({
question: questionRequest.question,
restrictionQuery: questionRequest.nodeIds.join(',')
}))
});
}