openinterpreter icon indicating copy to clipboard operation
openinterpreter copied to clipboard

Freezes after generating prompt

Open interpreteragent opened this issue 2 years ago • 5 comments

Describe the bug

interpreter console freezes after user enters a request when using --debug, I can see that a prompt for gpt4 was generated but then interpreter simply hangs

Reproduce

  1. launch interpreter
  2. enter openAI api key
  3. enter user request
  4. Prompt seems to be crafted, then interpreter just hangs forever

Expected behavior

  1. launch interpreter
  2. enter openAI api key
  3. enter user request
  4. Prompt seems to be crafted
  5. Either interpreter continues, or --debug sends appropriate message to diagnose error

Screenshots

image

Open Interpreter version

0.2.4

Python version

3.11.2

Operating System name and version

debian 12

Additional context

No response

interpreteragent avatar Mar 24 '24 17:03 interpreteragent

Running in python environment I get the error message - penai.py: Received openai error - Error code: 401 - {'error': {'message': 'Incorrect API key provided: x

However I believe I set the API key correctly via:

interpreter.llm.api_key 'real key shows up here'

interpreteragent avatar Mar 24 '24 19:03 interpreteragent

interpreter.llm.api_key 'real key shows up here.' copy that.

thetiaradiaries avatar Mar 25 '24 00:03 thetiaradiaries

interpreter.llm.api_key 'real key shows up here.' copy that.

copy that to where?

Why does it say the api key is 'x'. Received openai error - Error code: 401 - {'error': {'message': 'Incorrect API key provided: x

Also the CURL: POST Request Sent from LiteLLM: curl -X POST
https://api.openai.com/v1/
-H 'Authorization: Bearer x' \

Is the API key not being passed? Where is 'x' coming from?

Is litellm actually trying to use the api key 'x'?

Here's what I've tried so far. Using verbose and debug.

  1. launching interpreter from bash with the OPENAI_API_KEY set
  2. launching from bash and pasting it in when asked for the API key
  3. from a python environment using import os

os.environ["OPENAI_API_KEY"] = "your_openai_api_key"

All of these seem to result in the same error.

interpreteragent avatar Mar 25 '24 01:03 interpreteragent

Okay. I solved it. But I don't understand how.

I installed miniconda and did a pip install open-interpreter inside a new conda env. (v2.0) Both the conda env interpreter and the previous one (cloned from this repo) (without refreshing bash or python) started working and actually sending the openai api key instead of 'x'.

interpreteragent avatar Mar 25 '24 02:03 interpreteragent

Thank you for reporting this and for helping build the classic Python version of Open Interpreter. This issue concerns the earlier Python/LiteLLM/Jupyter product; this repository now tracks the Rust Open Interpreter built on Codex. We are closing the legacy report here so current product tracking starts clean. If you still want to pursue it, the community-maintained classic fork is https://github.com/endolith/open-interpreter. If the same problem affects the current Interpreter release, please open a new issue with the current template and include the version, provider, model, wire API, harness, platform, and reproduction.

interpreterwork avatar Jul 28 '26 04:07 interpreterwork