Skip to content

Commit

Permalink
feat(core): added ai functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
boyney123 committed Feb 25, 2025
1 parent aa6ead7 commit 2ee1b0c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ const ChatWindow = ({ catalogPath }: { catalogPath: string }) => {
role: msg.isUser ? 'user' : 'assistant',
content: msg.content,
})),
// {
// role: "system",
// content: cachedLLMsText
// },
{
role: 'user',
content: inputValue,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import { HuggingFaceTransformersEmbeddings } from '@langchain/community/embeddings/huggingface_transformers';
import { MemoryVectorStore } from 'langchain/vectorstores/memory';

// import documents from '@ai/documents.json';
// import embeddings from '@ai/embeddings.json';

// import documents from '/Users/dboyne/Dev/eventcatalog/eventcatalog/examples/default/generated-ai/documents.json';

// const documents = [];
// const embeddings = [];

const embeddingsInstance = new HuggingFaceTransformersEmbeddings({ model: 'Xenova/all-MiniLM-L6-v2' });

// Create the vector store
const vectorStore = new MemoryVectorStore(embeddingsInstance);
// Hydrate the vector store

let documents: any;
let embeddings: any;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { WebWorkerMLCEngineHandler } from '@mlc-ai/web-llm';

// TypeScript declaration for self in Web Worker context
// @ts-ignore
declare const self: DedicatedWorkerGlobalScope;

// Hookup an Engine to a worker handler
const handler = new WebWorkerMLCEngineHandler();
self.onmessage = (msg: MessageEvent) => {
Expand Down

0 comments on commit 2ee1b0c

Please sign in to comment.