raghavNCI
commited on
Commit
·
d229ca3
1
Parent(s):
9d31665
changes v7
Browse files- question.py +5 -0
question.py
CHANGED
@@ -33,7 +33,12 @@ async def ask_question(input: QuestionInput):
|
|
33 |
query_string = " AND ".join(f'"{kw}"' for kw in keywords[:7])
|
34 |
encoded_query = quote_plus(query_string)
|
35 |
|
|
|
|
|
36 |
gnews_url = f"https://gnews.io/api/v4/search?q={query_string}&lang=en&max=3&expand=content&token={GNEWS_API_KEY}"
|
|
|
|
|
|
|
37 |
try:
|
38 |
response = requests.get(gnews_url, timeout=10)
|
39 |
response.raise_for_status()
|
|
|
33 |
query_string = " AND ".join(f'"{kw}"' for kw in keywords[:7])
|
34 |
encoded_query = quote_plus(query_string)
|
35 |
|
36 |
+
print("Query string", query_string)
|
37 |
+
|
38 |
gnews_url = f"https://gnews.io/api/v4/search?q={query_string}&lang=en&max=3&expand=content&token={GNEWS_API_KEY}"
|
39 |
+
|
40 |
+
print("GNEWS URL", gnews_url)
|
41 |
+
|
42 |
try:
|
43 |
response = requests.get(gnews_url, timeout=10)
|
44 |
response.raise_for_status()
|