Skip to content

Commit

Permalink
fix(all): Libraries update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Rodriguez committed May 27, 2024
1 parent 1173233 commit cebb6b4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Binary file removed logo.png
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"typescript": "5.4.5",
"url-join": "5.0.0",
"vhost": "3.0.2",
"vm2": "3.9.11",
"vm2": "3.9.19",
"vm2-process": "2.1.5",
"walk-promise": "0.2.0",
"washyourmouthoutwithsoap": "1.0.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/core.gbapp/services/GBDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,14 @@ export class GBDeployer implements IGBDeployer {
azureOpenAIApiVersion: azureOpenAIVersion,
azureOpenAIApiInstanceName: azureOpenAIApiInstanceName
});

try {
vectorStore = await HNSWLib.load(min['vectorStorePath'], embedding);
} catch {
vectorStore = new HNSWLib(embedding, {
space: 'cosine',
numDimensions: 1536
space: 'cosine'
});

}
return vectorStore;
}
Expand Down
5 changes: 1 addition & 4 deletions packages/kb.gbapp/services/KBService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,6 @@ export class KBService implements IGBKBService {
({ currentDomain, websiteIgnoreUrls }) => {
const anchors = Array.from(document.querySelectorAll('a')).filter(p => {
try {

return currentDomain == new URL(p.href).hostname.toLocaleLowerCase();
} catch (err) {
return false;
Expand Down Expand Up @@ -1024,12 +1023,10 @@ export class KBService implements IGBKBService {
const websiteIgnoreUrls = min.core.getParam<string>(min.instance, 'Website Ignore URLs', null);

if (website) {

// Removes last slash if any.

website =website.replace(/\/(?=[^\/]*$)/, "");
website = website.replace(/\/(?=[^\/]*$)/, '');

Fs.rmSync(min['vectorStorePath'], { recursive: true, force: true });
let path = DialogKeywords.getGBAIPath(min.botId, `gbot`);
const directoryPath = Path.join(process.env.PWD, 'work', path, 'Website');
Fs.rmSync(directoryPath, { recursive: true, force: true });
Expand Down

0 comments on commit cebb6b4

Please sign in to comment.