kotaemon
kotaemon copied to clipboard
[BUG] - gradio.exceptions.Error: 'Failed to create LLM 234: Please install langchain-google-genai'
Description
langchain-google-genai is not bundling and also is not in dependency list. Problem is reproducible if you clone repo and also if you pull docker container
Proposal:
- why to not add poetry where all deps are listed and etc (Python is not my main passion at the moment, so any other dependency manager) If it's okay with you i can sit at the weekends and try to do this
Reproduction steps
1. Pull docker container
2. Try to add gemini LLM resource
Logs
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 276, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1923, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1508, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 914, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 818, in wrapper
response = f(*args, **kwargs)
File "/app/libs/ktem/ktem/llms/ui.py", line 255, in create_llm
raise gr.Error(f"Failed to create LLM {name}: {e}")
gradio.exceptions.Error: 'Failed to create LLM 234: Please install langchain-google-genai'