SeungyounShin / Llama2-Code-Interpreter

Make Llama2 use Code Execution, Debug, Save Code, Reuse it, Access to Internet
687 stars 89 forks source link

Llama2-Code-Interpreter needs an openai_api_key ? #4

Closed itsPreto closed 11 months ago

itsPreto commented 11 months ago

First off the project looks really well architected. Good job!

I'm excited to try this out but right off the bat I'm not sure if I missed something but it's saying I need an OpenAI API key?

Screenshot 2023-07-23 at 9 55 37 PM
dillfrescott commented 11 months ago

I am facing this issue too. This project seems sus

Jeffjewett27 commented 11 months ago

The problem is in BaseCodeInterpreter.py

import openai
from retrying import retry
import logging
from termcolor import colored
# load from key file
with open('./openai_api_key.txt') as f:
    OPENAI_API_KEY = key = f.read()
openai.api_key = OPENAI_API_KEY

The OpenAI-specific stuff should be moved to GPTCodeInterpreter.py

As a workaround, it should suffice to do: 'touch ./openai_api_key.txt' (haven’t tested it)

SeungyounShin commented 11 months ago

Sorry for inconvenience I solved the issue at the commit cd2cb0422674b17b874663b5b78bc904c382ef00.