feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
This commit is contained in:
parent
5cd1de6859
commit
708e20f747
406 changed files with 42464 additions and 6199 deletions
|
|
@ -7,7 +7,7 @@ import path from 'path'
|
|||
import fs from 'fs'
|
||||
import { eq } from 'drizzle-orm'
|
||||
import { getLogger } from './LoggerService'
|
||||
import { getLocalLLMService } from './LocalLLMService'
|
||||
import { getPremiumLLMService } from './PremiumLLMService'
|
||||
import { configGet } from './ConfigService'
|
||||
import { getDatabase } from '../db'
|
||||
import { ragDocuments, ragChunks } from '../db/schema'
|
||||
|
|
@ -194,12 +194,15 @@ class RAGService extends EventEmitter {
|
|||
this._state = 'querying'
|
||||
|
||||
try {
|
||||
const db = getDatabase()
|
||||
const allChunks = db.select().from(ragChunks).all()
|
||||
if (allChunks.length === 0) {
|
||||
throw new D3ROError(ErrorCode.RAGQueryFailed, 'No indexed chunks to query')
|
||||
}
|
||||
|
||||
// 쿼리 임베딩
|
||||
const queryEmbedding = await this._embed(queryText)
|
||||
|
||||
// 모든 청크에서 코사인 유사도 계산
|
||||
const db = getDatabase()
|
||||
const allChunks = db.select().from(ragChunks).all()
|
||||
const allDocs = db.select().from(ragDocuments).all()
|
||||
const docMap = new Map(allDocs.map((d) => [d.id, d.fileName]))
|
||||
|
||||
|
|
@ -228,7 +231,7 @@ class RAGService extends EventEmitter {
|
|||
Documents:
|
||||
${context}`
|
||||
|
||||
const llmService = getLocalLLMService()
|
||||
const llmService = getPremiumLLMService()
|
||||
const result = await llmService.generate(queryText, { systemPrompt })
|
||||
|
||||
return {
|
||||
|
|
@ -527,6 +530,11 @@ ${context}`
|
|||
// ── 싱글톤 ──
|
||||
let instance: RAGService | null = null
|
||||
|
||||
export function resetRAGServiceForTests(): void {
|
||||
if (instance) instance.removeAllListeners()
|
||||
instance = null
|
||||
}
|
||||
|
||||
export function getRAGService(): RAGService {
|
||||
if (!instance) {
|
||||
instance = new RAGService()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue