fix-xinting-key.sh 704 B

12345678910111213
  1. #!/bin/bash
  2. # 芯葶正规key注入: 云接口拿token→容器内自写(不经视野)
  3. set -e
  4. TOKEN=$(docker exec agent-node-xinting python3 -c "import json;print(json.load(open('/opt/data/fmode-identity.json'))['session_token'])")
  5. curl -s -X POST "https://server.fmode.cn/api/fmode/voc-skill/install-prompt" \
  6. -H "Content-Type: application/json" \
  7. -d "{\"sessionToken\":\"$TOKEN\",\"channel\":\"fmode-studio\",\"scope\":\"global\"}" \
  8. --max-time 20 > /tmp/xinting-resp.json
  9. docker exec -i agent-node-xinting python3 < /tmp/parse-resp.py
  10. docker exec agent-node-xinting python3 -c "import json;d=json.load(open('/opt/data/fmode-identity.json'));print('token_len:',len(d.get('newapi_token','')))"