Skip to content

Commit a34de92

Browse files
committed
modify 'temperature' and 'top_p'
1 parent 874eb57 commit a34de92

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Diff for: crawler_module/web_content_crawler.py

+10
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ async def parse_content(self, html, url):
4949
for script_or_style in soup(['script', 'style', 'head', 'meta', 'link']):
5050
script_or_style.decompose()
5151

52+
# Find all elements whose class names start with "footer" and remove them
53+
footer_elements = soup.find_all(class_=lambda value: value and value.startswith('footer'))
54+
for element in footer_elements:
55+
element.decompose()
56+
57+
# Find all elements whose class names start with "navbar" and remove them
58+
#navbar_elements = soup.find_all(class_=lambda value: value and value.startswith('navbar'))
59+
#for element in navbar_elements:
60+
# element.decompose()
61+
5262
last_element_text = ''
5363
if soup.body:
5464
for element in soup.body.descendants:

Diff for: smart_qa_app.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ def search_and_answer(query, user_id, k=RECALL_TOP_K, is_streaming=False):
239239
model=GPT_MODEL_NAME,
240240
response_format={ "type": "json_object" },
241241
messages=[{"role": "system", "content": prompt}],
242-
temperature=0,
242+
temperature=0.1,
243+
top_p=0.8,
243244
stream=is_streaming
244245
)
245246
return response

0 commit comments

Comments
 (0)