File size: 1,390 Bytes
967b096
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash

TMP_DIR="/tmp/ten-agent"
mkdir -p $TMP_DIR

echo "Creating temporary agent files in $TMP_DIR..."

# Create voice_agent.json
cat > $TMP_DIR/voice_agent.json << 'EOL'
{
  "nodes": [],
  "edges": [],
  "groups": [],
  "templates": [],
  "root": null
}
EOL

# Create chat_agent.json
cat > $TMP_DIR/chat_agent.json << 'EOL'
{
  "nodes": [],
  "edges": [],
  "groups": [],
  "templates": [],
  "root": null
}
EOL

# Create manifest.json
cat > $TMP_DIR/manifest.json << 'EOL'
{
  "name": "default",
  "agents": [
    {
      "name": "voice_agent",
      "description": "A simple voice agent"
    },
    {
      "name": "chat_agent",
      "description": "A text chat agent"
    }
  ]
}
EOL

# Run the Python script to create property.json
python3 temp_property_json.py

echo "All temporary agent files created successfully."
echo "Files created:"
ls -la $TMP_DIR

# Create symbolic links to make API find these files
ln -sf $TMP_DIR/property.json /app/agents/property.json.tmp || echo "Failed to create symlink for property.json"
ln -sf $TMP_DIR/voice_agent.json /app/agents/voice_agent.json.tmp || echo "Failed to create symlink for voice_agent.json"
ln -sf $TMP_DIR/chat_agent.json /app/agents/chat_agent.json.tmp || echo "Failed to create symlink for chat_agent.json"
ln -sf $TMP_DIR/manifest.json /app/agents/manifest.json.tmp || echo "Failed to create symlink for manifest.json"