/** * graphile-llm — LLM Integration Plugin for PostGraphile v5 * * Server-side text-to-vector embedding, text companion fields for pgvector * columns, and RAG (Retrieval-Augmented Generation) query support. * * Moves the embedding logic from the client (CLI --auto-embed) into the * Graphile server layer so clients work with text/prompts instead of raw * float vectors. * * @example * ```typescript * import { GraphileLlmPreset } from 'graphile-llm'; * * const preset = { * extends: [ * GraphileLlmPreset({ * defaultEmbedder: { * provider: 'ollama', * model: 'nomic-embed-text', * }, * defaultChatCompleter: { * provider: 'ollama', * model: 'llama3', * }, * enableRag: true, * }), * ], * }; * ``` */ export type { LlmEnvOptions, LlmProviderConfig, ResolvedLlmEnvOptions } from './env'; export { getEnvOptions, getEnvVars, getLlmEnvOptions, llmDefaults } from './env'; export { GraphileLlmPreset } from './preset'; export { createLlmModulePlugin } from './plugins/llm-module-plugin'; export { createLlmRagPlugin } from './plugins/rag-plugin'; export { createLlmTextMutationPlugin } from './plugins/text-mutation-plugin'; export { createLlmTextSearchPlugin, embedTextInWhere } from './plugins/text-search-plugin'; export { createLlmMeteringPlugin } from './plugins/metering-plugin'; export type { AgentDiscovery, AgentTableInfo } from './plugins/agent-discovery-plugin'; export { clearAgentDiscoveryCache, getAgentDiscovery } from './plugins/agent-discovery-plugin'; export type { LlmConfigOverrides } from './embedder'; export { buildEmbedder, buildEmbedderFromEnv, buildEmbedderFromModule, llmConfigStore } from './embedder'; export { buildChatCompleter, buildChatCompleterFromEnv, buildChatCompleterFromModule } from './chat'; export type { InferenceLogEntry, MeteringContext, MeteringOptions, MeterResult, WithPgClient } from './metering'; export { logInferenceUsage, meteredChat, meteredEmbed, QuotaExceededError } from './metering'; export type { BillingConfig, InferenceLogConfig, LlmBillingCacheEntry, PgClient } from './config-cache'; export { getLlmBillingCacheStats, getLlmBillingConfig, invalidateLlmBillingConfig } from './config-cache'; export type { ChatConfig, ChatFunction, ChatMessage, ChatOptions, ChatResult, ChunkTableInfo, EmbedderConfig, EmbedderFunction, EmbeddingResult, GraphileLlmOptions, LlmModuleData, LlmUsage, MeteringConfig, RagDefaults } from './types';