TypeScript Types
Complete TypeScript reference for every interface, type, and function exported by Orka AI.
Core Interfaces
interface LLMAdapter { readonly name: string; generate(prompt: string, options?: LLMGenerateOptions): Promise<LLMResult>; embed(text: string | string[]): Promise<number[][]>;} interface VectorDBAdapter { readonly name: string; createCollection(name: string, options?: CreateCollectionOptions): Promise<void>; deleteCollection(name: string): Promise<void>; upsert(collection: string, vectors: VectorRecord[]): Promise<void>; search(collection: string, vector: number[], options?: VectorSearchOptions): Promise<VectorSearchResult[]>; delete(collection: string, ids: string[]): Promise<void>;} interface AskResult { answer: string; context?: RetrievedContext[]; usage: { promptTokens: number; completionTokens: number; totalTokens: number }; latencyMs: number;}Exported Functions
| Function | Description |
|---|---|
createOrka(config) | Create an Orka instance |
plan(), retrieve(), generate(), verify(), improve() | Workflow steps |
startNode(), endNode(), actionNode(), conditionNode() | Graph nodes |
withRetry(fn, options) | Retry with exponential backoff |
minScore(), maxScore(), maxLatency(), contains() | Test assertions |
Adapters
OpenAIAdapterGPT-4o, embeddings
AnthropicAdapterClaude 3.5 Sonnet
MistralAdapterMistral AI models
OllamaAdapterLocal models
MemoryVectorAdapterIn-memory vector store
PineconeAdapterPinecone cloud
QdrantAdapterQdrant vector DB
ChromaAdapterChromaDB
💡 Full Types
Orka AI exports full TypeScript declarations. Your IDE will autocomplete all interfaces, types, and function signatures.