Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,12 @@ from langchain.chat_models import ChatOpenAI
|
|
4 |
from langchain import LLMChain, PromptTemplate
|
5 |
from langchain.memory import ConversationBufferMemory
|
6 |
|
7 |
-
OPENAI_API_KEY=os.getenv('
|
8 |
|
9 |
template = """You are a helpful assistant to answer all user queries.
|
10 |
{chat_history}
|
11 |
User: {user_message}
|
12 |
-
Chatbot:""
|
13 |
|
14 |
prompt = PromptTemplate(
|
15 |
input_variables=["chat_history", "user_message"], template=template
|
|
|
4 |
from langchain import LLMChain, PromptTemplate
|
5 |
from langchain.memory import ConversationBufferMemory
|
6 |
|
7 |
+
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
8 |
|
9 |
template = """You are a helpful assistant to answer all user queries.
|
10 |
{chat_history}
|
11 |
User: {user_message}
|
12 |
+
Chatbot:""
|
13 |
|
14 |
prompt = PromptTemplate(
|
15 |
input_variables=["chat_history", "user_message"], template=template
|