| Function | Description |
|---|
createEmbedder(config) | Create an embedder for generating vectors |
createEmbeddingConfig(options) | Create embedding configuration |
Embedder interface:
| Method | Description |
|---|
embed(text: string) | Generate a single vector |
embedBatch(texts: string[]) | Generate vectors for multiple texts |
| Function | Description |
|---|
createVectorStore(config) | Create a vector store instance |
createVectorStoreConfig(options) | Create vector store configuration |
VectorStore interface:
| Method | Description |
|---|
upsert(items) | Insert or update vectors |
query(vector, options) | Query similar vectors |
| Function | Description |
|---|
createRagPipeline(config) | Create a RAG pipeline |
createRagConfig(options) | Create RAG configuration |
chunkText(text, options) | Split text into chunks |
RagPipeline interface:
| Method | Description |
|---|
ingest(chunks) | Ingest document chunks |
retrieve(query, options) | Retrieve relevant context |
| Function | Description |
|---|
createAgent(config) | Create an AI agent |
createAgentConfig(options) | Create agent configuration |
defineTool(definition) | Define a tool for agent use |
Agent interface:
| Method | Description |
|---|
run(prompt) | Run the agent with a user prompt |
AI-related types are exported from ./types/index.js, including embedding configs, vector store configs, RAG configs, agent configs, and tool definitions.
| Constant | Description |
|---|
DEFAULT_EMBEDDING_CONFIG | Default embedding configuration |
DEFAULT_VECTOR_STORE_CONFIG | Default vector store configuration |
DEFAULT_RAG_CONFIG | Default RAG configuration |
DEFAULT_AGENT_CONFIG | Default agent configuration |