Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when testing frontend #1

Open
only-moon-passed-by opened this issue Nov 5, 2024 · 3 comments
Open

Error when testing frontend #1

only-moon-passed-by opened this issue Nov 5, 2024 · 3 comments

Comments

@only-moon-passed-by
Copy link

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
Copy link
Collaborator

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
Copy link
Author

only-moon-passed-by commented Nov 5, 2024

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
Copy link
Collaborator

Should be fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants