Skip to content

Commit

Permalink
Merge pull request #35 from DevoteamNL/feat/cv-plugin
Browse files Browse the repository at this point in the history
Updates CV Index
  • Loading branch information
hardik-id authored Mar 15, 2024
2 parents 9ada948 + 4c8a531 commit 53f9a4f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion helm-charts/dev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ configMapValues:
REDIRECT_URL: "http://localhost:3000/"
JWT_EXPIRES_IN: "30d"
AZURE_SEARCH_ENDPOINT: "https://inficonnectsearchservice.search.windows.net"
AZURE_SEARCH_INDEX_NAME: "cv-index"
AZURE_SEARCH_INDEX_NAME: "cv-chunks"
SPREADSHEET_ID: "1jNlPiF1nYwBn879ShvtoUfTznfrEf5QcU5b8sz_w5Ps"
DOMAIN_ID: "devoteam.com"
EMAIL_SENDER: "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ configMapValues:
REDIRECT_URL: "http://localhost:3000/"
JWT_EXPIRES_IN: "30d"
AZURE_SEARCH_ENDPOINT: "https://inficonnectsearchservice.search.windows.net"
AZURE_SEARCH_INDEX_NAME: "cv-index"
AZURE_SEARCH_INDEX_NAME: "cv-chunks"
SPREADSHEET_ID: "1jNlPiF1nYwBn879ShvtoUfTznfrEf5QcU5b8sz_w5Ps"
DOMAIN_ID: "devoteam.com"
EMAIL_SENDER: "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion src/googledrive/googledrive.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class GoogledriveService {
});

await Promise.all(promises);
await new Promise((resolve) => setTimeout(resolve, 90000)); // Wait for 90 seconds
await new Promise((resolve) => setTimeout(resolve, 20000)); // Wait for 90 seconds
}

return fileContents;
Expand Down
12 changes: 7 additions & 5 deletions src/plugin/plugins/cv.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class CVsPlugin {
parameters: {
type: 'object',
properties: {
query: {
completeUserMessage: {
type: 'string',
description:
'Complete User message or query/question which will be used for vector similarity search',
Expand All @@ -37,17 +37,19 @@ if you don't find answer within context, say it do not know the answer.`,
followUpModel: 'gpt-4',
})
private async getEmployeesWorkDetails({
query,
completeUserMessage,
}: {
query: string;
completeUserMessage: string;
}): Promise<string> {
this.logger.log(
`Getting employees professional work experience details based on a ${query}`,
`Getting employees professional work experience details based on : ${completeUserMessage}`,
);
try {
// const response = await this.httpService.get(url).toPromise();
const searchResults =
await this.cognitiveSearchService.doSemanticHybridSearch(query);
await this.cognitiveSearchService.doSemanticHybridSearch(
completeUserMessage,
);
return searchResults.join('\n');
} catch (error) {
this.logger.error(error);
Expand Down

0 comments on commit 53f9a4f

Please sign in to comment.