Skip to content

Commit 3224ff7

Browse files
committed
feat: add RAG plugin, chat completion provider, and resolve-time embedding
- Add chat.ts: chat completion provider abstraction (Ollama via @agentic-kit/ollama) - Add rag-plugin.ts: LlmRagPlugin with ragQuery and embedText root query fields - Detects @hasChunks smart tags to discover chunk tables - RAG flow: embed prompt → search chunks → assemble context → chat LLM → return answer - Adds RagResponse, RagSource, EmbedTextResponse types to schema - Wire resolve-time embedding in text-search-plugin (resolver wrapper on queries) - Wire resolve-time embedding in text-mutation-plugin (resolver wrapper on mutations) - Update llm-module-plugin to resolve chat completer on build - Add enableRag toggle to GraphileLlmPreset (default false) - Add chat completion types (ChatFunction, ChatConfig, ChatMessage, etc.) - Add RagDefaults, ChunkTableInfo types - Add integration tests: RAG schema enrichment, ragQuery execution, embedText, chat completion abstraction unit tests, preset toggle tests - Add articles_chunks seed table for RAG testing
1 parent 1be6d54 commit 3224ff7

12 files changed

Lines changed: 1452 additions & 21 deletions

File tree

graphile/graphile-llm/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,17 @@
3838
"graphile-build-pg": "5.0.0",
3939
"graphile-config": "1.0.0",
4040
"graphile-search": "workspace:^",
41+
"graphile-utils": "5.0.0",
4142
"graphql": "16.13.0",
4243
"pg-sql2": "5.0.0",
4344
"postgraphile": "5.0.0"
4445
},
4546
"peerDependenciesMeta": {
4647
"graphile-search": {
4748
"optional": true
49+
},
50+
"graphile-utils": {
51+
"optional": true
4852
}
4953
},
5054
"devDependencies": {

0 commit comments

Comments
 (0)