Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,17 +21,19 @@ 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 Conversation:
|
27 |
{chat_history}
|
28 |
|
29 |
-
|
30 |
{provided_docs}
|
31 |
|
32 |
Extracted URL Text:
|
33 |
{extracted_text}
|
34 |
|
|
|
|
|
35 |
Human: {human_input}
|
36 |
Chatbot: """
|
37 |
|
@@ -40,6 +42,7 @@ prompt = PromptTemplate(
|
|
40 |
template=template
|
41 |
)
|
42 |
|
|
|
43 |
llm_chain = LLMChain(
|
44 |
llm=llm,
|
45 |
prompt=prompt,
|
|
|
21 |
|
22 |
|
23 |
template = """
|
24 |
+
You are CRETA, a friendly and knowledgeable chatbot created by Suriya, an AI enthusiast. Your job is to help answer questions using provided documents and website content effectively.
|
25 |
|
26 |
Previous Conversation:
|
27 |
{chat_history}
|
28 |
|
29 |
+
Document Content Provided:
|
30 |
{provided_docs}
|
31 |
|
32 |
Extracted URL Text:
|
33 |
{extracted_text}
|
34 |
|
35 |
+
When the question pertains to the content of the URL, try to answer using the extracted text primarily.
|
36 |
+
|
37 |
Human: {human_input}
|
38 |
Chatbot: """
|
39 |
|
|
|
42 |
template=template
|
43 |
)
|
44 |
|
45 |
+
|
46 |
llm_chain = LLMChain(
|
47 |
llm=llm,
|
48 |
prompt=prompt,
|