You-shen commited on
Commit
d2332ae
·
verified ·
1 Parent(s): a2e05d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -124,15 +124,13 @@ class FactChecker:
124
  title_marker,
125
  f"{title_marker}\n### 7. When encountering personal professional titles (positions), it is important to carefully identify them\n"
126
  )
127
- if self.deep_search:
128
- prompt_with_num = prompt_with_title.replace(
129
- num_marker,
130
- "(This 'Thought/Action/Action Input/Observation' loop can repeat up to 5 times)"
131
- )
132
- print(prompt_with_num)
133
  else:
134
  prompt_with_num = en_prompt
135
-
136
  return ChatPromptTemplate.from_template(prompt_with_num)
137
  else:
138
  num_marker = "(这个 'Thought/Action/Action Input/Observation' 逻辑可以最多重复3次)"
@@ -142,15 +140,14 @@ class FactChecker:
142
  title_marker,
143
  f"{title_marker}\n### 7. 当遇到个人职称(职位)时要仔细鉴别\n"
144
  )
145
- if self.deep_search:
146
- print("DEEPYES!")
147
- prompt_with_num = prompt_with_title.replace(
148
- num_marker,
149
- "(这个 'Thought/Action/Action Input/Observation' 逻辑可以最多重复5次)"
150
- )
151
- print(prompt_with_num)
152
  else:
153
  prompt_with_num = ch_prompt
 
154
  return ChatPromptTemplate.from_template(prompt_with_num)
155
 
156
  def get_image_prompt(self) -> str:
 
124
  title_marker,
125
  f"{title_marker}\n### 7. When encountering personal professional titles (positions), it is important to carefully identify them\n"
126
  )
127
+ prompt_with_num = prompt_with_title.replace(
128
+ num_marker,
129
+ "(This 'Thought/Action/Action Input/Observation' loop can repeat up to 5 times)" if self.deep_search else "(This 'Thought/Action/Action Input/Observation' loop can repeat up to 3 times)"
130
+ )
 
 
131
  else:
132
  prompt_with_num = en_prompt
133
+ print(prompt_with_num)
134
  return ChatPromptTemplate.from_template(prompt_with_num)
135
  else:
136
  num_marker = "(这个 'Thought/Action/Action Input/Observation' 逻辑可以最多重复3次)"
 
140
  title_marker,
141
  f"{title_marker}\n### 7. 当遇到个人职称(职位)时要仔细鉴别\n"
142
  )
143
+ prompt_with_num = prompt_with_title.replace(
144
+ num_marker,
145
+ "(这个 'Thought/Action/Action Input/Observation' 逻辑可以最多重复5次)" if self.deep_search else "(这个 'Thought/Action/Action Input/Observation' 逻辑可以最多重复3次)"
146
+ )
147
+
 
 
148
  else:
149
  prompt_with_num = ch_prompt
150
+ print(prompt_with_num)
151
  return ChatPromptTemplate.from_template(prompt_with_num)
152
 
153
  def get_image_prompt(self) -> str: