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

litellm missing on streamlit cloud site #17

Open
balgad opened this issue Mar 4, 2024 · 11 comments
Open

litellm missing on streamlit cloud site #17

balgad opened this issue Mar 4, 2024 · 11 comments
Assignees

Comments

@balgad
Copy link

balgad commented Mar 4, 2024

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 haseeb-heaven self-assigned this Mar 4, 2024
@haseeb-heaven
Copy link
Owner

Okay thanks i will take a look at this issue.

@haseeb-heaven
Copy link
Owner

Okay i have fixed this issue please check

@balgad
Copy link
Author

balgad commented Mar 4, 2024

It's working now, many thanks!

@balgad balgad closed this as completed Mar 4, 2024
@balgad
Copy link
Author

balgad commented Mar 4, 2024

Found another issue:

  • after setting up OpenAI with API key
  • chose online compiler and accepted privacy policy
  • chose different models for chatgpt
  • gave an input to coder ("task='write python code using plotly express to draw histograms from a dataframe which has two categorical columns ("a" and "b") and one numerical ("c"). need as many histograms as the number of categorical columns.'") - pressed control+enter after the input
  • got an error message after had pushed "execute" button: "Compilation language must not be null"

image

@balgad balgad reopened this Mar 4, 2024
@haseeb-heaven
Copy link
Owner

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

@balgad
Copy link
Author

balgad commented Mar 5, 2024

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

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

balgad commented Mar 5, 2024

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

haseeb-heaven commented Mar 5, 2024

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

balgad commented Mar 5, 2024

Thank you for your explanation and help.

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

@haseeb-heaven
Copy link
Owner

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.

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