1
2
3
4
5
6
7
8
9
10
import { getVectorStoreBuilder } from "https://esm.town/v/webup/getVectorStoreBuilder";
import { getSampleDocuments } from "https://esm.town/v/webup/getSampleDocuments";
export const vectorStoreSampleMemory = (async () => {
const docs = await getSampleDocuments();
const builder = await getVectorStoreBuilder(docs);
const store = await builder();
const found = await store.similaritySearch("pinecone", 1);
return found?.[0]?.pageContent;
})();
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023