- Add multi-provider LLM architecture supporting OpenRouter, OpenAI, Gemini, and custom providers - Implement global LLM on/off switch with default DISABLED state for cost protection - Add per-character LLM configuration with provider-specific models and settings - Create performance-optimized caching system for LLM enabled status checks - Add API key validation before enabling LLM providers to prevent broken configurations - Implement audit logging for all LLM enable/disable actions for cost accountability - Create comprehensive admin UI with prominent cost warnings and confirmation dialogs - Add visual indicators in character list for custom AI model configurations - Build character-specific LLM client system with global fallback mechanism - Add database schema support for per-character LLM settings - Implement graceful fallback responses when LLM is globally disabled - Create provider testing and validation system for reliable connections
36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Check current character data in database
|
|
"""
|
|
|
|
import asyncio
|
|
from sqlalchemy import select
|
|
from src.database.connection import init_database, get_db_session
|
|
from src.database.models import Character
|
|
|
|
async def check_character_data():
|
|
"""Check current character data"""
|
|
|
|
await init_database()
|
|
|
|
async with get_db_session() as session:
|
|
# Get all characters
|
|
characters_query = select(Character)
|
|
characters = await session.scalars(characters_query)
|
|
|
|
for character in characters:
|
|
print(f"\n{'='*50}")
|
|
print(f"Character: {character.name}")
|
|
print(f"{'='*50}")
|
|
print(f"Personality: {character.personality[:100] if character.personality else 'None'}{'...' if character.personality and len(character.personality) > 100 else ''}")
|
|
print(f"Interests: {character.interests}")
|
|
print(f"Speaking Style: {character.speaking_style}")
|
|
print(f"Background: {character.background}")
|
|
print(f"Is Active: {character.is_active}")
|
|
print(f"\nSystem Prompt:")
|
|
print("-" * 30)
|
|
print(character.system_prompt if character.system_prompt else "None")
|
|
print("-" * 30)
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(check_character_data()) |