Skip to content

Commit

Permalink
Merge pull request #33 from AgrI-Mitra/hotfix/lang-detection-failure
Browse files Browse the repository at this point in the history
Improved logs
  • Loading branch information
Amruth-Vamshi authored Nov 22, 2024
2 parents 21d070a + fba877f commit 41de348
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/aiTools/ai-tools.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export class AiToolsService {
});
let endDate = new Date();
response = await response.json()
console.log(`${endDate}: userId: ${userId} sessionId: ${sessionId} Responded succesfully in ${endDate.getTime()-startDate.getTime()} ms.`)
console.log(`${endDate}: userId: ${userId} sessionId: ${sessionId} URL: ${this.configService.get("WADHWANI_BASE_URL")}/get_bot_response?query=${text}&user_id=${userId}&session_id=${sessionId} Responded succesfully in ${endDate.getTime()-startDate.getTime()} ms.`)
return response
} catch(error){
console.log(error)
Expand Down Expand Up @@ -343,7 +343,7 @@ export class AiToolsService {
}
let endDate = new Date();
response = await response.json()
console.log(`${endDate}: userId: ${userId} sessionId: ${sessionId} Responded succesfully in ${endDate.getTime()-startDate.getTime()} ms.`)
console.log(`${endDate}: userId: ${userId} sessionId: ${sessionId} URL: ${this.configService.get("ULCA_CONFIG_URL")} (config API) Responded succesfully in ${endDate.getTime()-startDate.getTime()} ms.`)
this.monitoringService.incrementBhashiniSuccessCount()
await this.cacheManager.set(cacheKey, response, 86400);
return response
Expand Down Expand Up @@ -407,7 +407,7 @@ export class AiToolsService {
}
let endDate = new Date();
response = await response.json()
console.log(`${endDate}: userId: ${userId} sessionId: ${sessionId} Responded succesfully in ${endDate.getTime()-startDate.getTime()} ms.`)
console.log(`${endDate}: userId: ${userId} sessionId: ${sessionId} URL: ${url} for task (${task}) Responded succesfully in ${endDate.getTime()-startDate.getTime()} ms.`)
this.monitoringService.incrementBhashiniSuccessCount()
if(task != 'asr') {
await this.cacheManager.set(cacheKey, response, 7200);
Expand Down

0 comments on commit 41de348

Please sign in to comment.