Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero6992 committed Mar 14, 2023
1 parent 1b6462f commit c8b1ba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def get_chatbot_model(model_name: str) -> Union[AsyncChatbot, Chatbot]:
return AsyncChatbot(config={"email": openai_email, "password": openai_password, "session_token": session_token})
elif model_name == "OFFICIAL":
openai_api_key = os.getenv("OPENAI_API_KEY")
print(openai_api_key)
engine = os.getenv("OPENAI_ENGINE")
return Chatbot(api_key=openai_api_key, engine=engine)

Expand All @@ -39,6 +38,7 @@ async def unofficial_handle_response(message) -> str:

# resets conversation and asks chatGPT the prompt for a persona
async def switch_persona(persona) -> None:
CHAT_MODEL = os.getenv("CHAT_MODEL")
if CHAT_MODEL == "UNOFFICIAL":
chatbot.reset_chat()
async for response in chatbot.ask(personas.PERSONAS.get(persona)):
Expand Down

0 comments on commit c8b1ba5

Please sign in to comment.