This commit is contained in:
2025-06-03 03:02:15 +09:00
parent 1755dc2bec
commit 3487535e08
7 changed files with 766 additions and 33 deletions

View File

@ -160,7 +160,12 @@ AI:"""
# Generate response using AI with full context
try:
response = ai_provider.chat(context_prompt, max_tokens=2000)
# Check if AI provider supports MCP
if hasattr(ai_provider, 'chat_with_mcp'):
import asyncio
response = asyncio.run(ai_provider.chat_with_mcp(context_prompt, max_tokens=2000, user_id=user_id))
else:
response = ai_provider.chat(context_prompt, max_tokens=2000)
# Clean up response if it includes the prompt echo
if "AI:" in response: