Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,10 +51,14 @@ def main():
|
|
51 |
|
52 |
|
53 |
# Initialize Groq Langchain chat object and conversation
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
58 |
|
59 |
conversation = ConversationChain(
|
60 |
llm=groq_chat,
|
|
|
51 |
|
52 |
|
53 |
# Initialize Groq Langchain chat object and conversation
|
54 |
+
if groq_api_key:
|
55 |
+
groq_chat = ChatGroq(
|
56 |
+
groq_api_key=groq_api_key,
|
57 |
+
model_name=model
|
58 |
+
)
|
59 |
+
else:
|
60 |
+
st.text_input("Please enter your Groq API key")
|
61 |
+
|
62 |
|
63 |
conversation = ConversationChain(
|
64 |
llm=groq_chat,
|