open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

UserWarning: Field "model_id" has conflict with protected namespace "model_" - pydantic

Open datametal opened this issue 10 months ago • 7 comments

Describe the bug

On starting interpreter:

' ' ' BEGIN ERROR:

❯ interpreter /home/$USER/.local/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_id" has conflict with protected nam espace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn(

▌ Model set to gpt-4

Open Interpreter will require approval before running code.

Use interpreter -y to bypass this.

Press CTRL-C to exit.

' ' ' END

Arch Linux | python 3.11.8 | installed OI via pip with --break-system-packages flag Seems to be non-blocking / pydantic being extra persnickety ? thanks

Reproduce

  1. install oi via pip install oi --break-system-packages
  2. run interpreter
  3. see error (or warning, non-blocking error)

Expected behavior

open interpreter runs without warning

Screenshots

No response

Open Interpreter version

0.2.4

Python version

3.11.8

Operating System name and version

Arch Linux 6.8.2

Additional context

No response

datametal avatar Apr 05 '24 00:04 datametal

I have the exact same issue when I install with any of the below commands:

curl -o oi-linux-installer.sh https://raw.githubusercontent.com/KillianLucas/open-interpreter/main/installers/oi-linux-installer.sh && chmod +x oi-linux-installer.sh && ./oi-linux-installer.sh && rm oi-linux-installer.sh

pip install open-interpreter

Open Interpreter version: 0.2.4

Python version: 3.11.4

Operating system: Ubuntu 23.04

Error log:

~/OpenInterpreter$ interpreter /home/stefan/OpenInterpreter/.env/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_id" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn( /home/stefan/OpenInterpreter/.env/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_name" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn( /home/stefan/OpenInterpreter/.env/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_info" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn(

Welcome to Open Interpreter.

────────────────────────────────────────────────────────────────────────────────

▌ OpenAI API key not found

To use GPT-4 (highly recommended) please provide an OpenAI API key.

To use another language model, consult the documentation at
docs.openinterpreter.com.

────────────────────────────────────────────────────────────────────────────────

OpenAI API key:

Note: The issue loops upon adding the API key.

stefandamyanov avatar Apr 05 '24 13:04 stefandamyanov

this seems to be something that happened recently. I am affected as well.

omani avatar Apr 05 '24 15:04 omani

Possible that simply changing "model_id" to "local_model_id" in https://github.com/OpenInterpreter/open-interpreter/blob/main/interpreter/core/llm/vision_for_text_llms.py would resolve the issue? I haven't read through the contributor docs yet to open a PR. If someone wants to try, go ahead please. thank you.

datametal avatar Apr 05 '24 20:04 datametal

Getting the same issue here as well...

Screenshot 2024-04-06 at 1 09 17 AM

teereximus88 avatar Apr 06 '24 05:04 teereximus88

Clean install of macOS 14.4.1, Anaconda (Python 3.11.8). I'm seeing similar output to everyone else. I can't just ignore the warnings as open-interpreter does not return any results (I've tried my OpenAI key and Anthropic key).

CleanShot 2024-04-06 at 08 03 49@2x

rmangino avatar Apr 06 '24 15:04 rmangino

The warnings are being printed inside of a LiteLLM import, particularly this one. I wrote a gist describing the problem here. I'm currently writing a PR to fix the issue that should be up later tonight.

imapersonman avatar Apr 08 '24 01:04 imapersonman

/opt/anaconda3/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_list" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn( /opt/anaconda3/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_name" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn( /opt/anaconda3/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_group_alias" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn( /opt/anaconda3/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_info" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn( /opt/anaconda3/lib/python3.11/site-packages/pydantic/_internal/fields.py:151: UserWarning: Field "model_id" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn(

Last attempt Apr 8 Macos 14.4.1 - Python 3.11.7 + Anaconda I have previously tried pyenv + 3.11.7 with same result Tried Brew.sh + 3.10 / Brew.sh + 3.11 / Brew.sh + 3.11.7 with same result Have initially tried on Apr 4 "curl -o oi-mac-installer.sh https://raw.githubusercontent.com/KillianLucas/open-interpreter/main/installers/oi-mac-installer.sh && chmod +x oi-mac-installer.sh && ./oi-mac-installer.sh && rm oi-mac-installer.sh" - same results

Thank you

rob317 avatar Apr 08 '24 14:04 rob317