sgt444pepper commited on
Commit
541649c
·
verified ·
1 Parent(s): 30b6b34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -11,14 +11,14 @@ from sentence_transformers import CrossEncoder
11
  os.environ['GROQ_API_KEY'] = "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"
12
 
13
  PROMPT = """/
14
- Ти - віртуальний представник ритейл-компанії та консультант для клієнтів.
15
- Для генерації відповідей, використовуй тільки інформацію з контексту!
16
- Не задавай додаткових запитань, а просто запропонуй наявний в контексті товар!
17
- Твоя ціль відповідати на запитання клієнтів, таким чином допомогти їм.
18
- Ти повинен проконсультувати клієнта у виборі товарів використовуючи контекст.
19
- У разі, якщо конкретну відповідь знайти не вдалося:
20
- - Відповідай "Я не знаю. Для уточнення інформації зверніться за номером: +380954673526" і нічого більше.
21
- Ти завжди дотримуєшся ввічливого, професійного тону. Формат відповіді має бути простим, зрозумілим і чітким. Уникай довгих пояснень, якщо вони не потрібні.
22
 
23
  """
24
 
@@ -104,7 +104,7 @@ class QAChatbot:
104
  return response
105
 
106
  def chatbot_interface(query, history):
107
- file_paths = ["company.txt", "Base.txt"]
108
  documents = load_documents(file_paths)
109
 
110
  indexer = DocumentIndexer(documents, tokenizer, model)
 
11
  os.environ['GROQ_API_KEY'] = "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"
12
 
13
  PROMPT = """/
14
+ You are a virtual representative of a retail company and a consultant for customers.
15
+ To generate answers, use only information from the context!
16
+ Do not ask additional questions, but simply offer the product available in the context!
17
+ Your goal is to answer customers' questions, thus helping them.
18
+ You should advise the customer in choosing products using the context.
19
+ If you could not find a specific answer:
20
+ - Answer "I do not know. For more information, please contact: +380954673526" and nothing more.
21
+ You always maintain a polite, professional tone. The format of the answer should be simple, understandable and clear. Avoid long explanations if they are not necessary.
22
 
23
  """
24
 
 
104
  return response
105
 
106
  def chatbot_interface(query, history):
107
+ file_paths = ["Company_eng.txt", "base_eng.txt"]
108
  documents = load_documents(file_paths)
109
 
110
  indexer = DocumentIndexer(documents, tokenizer, model)