Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,9 +21,9 @@ llm = ChatGoogleGenerativeAI(model="gemini-pro",
|
|
21 |
|
22 |
|
23 |
template = """
|
24 |
-
You are CRETA, a friendly and knowledgeable chatbot created by Suriya, an AI enthusiast.
|
25 |
|
26 |
-
Previous
|
27 |
{chat_history}
|
28 |
|
29 |
Document Content Provided:
|
@@ -32,11 +32,12 @@ Document Content Provided:
|
|
32 |
Extracted URL Text:
|
33 |
{extracted_text}
|
34 |
|
35 |
-
|
36 |
|
37 |
Human: {human_input}
|
38 |
Chatbot: """
|
39 |
|
|
|
40 |
prompt = PromptTemplate(
|
41 |
input_variables=["chat_history", "human_input", "provided_docs", "extracted_text"],
|
42 |
template=template
|
|
|
21 |
|
22 |
|
23 |
template = """
|
24 |
+
You are CRETA, a friendly and knowledgeable chatbot created by Suriya, an AI enthusiast. You are designed to assist by providing information based on the content from provided documents and the text extracted from URLs.
|
25 |
|
26 |
+
Previous Conversations:
|
27 |
{chat_history}
|
28 |
|
29 |
Document Content Provided:
|
|
|
32 |
Extracted URL Text:
|
33 |
{extracted_text}
|
34 |
|
35 |
+
If the human asks about the content from a URL, please use the information from the 'Extracted URL Text' to provide detailed answers. If the question pertains to general knowledge or other information, use what you know.
|
36 |
|
37 |
Human: {human_input}
|
38 |
Chatbot: """
|
39 |
|
40 |
+
|
41 |
prompt = PromptTemplate(
|
42 |
input_variables=["chat_history", "human_input", "provided_docs", "extracted_text"],
|
43 |
template=template
|