codeinterpreter-api icon indicating copy to clipboard operation
codeinterpreter-api copied to clipboard

getting API key error after I put api key in .env.example

Open Tizzzzy opened this issue 1 year ago • 1 comments

Hi, After I put my api key in .env.example file, I am still getting this error

  File "C:\Users\super\anaconda3\envs\textgen\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
  File "C:\Users\super\OneDrive\Desktop\Bridge_Legal\codeinterpreter-api\frontend\app.py", line 38, in <module>
    loop.run_until_complete(get_images(input_text, files=uploaded_files_list))
  File "C:\Users\super\anaconda3\envs\textgen\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "C:\Users\super\OneDrive\Desktop\Bridge_Legal\codeinterpreter-api\frontend\utils.py", line 25, in get_images
    async with CodeInterpreterSession(model="gpt-3.5-turbo") as session:
  File "C:\Users\super\anaconda3\envs\textgen\lib\site-packages\codeinterpreterapi\session.py", line 70, in __init__
    self.llm: BaseLanguageModel = llm or self._choose_llm()
  File "C:\Users\super\anaconda3\envs\textgen\lib\site-packages\codeinterpreterapi\session.py", line 160, in _choose_llm
    raise ValueError("Please set the API key for the LLM you want to use.")
ValueError: Please set the API key for the LLM you want to use.```

Tizzzzy avatar Nov 27 '23 06:11 Tizzzzy

before you run the script add the api key with the following line in bash: export OPENAI_API_KEY=sk- image

bratwurstmuesli avatar Dec 16 '23 10:12 bratwurstmuesli