File size: 1,211 Bytes
19da990
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""Debug script to inspect environment response format."""
import sys
sys.path.insert(0, r'C:\Users\smrit\CascadeProjects\crisis-inbox-test')

from crisis_inbox import CrisisInboxEnv

with CrisisInboxEnv(base_url="https://eptan-crisis-inbox.hf.space") as env:
    env.reset()
    
    # List available tools
    tools = env.list_tools()
    print(f"Available tools ({len(tools)}):")
    for t in tools:
        print(f"  - {t.name}: {t.description[:60]}...")
    
    # Get inbox and inspect
    print("\n--- Calling get_inbox ---")
    inbox = env.call_tool("get_inbox")
    print(f"Type: {type(inbox)}")
    print(f"Content preview: {str(inbox)[:500]}")
    
    # Try to get a specific message
    print("\n--- Trying read_message ---")
    try:
        msg = env.call_tool("read_message", message_id="msg_001")
        print(f"Type: {type(msg)}")
        print(f"Content: {str(msg)[:300]}")
    except Exception as e:
        print(f"Error: {e}")
    
    # Try status
    print("\n--- Calling get_status ---")
    try:
        status = env.call_tool("get_status")
        print(f"Type: {type(status)}")
        print(f"Content: {str(status)[:300]}")
    except Exception as e:
        print(f"Error: {e}")