Get or generate embedding with content-addressable caching
Checks if an embedding with the same contentHash already exists. If yes, increments usage count and returns cached embedding. If no, generates new embedding and stores in cache.
Hash of embedding text
Text to embed
SurrealDB instance
Embedding vector
Get or generate embedding with content-addressable caching
Checks if an embedding with the same contentHash already exists. If yes, increments usage count and returns cached embedding. If no, generates new embedding and stores in cache.