Skip to content

Commit

Permalink
added AI into the demo catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
boyney123 committed Feb 25, 2025
1 parent 08597a5 commit 1f15184
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ const ChatWindow = ({ catalogPath }: { catalogPath: string }) => {
// @ts-ignore
vectorWorker.onmessage = async (event) => {
if (event.data.action === 'search-results') {
console.log('Results', event?.data?.results);

const qaPrompt = `\n".
You are an expert in the domain of software architecture.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ self.onmessage = async (event) => {
if (event?.data?.init && !documents && !embeddings) {
const documentsImport = await import(/* @vite-ignore */ `${event.data.catalogPath}/generated-ai/documents.json`);
const embeddingsImport = await import(/* @vite-ignore */ `${event.data.catalogPath}/generated-ai/embeddings.json`);

console.log('Loading documents and embeddings');
console.log(documentsImport);
console.log(embeddingsImport);

documents = documentsImport.default;
embeddings = embeddingsImport.default;
await vectorStore.addVectors(embeddings, documents);
Expand Down

0 comments on commit 1f15184

Please sign in to comment.