modelscope / agentscope

Start building LLM-empowered multi-agent applications in an easier way.
https://doc.agentscope.io/
Apache License 2.0
4.81k stars 294 forks source link

[Bug]: gradio启动的时候,出错 #403

Closed yawzhe closed 1 month ago

yawzhe commented 1 month ago
import agentscope

agentscope.init(
  # ...
  project="pro",
  name="test",
  studio_url="http://127.0.0.1:5000/" # The URL of AgentScope Studio
)
agentscope.studio.init(
  host="127.0.0.1", # The IP address of AgentScope studio
  port=5000, # The port number of AgentScope studio
  run_dirs = [ # The directories of your running histories
  r"D:agentscope-main\myagent\runs_directory\runs",
  #"xxx/xxx/runs"
  ]
)

Reproduction 这些是怎么配置页面的?,project,name这些参数,是先启动init程序,配置好project,name,之后本地启动页面吗? requests.exceptions.ConnectionError: HTTPConnectionPool(host='127..0.1', port=5000): Max retries exceeded with url: /api/runs/register (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001F3E2AFF850>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝 Environment 页面启动,studio,发现打开,运行报错,http://127.0.0.1:5000/ "GET / HTTP/1.1" 200 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/font.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/base.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/index.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/server.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css_third_party/tabulator.min.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css_third_party/highlight.min.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css_third_party/katex.min.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-runs.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-detail.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-detail-dialogue.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-detail-code.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-detail-invocation.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css_third_party/clusterize.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/tabulator.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/highlight.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/katex.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/marked.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/marked-katex-extension.umd.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/socket.io.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/js_third_party/clusterize.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/js_third_party/monaco-editor.loader.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/js/index.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/html/index-guide.html HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/fonts/KRYPTON.ttf HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/fonts/SourceSans3-Regular.ttf HTTP/1.1" 304 -,无法连接。')) Environment 页面启动,studio,发现打开,运行报错,http://127.0.0.1:5000/ "GET / HTTP/1.1" 200 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/font.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/base.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/index.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/server.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css_third_party/tabulator.min.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css_third_party/highlight.min.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css_third_party/katex.min.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-runs.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-detail.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-detail-dialogue.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-detail-code.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css/dashboard-detail-invocation.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/css_third_party/clusterize.css HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/tabulator.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/highlight.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/katex.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/marked.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/marked-katex-extension.umd.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:22] "GET /static/js_third_party/socket.io.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/js_third_party/clusterize.min.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/js_third_party/monaco-editor.loader.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/js/index.js HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/html/index-guide.html HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/fonts/KRYPTON.ttf HTTP/1.1" 304 - 127.0.0.1 - - [12/Aug/2024 19:30:23] "GET /static/fonts/SourceSans3-Regular.ttf HTTP/1.1" 304 - )

DavdGao commented 1 month ago

AgentScope Studio和应用是相互独立的,应用需要调用agentscope.init初始化agentscope。单独启动agentscope studio不需要调用agentscope.init,只需要调用agentscope.studio.init()。建议分为两步

  1. 启动agentscope studio
    import agentscope
    agentscope.studio.init(
    host="127.0.0.1",
    port=5000,
    run_dirs = [r"D:agentscope-main\myagent\runs_directory\runs",]
    )
  2. 启动你的应用程序,并注册到studio
    
    import agentscope
    agentscope.init(
    # ...
    project="pro",
    name="test",
    studio_url="http://127.0.0.1:5000/" # The URL of AgentScope Studio
    )

your application code here


问题描述里面的代码顺序搞反了,所以应用注册的时候找不到studio
DavdGao commented 1 month ago

Feel free to open a new issue if needed, closing this for now.