Abdul-Haseeb commited on
Commit
aaced9c
·
verified ·
1 Parent(s): f45a3af

Update pipelines.py

Browse files
Files changed (1) hide show
  1. pipelines.py +7 -1
pipelines.py CHANGED
@@ -18,7 +18,10 @@ import os
18
  HUGGINGFACE_API_KEY = os.getenv('HUGGINGFACE_API_KEY')
19
 
20
  # Define your quiz generation template
21
- quiz_generation_template = """Given the following text, create only 4 multiple-choice or true-false questions in JSON format randomly.
 
 
 
22
  The options should be unambiguous.
23
  For multiple-choice questions, each option should begin with a letter followed by a period and a space (e.g., "a. option").
24
  For true-false questions, there should be only two options that is ('true','false').
@@ -39,6 +42,9 @@ IMPORTANT: Do not write anything else and stop generating after once!!!
39
  text:
40
  {% for doc in documents %}{{ doc.content|truncate(3800) }}{% endfor %}
41
  """
 
 
 
42
 
43
  def generate_quiz_pipeline():
44
  #prompt_builder = DynamicChatPromptBuilder()
 
18
  HUGGINGFACE_API_KEY = os.getenv('HUGGINGFACE_API_KEY')
19
 
20
  # Define your quiz generation template
21
+ quiz_generation_template = [
22
+ {
23
+ "role": "user",
24
+ "content": """Given the following text, create only 4 multiple-choice or true-false questions in JSON format randomly.
25
  The options should be unambiguous.
26
  For multiple-choice questions, each option should begin with a letter followed by a period and a space (e.g., "a. option").
27
  For true-false questions, there should be only two options that is ('true','false').
 
42
  text:
43
  {% for doc in documents %}{{ doc.content|truncate(3800) }}{% endfor %}
44
  """
45
+ }
46
+ ]
47
+
48
 
49
  def generate_quiz_pipeline():
50
  #prompt_builder = DynamicChatPromptBuilder()