haseeb-heaven / langchain-coder

Web Application that can generate code and fix bugs and run using various LLM's (GPT,Gemini,PALM)
https://langchain-coder.streamlit.app
MIT License
112 stars 38 forks source link

litellm missing on streamlit cloud site #17

Open balgad opened 8 months ago

balgad commented 8 months ago

I tried to enter OpenAI API key via the streamlit cloud site (https://langchain-coder.streamlit.app/) but got an error message after pushing enter: "Error loading Open AI: Could not import litellm python package. Please install it with `pip install"

image

Could you fix this?

Thank you

haseeb-heaven commented 8 months ago

Okay thanks i will take a look at this issue.

haseeb-heaven commented 8 months ago

Okay i have fixed this issue please check

balgad commented 8 months ago

It's working now, many thanks!

balgad commented 8 months ago

Found another issue:

image

haseeb-heaven commented 8 months ago

Can you send me the logs of this file and Download them from Settings.

balgad commented 8 months ago

Of course, I attach it (now I faced with another issue, seems to have some connection problem, too) langchain-coder (2).log

(anyway, it's a great app! :) )

haseeb-heaven commented 8 months ago

Of course, I attach it (now I faced with another issue, seems to have some connection problem, too) langchain-coder (2).log

(anyway, it's a great app! :) )

Thanks for trying i checked the logs, it seems like you used GPT-3 model, can you try with other GPT Models and see if same error exist.

And yes its great project but Google gemini Advanced has Code Generator and Editor IDE as well so thats what most people will use not.

balgad commented 8 months ago

Thanks for your answers.

I checked but something is not okay with online compiler, I attach the log file. After entering all inputs and pushing Generate button an error message appears on seems to be nothing happens because no output at all with online compiler. If I switch to offline compiler the generated code shows up correctly in a lot of cases, but changing back to online seems nothing happens (according to log file I didn't accept policy - but I did it).

Anyway, in EU a lot of employer disable generative AI sites (this happens in my case, too), so quite hard to use them. With your app we got a very good opportunity to use them (and app simplifies generating too in comparison with general prompting).

langchain-coder (16).log

haseeb-heaven commented 8 months ago
image

I generated the diagram using my other project Code-Interpreter,

Here is the code:

image

The coding Langchain uses online compilers which are limited they dont have all the external libraries installed so you need them and its very expensive for me to have servers with lots of space for external libraries so thats only the downside of this product.

I checked the online compiler acting weirdly not setting the language i will try to fix this asap.

balgad commented 8 months ago

Thank you for your explanation and help.

Code-interpreter is very promising :) I will try it, it's very likable.

haseeb-heaven commented 8 months ago

Thank you for your explanation and help.

Code-interpreter is very promising :) I will try it, it's very likable.

Yes Code Interpreter is Python interpreter so any task for Python related which needs external libraries are best suited like Data-analysis and Graphs/Charts generation locally using all LLMs OpenAI,Gemini,Claude and more.