SeungyounShin / Llama2-Code-Interpreter

Make Llama2 use Code Execution, Debug, Save Code, Reuse it, Access to Internet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Llama2-Code-Interpreter needs an openai_api_key ?

itsPreto opened this issue · comments

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
commented

I am facing this issue too. This project seems sus

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)

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