Sharathhebbar24
commited on
Commit
•
75e3182
1
Parent(s):
4463bb5
Update llm.py
Browse files
llm.py
CHANGED
@@ -23,12 +23,13 @@ def similarity(filename, repo_id, model_kwargs, query):
|
|
23 |
),
|
24 |
chain_type="stuff"
|
25 |
)
|
26 |
-
question = f""
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
32 |
result = chain.run(
|
33 |
input_documents=docs,
|
34 |
question=question
|
|
|
23 |
),
|
24 |
chain_type="stuff"
|
25 |
)
|
26 |
+
question = f"<|system|>\nYou are a intelligent chatbot and expertise in {chunks[0].page_content}.</s>\n<|user|>\n{query}.\n<|assistant|>"
|
27 |
+
# question = f"""
|
28 |
+
# Answer the question based on the context, if you don't know then output "Out of Context".
|
29 |
+
# Context: \n {chunks[0].page_content} \n
|
30 |
+
# Question: \n {query} \n
|
31 |
+
# Answer:
|
32 |
+
# """
|
33 |
result = chain.run(
|
34 |
input_documents=docs,
|
35 |
question=question
|