Skip to content

Instantly share code, notes, and snippets.

@tonyOreglia
Created April 26, 2023 14:59
Show Gist options
  • Select an option

  • Save tonyOreglia/4c5434db8e38379599fb3b009ad75542 to your computer and use it in GitHub Desktop.

Select an option

Save tonyOreglia/4c5434db8e38379599fb3b009ad75542 to your computer and use it in GitHub Desktop.
import { ChromaClient } from 'chromadb';
export const handler = async (event: APIGatewayEvent) => {
// ... ommitted
const client = new ChromaClient(CHROMADB_BASE_PATH);
const collection = await client.getCollection(userUuid);
const result = await collection.query(queryVector, 3);
const relevantEntryIds = result.ids[0];
// ... ommitted
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment