stanford-oval / genie-worksheets

Framework for creating reliable LLM-based conversational agents
6 stars 4 forks source link

Error when testing frontend #1

Open only-moon-passed-by opened 3 weeks ago

only-moon-passed-by commented 3 weeks ago

Hello, much appreciated for releasing this code, but unfortunately I have encountered some issues while trying to run the code example. Is it possible for you to take a look at the error, please? I have already fully followed your instructions on the page. Thank you so much.

error:(genie-worksheets) onlymoonpassedby@baka:~/genie-worksheets/frontend/restaurant$ chainlit run app_restaurant.py 2024-11-04 19:01:47 - HTTP Request: GET https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json "HTTP/1.1 200 OK" 2024-11-04 19:01:48 - Your app is available at http://localhost:8000 gio: http://localhost:8000: Operation not supported 2024-11-04 19:01:52 - gsheet_to_genie() got an unexpected keyword argument 'bot_name' Traceback (most recent call last): File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/chainlit/utils.py", line 44, in wrapper return await user_function(params_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/chainlit/step.py", line 112, in async_wrapper result = await func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/onlymoonpassedby/genie-worksheets/frontend/restaurant/app_restaurant.py", line 53, in initialize gsheet_to_genie( TypeError: gsheet_to_genie() got an unexpected keyword argument 'bot_name' 2024-11-04 19:01:52 - gsheet_to_genie() got an unexpected keyword argument 'bot_name' Traceback (most recent call last): File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/chainlit/utils.py", line 44, in wrapper return await user_function(params_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/chainlit/step.py", line 112, in async_wrapper result = await func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/onlymoonpassedby/genie-worksheets/frontend/restaurant/app_restaurant.py", line 53, in initialize gsheet_to_genie( TypeError: gsheet_to_genie() got an unexpected keyword argument 'bot_name'

duskybomb commented 3 weeks ago

Thank you for pointing this out! I have made some changes to how to run the frontend agent. Please run the following:

cd experiments/agents/yelpbot/frontend/
chainlit run app_restaurant.py --port 8800

Let me know if you have any other questions!

only-moon-passed-by commented 3 weeks ago

Thanks for the quick response. However, the problem is now that the BaseLLM module is not available.

Traceback (most recent call last):
  File "/home/onlymoonpassedby/genie-worksheets/.venv/bin/chainlit", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/chainlit/cli/__init__.py", line 201, in chainlit_run
    run_chainlit(target)
  File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/chainlit/cli/__init__.py", line 66, in run_chainlit
    load_module(config.run.module_name)
  File "/home/onlymoonpassedby/genie-worksheets/.venv/lib/python3.11/site-packages/chainlit/config.py", line 446, in load_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/onlymoonpassedby/genie-worksheets/src/../experiments/agents/yelpbot/frontend/app_restaurant.py", line 8, in <module>
    from worksheets.agent import Agent
  File "/home/onlymoonpassedby/genie-worksheets/src/worksheets/agent.py", line 5, in <module>
    from worksheets.environment import GenieRuntime
  File "/home/onlymoonpassedby/genie-worksheets/src/worksheets/environment.py", line 17, in <module>
    from worksheets.llm import llm_generate
  File "/home/onlymoonpassedby/genie-worksheets/src/worksheets/llm/__init__.py", line 1, in <module>
    from worksheets.llm.base import BaseLLM
ModuleNotFoundError: No module named 'worksheets.llm.base'

In src/worksheet/llm there is only basic.py, is the base.py missing here?

duskybomb commented 3 weeks ago

Should be fixed now!