We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Big0290/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_which_enhanced_chat.pyβ’2.94 KiB
#!/usr/bin/env python3
"""
π§ͺ Test Script: Identify Which Enhanced Chat Function is Being Called
"""
def test_which_enhanced_chat():
"""Test which enhanced_chat function is being called"""
print("π§ͺ TESTING WHICH ENHANCED CHAT FUNCTION IS BEING CALLED")
print("=" * 70)
try:
# Test 1: Check main.py enhanced_chat
print("1οΈβ£ Testing main.py enhanced_chat...")
try:
from main import enhanced_chat as main_enhanced_chat
print("β main.py enhanced_chat imported successfully")
# Test if it works
result = main_enhanced_chat("test message")
print(f"β main.py enhanced_chat result length: {len(result)}")
print(f"π Contains context: {'π¬ CONTEXT:' in result}")
print(f"π Contains recent: {'π RECENT:' in result}")
print(f"π― Contains goals: {'π― GOALS:' in result}")
except Exception as e:
print(f"β main.py enhanced_chat failed: {e}")
# Test 2: Check local_mcp_server_simple.py enhanced_chat
print("\n2οΈβ£ Testing local_mcp_server_simple.py enhanced_chat...")
try:
from local_mcp_server_simple import enhanced_chat as local_enhanced_chat
print("β local_mcp_server_simple.py enhanced_chat imported successfully")
# Test if it works
result = local_enhanced_chat("test message")
print(f"β local_mcp_server_simple.py enhanced_chat result length: {len(result)}")
print(f"π Contains context: {'π¬ CONTEXT:' in result}")
print(f"π Contains recent: {'π RECENT:' in result}")
print(f"π― Contains goals: {'π― GOALS:' in result}")
except Exception as e:
print(f"β local_mcp_server_simple.py enhanced_chat failed: {e}")
# Test 3: Check which one the MCP system is using
print("\n3οΈβ£ Checking MCP system integration...")
try:
# Try to import the MCP tools
from enhanced_mcp_tools import enhanced_prompt_generation
print("β enhanced_mcp_tools.enhanced_prompt_generation available")
# Test the MCP tool
result = enhanced_prompt_generation("test message")
print(f"β MCP tool result length: {len(result)}")
print(f"π Contains context: {'π¬ CONTEXT:' in result}")
print(f"π Contains recent: {'π RECENT:' in result}")
print(f"π― Contains goals: {'π― GOALS:' in result}")
except Exception as e:
print(f"β MCP tool failed: {e}")
print("\n" + "=" * 70)
print("π§ͺ TEST COMPLETE")
except Exception as e:
print(f"β Error during testing: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
test_which_enhanced_chat()