OpenInterpreter / open-interpreter

A natural language interface for computers
http://openinterpreter.com/
GNU Affero General Public License v3.0
52.44k stars 4.63k forks source link

Remove pydantic warnings #1184

Closed imapersonman closed 5 months ago

imapersonman commented 5 months ago

Describe the changes you have made:

This PR fixes two bugs:

  1. ~This line in start_terminal_interface.py was accidentally deleted at some point. Not sure when, and not sure if anyone else is seeing this, as I'm not seeing it reported as an issue anywhere. In any case I added the line back in and there's no longer a crash for a missing variable here.~
    • Fixed in #1187
  2. A bunch of pydantic-related warnings were being printed at startup. This appears to have been happening during LiteLLM's import here. I wrote instructions for how to reproduce this error in a simplified environment in this gist. I capped LiteLLM's version to the most recent update that doesn't display the warnings, but this cap is not ideal. I'll keep an eye on LiteLLM's repo to see when this issue is resolved and will remove the cap when it has been.

Relevant Issues

Pre-Submission Checklist (optional but appreciated):

OS Tests (optional but appreciated):

CyanideByte commented 5 months ago

I tested on Windows and confirmed it does fix the issue. Excellent PR. @imapersonman do you know if there is an issue about this opened on litellm yet?

imapersonman commented 5 months ago

I tested on Windows and confirmed it does fix the issue. Excellent PR. @imapersonman do you know if there is an issue about this opened on litellm yet?

Thanks for testing the PR and for the kind words!

This issue in the LiteLLM repo describes the same bug.

johnsonblue75 commented 5 months ago

I tested on Windows and confirmed it does fix the issue. Excellent PR. @imapersonman do you know if there is an issue about this opened on litellm yet?

Thanks for testing the PR and for the kind words!

This issue in the LiteLLM repo describes the same bug.

I tested and your solution worked for me on Windows 11 Pro. Thank you you're awesome. :-)

MikeBirdTech commented 5 months ago

Thank you for the PR @imapersonman! Much appreciated

KillianLucas commented 5 months ago

Clean and simple. Many, many thanks @imapersonman, great work!

Gy0m commented 4 months ago

thank you for the imformation

bulrush15 commented 2 weeks ago

I'm still getting this error. I'm using Python 3.11.9 on Windows 11.

Using pip freeze I see this:

aiofiles==23.2.1
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiosignal==1.3.1
annotated-types==0.7.0
anyio==4.4.0
asttokens==2.4.1
attrs==24.2.0
certifi==2024.8.30
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.2.1
cycler==0.12.1
dataclasses-json==0.6.7
decorator==5.1.1
executing==2.0.1
fastapi==0.114.2
ffmpy==0.4.0
filelock==3.16.0
fonttools==4.51.0
frozenlist==1.4.1
fsspec==2024.9.0
gradio==4.44.0
gradio_client==1.3.0
greenlet==3.1.0
h11==0.14.0
httpcore==1.0.5
httpx==0.27.2
huggingface-hub==0.24.7
idna==3.9
importlib_resources==6.4.5
ipython==8.24.0
jedi==0.19.1
Jinja2==3.1.4
jsonpatch==1.33
jsonpointer==3.0.0
kiwisolver==1.4.5
langchain==0.3.0
langchain-community==0.3.0
langchain-core==0.3.0
langchain-text-splitters==0.3.0
langsmith==0.1.120
markdown-it-py==3.0.0
MarkupSafe==2.1.5
marshmallow==3.22.0
matplotlib==3.9.0
matplotlib-inline==0.1.7
mdurl==0.1.2
multidict==6.1.0
mypy-extensions==1.0.0
numpy==1.26.4
orjson==3.10.7
packaging==24.0
pandas==2.2.2
parso==0.8.4
pillow==10.3.0
prompt-toolkit==3.0.43
pure-eval==0.2.2
pydantic==2.9.1
pydantic-settings==2.5.2
pydantic_core==2.23.3
pydub==0.25.1
Pygments==2.18.0
pyparsing==3.1.2
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-multipart==0.0.9
pytz==2024.2
PyYAML==6.0.2
requests==2.32.3
rich==13.8.1
ruff==0.6.5
semantic-version==2.10.0
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
SQLAlchemy==2.0.34
stack-data==0.6.3
starlette==0.38.5
tenacity==8.5.0
tomlkit==0.12.0
tqdm==4.66.5
traitlets==5.14.3
typer==0.12.5
typing-inspect==0.9.0
typing_extensions==4.11.0
tzdata==2024.1
urllib3==2.2.3
uvicorn==0.30.6
wcwidth==0.2.13
websockets==12.0
yarl==1.11.1

In my program I'm using these third-party modules which I just installed today Sep 15, 2024:

import langchain
from langchain_community.document_loaders import PyPDFDirectoryLoader
from langchain_community.embeddings import HuggingFaceEmbeddings
from langchain_community.vectorstores import FAISS

How do I fix this error?

Summary: I'm trying to run an AI PDF summarizer locally. I already have ollama installed and several LLMs.

CyanideByte commented 2 weeks ago

@bulrush15 Run this command to fix it: pip install --upgrade litellm

bulrush15 commented 1 week ago

@bulrush15 Run this command to fix it: pip install --upgrade litellm

Thank you, I will try it later. Is litellm a dependency for one of the langchain modules?

Why did litellm not appear in my pip freeze list?