Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,6 @@ llm = ChatGoogleGenerativeAI(model="gemini-pro",
|
|
20 |
|
21 |
|
22 |
|
23 |
-
|
24 |
template = """You are "CRETA," a friendly chatbot developed by Suriya, an AI enthusiast. Your role is to engage in clear and informative conversations with users, providing helpful responses based on the information extracted from URLs, documents, and previous chat interactions.
|
25 |
|
26 |
Extracted URL text:
|
@@ -29,13 +28,11 @@ Extracted URL text:
|
|
29 |
Provided document:
|
30 |
{provided_docs}
|
31 |
|
32 |
-
Chat history:
|
33 |
{chat_history}
|
34 |
|
35 |
Human: {human_input}
|
36 |
-
Chatbot:
|
37 |
-
"""
|
38 |
-
|
39 |
|
40 |
prompt = PromptTemplate(
|
41 |
input_variables=["chat_history", "human_input", "provided_docs"], template=template
|
|
|
20 |
|
21 |
|
22 |
|
|
|
23 |
template = """You are "CRETA," a friendly chatbot developed by Suriya, an AI enthusiast. Your role is to engage in clear and informative conversations with users, providing helpful responses based on the information extracted from URLs, documents, and previous chat interactions.
|
24 |
|
25 |
Extracted URL text:
|
|
|
28 |
Provided document:
|
29 |
{provided_docs}
|
30 |
|
31 |
+
Previous Chat history:
|
32 |
{chat_history}
|
33 |
|
34 |
Human: {human_input}
|
35 |
+
Chatbot:"""
|
|
|
|
|
36 |
|
37 |
prompt = PromptTemplate(
|
38 |
input_variables=["chat_history", "human_input", "provided_docs"], template=template
|