zhudotexe / redel

ReDel is a toolkit for researchers and developers to build, iterate on, and analyze recursive multi-agent systems. (EMNLP 2024 Demo)
MIT License
66 stars 12 forks source link

No Root Node When Following Documentation #6

Open MaceGrim opened 5 days ago

MaceGrim commented 5 days ago

Describe the bug Hi! This might be the wrong location for this, but wanted to put it somewhere. In general, I'm running a script from the documentation, but I'm not able to interact with a root node. In fact, a root node isn't even available in the viewer.

I'm running this with Windows Subsystem for Linux 2 with Ubuntu and Windows 11.

To Reproduce I've installed everything to the point where python -m redel.server runs fine and I can query GPT-4o no problem.

However, I want to start layering in tools and things, so when I run the following example from the documentation, I'm met with an uninteractive session without any nodes at all. There are no errors

from kani.engines.openai import OpenAIEngine
from redel import ReDel
from redel.server import VizServer
from redel.tools.browsing import Browsing

# configure your LLMs - see the Kani engine documentation for more info
root_engine = OpenAIEngine(model="gpt-4o", temperature=0.8, top_p=0.95)
delegate_engine = OpenAIEngine(model="gpt-3.5-turbo", temperature=0.8, top_p=0.95)

# a ReDel session configuration, acting as a prototype for interactive sessions
redel_proto = ReDel(
    root_engine=root_engine,
    delegate_engine=delegate_engine,
    tool_configs={
        Browsing: {
            "always_include": True,
        },
    },
)

# pass the prototype to VizServer
server = VizServer(redel_proto)

# VizServer.serve() makes the web interface available at 127.0.0.1:8000 by default
server.serve()

This is what the session looks like. There are no nodes. image

Excited to try this out and will take any advice you have! Thank you.

If it's helpful, here's the output of the console. It looks like a little icon is missing, but that doesn't seem like it should be causing the error I'm seeing

(redel) mgrim@the-rig:/mnt/o/Ode/Github/redel$ /home/mgrim/miniconda3/envs/redel/bin/python /mnt/o/Ode/Github/redel/app.py
INFO:     Started server process [85229]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     127.0.0.1:39746 - "GET / HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:39746 - "GET /assets/index-e03bd115.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:47614 - "GET /assets/index-7cff5d1f.css HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:47614 - "GET /api/states HTTP/1.1" 200 OK
INFO:     127.0.0.1:47614 - "GET /api/states HTTP/1.1" 200 OK
INFO:     127.0.0.1:39746 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:39746 - "POST /api/states HTTP/1.1" 200 OK
INFO:     127.0.0.1:39746 - "GET /api/states HTTP/1.1" 200 OK
INFO:     127.0.0.1:39746 - "GET /api/states/1732145083-1e6bddd6-be8e-473e-b947-4da919237399 HTTP/1.1" 200 OK
INFO:     ('127.0.0.1', 47620) - "WebSocket /api/ws/1732145083-1e6bddd6-be8e-473e-b947-4da919237399" [accepted]
INFO:     connection open
zhudotexe commented 5 days ago

Huh, weird - is there any output in your browser console?

zhudotexe commented 5 days ago

Also if you're installing from PyPI there are a couple changes that I haven't pushed yet; I just updated the docs to encourage installing from the git repo, but I don't think that's related.