From 0c0062ad12a382046e5817d178c72380a53f29a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Paulo=20P=C3=A9rez-Tejada?= Date: Sat, 9 Dec 2023 15:43:46 -0600 Subject: [PATCH] fix: API Key error on HF (#12) --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 9f6e6fc..ef55e5b 100644 --- a/app.py +++ b/app.py @@ -50,7 +50,8 @@ def set_api_key(): openai_client, collection = settings.build(chroma_db) # Create Agent -llm = ChatOpenAI(temperature=0.9, model="gpt-3.5-turbo-16k", api_key=openai.api_key) +openai_api_key = openai.api_key +llm = ChatOpenAI(temperature=0.9, model="gpt-3.5-turbo-16k", api_key=openai_api_key) agent = PDFExplainer(llm, chroma_db).agent # Main