feat: implement automatic ChromaDB indexing and loop-based documentation generation
Some checks failed
CI/CD Pipeline / Run Tests (push) Has been skipped
CI/CD Pipeline / Security Scanning (push) Has been skipped
CI/CD Pipeline / Generate Documentation (push) Failing after 8m31s
CI/CD Pipeline / Lint Code (push) Failing after 8m33s
CI/CD Pipeline / Build and Push Docker Images (api) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (chat) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (frontend) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (worker) (push) Has been skipped
CI/CD Pipeline / Deploy to Staging (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
Some checks failed
CI/CD Pipeline / Run Tests (push) Has been skipped
CI/CD Pipeline / Security Scanning (push) Has been skipped
CI/CD Pipeline / Generate Documentation (push) Failing after 8m31s
CI/CD Pipeline / Lint Code (push) Failing after 8m33s
CI/CD Pipeline / Build and Push Docker Images (api) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (chat) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (frontend) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (worker) (push) Has been skipped
CI/CD Pipeline / Deploy to Staging (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
- Add automatic ChromaDB indexing after documentation generation - Implement loop-based section generation for individual VM and container documentation - Fix Celery anti-pattern in generate_proxmox_docs task (removed blocking .get() call) - Share ChromaDB vector store volume between worker and chat services - Add documentation management UI to frontend with manual job triggering and log viewing - Fix frontend Socket.IO connection URL to point to correct chat service port - Enhance DocumentationAgent.index_documentation() with automatic cleanup of old documents - Update Proxmox template to generate individual files for each VM and container This enables the RAG system to properly respond with infrastructure-specific information from the generated documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,8 @@ class LLMClient:
|
||||
self.max_tokens = max_tokens or settings.LLM_MAX_TOKENS
|
||||
|
||||
# Initialize AsyncOpenAI client with custom HTTP client (disable SSL verification for self-signed certs)
|
||||
http_client = httpx.AsyncClient(verify=False, timeout=30.0)
|
||||
# Increased timeout to 120s for documentation generation (large prompts)
|
||||
http_client = httpx.AsyncClient(verify=False, timeout=120.0)
|
||||
self.client = AsyncOpenAI(
|
||||
base_url=self.base_url,
|
||||
api_key=self.api_key,
|
||||
@@ -129,6 +130,13 @@ class LLMClient:
|
||||
# Type guard: we know it's ChatCompletion when stream=False
|
||||
response = cast(ChatCompletion, response)
|
||||
|
||||
# Check for None response or empty choices
|
||||
if response is None:
|
||||
raise ValueError("LLM returned None response")
|
||||
|
||||
if not response.choices or len(response.choices) == 0:
|
||||
raise ValueError("LLM returned empty choices")
|
||||
|
||||
# Extract text from first choice
|
||||
message = response.choices[0].message
|
||||
content = message.content or ""
|
||||
|
||||
Reference in New Issue
Block a user