Removed print
Browse files
app.py
CHANGED
@@ -5,7 +5,6 @@ import math
|
|
5 |
import json
|
6 |
import time
|
7 |
import re
|
8 |
-
import xml.etree.ElementTree as ET
|
9 |
from botocore.client import Config
|
10 |
|
11 |
kb_id = os.getenv('KNOWLEDGE_BASE_ID')
|
@@ -147,9 +146,6 @@ def get_answer(query, history, temperature, top_p, max_token_count):
|
|
147 |
|
148 |
response_body = json.loads(response.get('body').read())
|
149 |
response_text = response_body['results'][0]['outputText']
|
150 |
-
|
151 |
-
print("response_text:\n")
|
152 |
-
pp.pprint(response_text)
|
153 |
|
154 |
suggestions = parse_suggestions(response_text)
|
155 |
|
@@ -163,8 +159,8 @@ def get_answer(query, history, temperature, top_p, max_token_count):
|
|
163 |
article_urls_text = "\n\nFor more information, follow the links provided:\n" + "\n".join(
|
164 |
f"— https://knowledge.operativeiq.com/articles/{article_id}" for article_id in unique_article_ids)
|
165 |
|
166 |
-
response_json_str = json.dumps(response_json, indent=4)
|
167 |
-
print("Response Json:\n", response_json_str)
|
168 |
|
169 |
prompt_and_time = f"""
|
170 |
Prompt:
|
|
|
5 |
import json
|
6 |
import time
|
7 |
import re
|
|
|
8 |
from botocore.client import Config
|
9 |
|
10 |
kb_id = os.getenv('KNOWLEDGE_BASE_ID')
|
|
|
146 |
|
147 |
response_body = json.loads(response.get('body').read())
|
148 |
response_text = response_body['results'][0]['outputText']
|
|
|
|
|
|
|
149 |
|
150 |
suggestions = parse_suggestions(response_text)
|
151 |
|
|
|
159 |
article_urls_text = "\n\nFor more information, follow the links provided:\n" + "\n".join(
|
160 |
f"— https://knowledge.operativeiq.com/articles/{article_id}" for article_id in unique_article_ids)
|
161 |
|
162 |
+
# response_json_str = json.dumps(response_json, indent=4)
|
163 |
+
# print("Response Json:\n", response_json_str)
|
164 |
|
165 |
prompt_and_time = f"""
|
166 |
Prompt:
|