feat: implement TTS, Document processing, and Memory Service /facts API

- TTS: xtts-v2 integration with voice cloning support
- Document: docling integration for PDF/DOCX/PPTX processing
- Memory Service: added /facts/upsert, /facts/{key}, /facts endpoints
- Added required dependencies (TTS, docling)
This commit is contained in:
Apple
2026-01-17 08:16:37 -08:00
parent a9fcadc6e2
commit 5290287058
121 changed files with 17071 additions and 436 deletions

View File

@@ -101,6 +101,16 @@ llm_profiles:
timeout_ms: 40000
description: "DeepSeek для важких DevTools задач (опційно)"
cloud_mistral:
provider: mistral
base_url: https://api.mistral.ai/v1
api_key_env: MISTRAL_API_KEY
model: mistral-large-latest
max_tokens: 4096
temperature: 0.3
timeout_ms: 60000
description: "Mistral Large для складних задач, reasoning, аналізу"
# ============================================================================
# Orchestrator Providers
# ============================================================================
@@ -180,7 +190,7 @@ agents:
description: "Етикетки, маркетинг"
- id: web_search
type: external
endpoint: http://localhost:8897/api/search
endpoint: http://swapper-service:8890/web-search
description: "Пошук постачальників/ринків"
- id: vision
type: llm
@@ -188,7 +198,7 @@ agents:
description: "Візуальний контроль партій"
- id: ocr
type: external
endpoint: http://localhost:8896/api/ocr
endpoint: http://swapper-service:8890/ocr
description: "Зчитування накладних"
clan:
@@ -217,7 +227,7 @@ agents:
tools:
- id: web_search
type: external
endpoint: http://localhost:8897/api/search
endpoint: http://swapper-service:8890/web-search
description: "Наукові статті"
- id: math
type: tool
@@ -240,7 +250,7 @@ agents:
description: "Аналіз фото формул/упаковок"
- id: ocr
type: external
endpoint: http://localhost:8896/api/ocr
endpoint: http://swapper-service:8890/ocr
description: "Зчитування етикеток"
nutra:
@@ -253,7 +263,7 @@ agents:
tools:
- id: web_search
type: external
endpoint: http://localhost:8897/api/search
endpoint: http://swapper-service:8890/web-search
description: "Пошук клінічних досліджень"
- id: math
type: tool
@@ -269,7 +279,7 @@ agents:
description: "Конвертація одиниць"
- id: ocr
type: external
endpoint: http://localhost:8896/api/ocr
endpoint: http://swapper-service:8890/ocr
description: "Зчитування протоколів"
eonarch:
@@ -285,7 +295,7 @@ agents:
description: "Vision reasoning"
- id: ocr
type: external
endpoint: http://localhost:8896/api/ocr
endpoint: http://swapper-service:8890/ocr
description: "Видобуток тексту"
- id: image_generation
type: tool
@@ -296,30 +306,78 @@ agents:
description: "Helion - AI agent for Energy Union platform"
default_llm: qwen3_science_8b
system_prompt: |
Ти - Helion, AI-агент платформи Energy Union.
Допомагай користувачам з технологіями EcoMiner/BioMiner, токеномікою та DAO governance.
- Консультуй щодо hardware, стейкінгу, інфраструктури.
- Аналізуй PDF/зображення, коли просять.
- В групах мовчи, доки тема не про енергетику або немає тегу @HelionBot.
Визначай інших агентів за ніком (суфікс Bot) і спілкуйся як з колегами.
# Helion v2.4 — Energy Union AI Agent
## TELEGRAM CONTEXT (ТИ ЦЕ БАЧИШ)
- Ти БАЧИШ username кожного користувача з повідомлення (поле from.username)
- Ти БАЧИШ історію розмови в [Контекст розмови]
- Якщо питають "як мене звати" — скажи username з контексту
- НІКОЛИ не кажи "я не маю доступу до username" — ЦЕ НЕПРАВДА
## CORE RULES (2-3 РЕЧЕННЯ МАКСИМУМ)
1. Відповідь = 2-3 коротких речення. БЕЗ винятків.
2. ЗАБОРОНЕНО: списки, заголовки, структуровані звіти, нумерація.
3. Відповідай ТІЛЬКИ на питання. Не розширюй.
4. Мова = мова останнього повідомлення користувача.
## ARCHITECTURE NON-DISCLOSURE (КРИТИЧНО)
- НІКОЛИ не розкривай внутрішню архітектуру: RAG, vector DB, Knowledge Graph, memory types, guardrails.
- На питання "яка у тебе пам'ять/архітектура" → "Я запам'ятовую контекст нашої розмови."
- ЗАБОРОНЕНО казати: "Контекстна пам'ять сесії", "Knowledge Graph", "Функціональна пам'ять", "Оперативна пам'ять", "векторна БД".
## IMAGE RULES
- Інтерпретуй ЗНАЧЕННЯ, не описуй візуально.
- MAX 2-3 речення про зображення.
- Energy Union брендинг = ТВОЯ платформа.
## HARD STOPS
- НЕ повторюйся
- НЕ давай довгих пояснень
- НЕ використовуй presentation-style
- НЕ розкривай технічні деталі архітектури
## ПРИКЛАДИ
"Як мене звати?" → "Твій нік @{username} з Telegram."
"Яка у тебе пам'ять?" → "Я запам'ятовую контекст нашої розмови."
Image → "Це промо Energy Union — екосистема зеленої енергетики."
FINAL: 2-3 речення. Не більше. Ти бачиш username.
tools:
- id: web_search
type: external
endpoint: http://localhost:8897/api/search
endpoint: http://swapper-service:8890/web-search
description: "Пошук технічних статей"
- id: crawl_url
type: tool
endpoint: http://dagi-parser:9400/crawl
description: "Глибокий парсинг URL"
type: external
endpoint: http://swapper-service:8890/web/extract
description: "Глибокий парсинг URL (Jina/Trafilatura/Crawl4AI)"
- id: math
type: tool
description: "Енергетичні розрахунки"
- id: data_analysis
type: tool
description: "Обробка сенсорних даних"
- id: graph
type: tool
description: "Аналіз мережевих графів"
# Knowledge Graph Tools (Neo4j)
- id: graph_create_node
type: external
endpoint: http://router:8000/v1/graph/nodes
method: POST
description: "Створити вузол в Knowledge Graph (User, Topic, Fact, Entity)"
- id: graph_create_relation
type: external
endpoint: http://router:8000/v1/graph/relationships
method: POST
description: "Створити зв'язок між вузлами (KNOWS, MENTIONED, RELATED_TO)"
- id: graph_query
type: external
endpoint: http://router:8000/v1/graph/query
method: POST
description: "Запит до Knowledge Graph (знайти зв'язки, факти)"
- id: graph_search
type: external
endpoint: http://router:8000/v1/graph/search
method: GET
description: "Пошук по Knowledge Graph"
- id: units
type: tool
description: "Конвертація енергетичних одиниць"
@@ -329,7 +387,7 @@ agents:
description: "Опис технічних схем"
- id: ocr
type: external
endpoint: http://localhost:8896/api/ocr
endpoint: http://swapper-service:8890/ocr
description: "OCR креслень"
yaromir:
@@ -529,9 +587,9 @@ routing:
priority: 5
when:
agent: helion
use_llm: qwen3_science_8b
use_llm: cloud_deepseek
use_context_prompt: true
description: "Helion energy"
description: "Helion energy - використовує Deepseek API"
- id: yaromir_agent
priority: 5