Spaces:
Sleeping
Sleeping
Commit
·
a56a155
1
Parent(s):
ce3f912
removing bug
Browse files
__pycache__/utils.cpython-310.pyc
CHANGED
Binary files a/__pycache__/utils.cpython-310.pyc and b/__pycache__/utils.cpython-310.pyc differ
|
|
pages/3_🤖_Chatbot.py
CHANGED
@@ -51,9 +51,11 @@ prompt_template = ChatPromptTemplate.from_messages([system_msg_template, Message
|
|
51 |
empty_openai_api_key = False
|
52 |
|
53 |
try:
|
|
|
54 |
llm = ChatOpenAI(model_name="gpt-3.5-turbo", openai_api_key=st.session_state['openai_api_key'])
|
55 |
conversation = ConversationChain(memory=st.session_state.buffer_memory, prompt=prompt_template, llm=llm, verbose=True)
|
56 |
-
except:
|
|
|
57 |
empty_openai_api_key = True
|
58 |
|
59 |
# """
|
|
|
51 |
empty_openai_api_key = False
|
52 |
|
53 |
try:
|
54 |
+
openai.api_key = st.session_state['openai_api_key']
|
55 |
llm = ChatOpenAI(model_name="gpt-3.5-turbo", openai_api_key=st.session_state['openai_api_key'])
|
56 |
conversation = ConversationChain(memory=st.session_state.buffer_memory, prompt=prompt_template, llm=llm, verbose=True)
|
57 |
+
except Exception as e:
|
58 |
+
print(e)
|
59 |
empty_openai_api_key = True
|
60 |
|
61 |
# """
|