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

python script failed #1576

Closed
SDAIer opened this issue Jan 4, 2025 · 0 comments
Closed

python script failed #1576

SDAIer opened this issue Jan 4, 2025 · 0 comments

Comments

@SDAIer
Copy link

SDAIer commented Jan 4, 2025

linux
Open Interpreter 0.4.3 Developer Preview
Python 3.11.9
pip 24.0

it's ok on shell mode with cli : interpreter, as shown followed

(api4fastgpt) [root@aitest profiles]# interpreter

▌ A new version of Open Interpreter is available.

▌ Please run: pip install --upgrade open-interpreter

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

▌ Model set to openai/Qwen/Qwen2.5-7B-Instruct

Open Interpreter will require approval before running code.

Use interpreter -y to bypass this.

Press CTRL-C to exit.

> hi

We were unable to determine the context window of this model. Defaulting to
3000.

If your model can handle more, run interpreter --context_window {token limit}
--max_tokens {max tokens per response}.

Continuing...


  Hello! How can I assist you today?

BUT failed on python mode, as followed

interpreter.py


(api4fastgpt) [root@aitest python3]# more interpreter.py
from interpreter import interpreter

interpreter.llm.model = "i"
interpreter.chat("who are you")

err messages as followed


(api4fastgpt) [root@aitest python3]# python3 interpreter.py
Traceback (most recent call last):
  File "/root/python3/interpreter.py", line 1, in <module>
    from interpreter import interpreter
  File "/root/python3/interpreter.py", line 1, in <module>
    from interpreter import interpreter
ImportError: cannot import name 'interpreter' from partially initialized module 'interpreter' (most likely due to a circular import) (/root/python3/interpreter.py)

@SDAIer SDAIer changed the title py run error python script failed Jan 4, 2025
@SDAIer SDAIer changed the title python script failed python script failed Jan 4, 2025
@SDAIer SDAIer closed this as completed Jan 4, 2025
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

1 participant