Rivalcoder commited on
Commit
ab7c6b9
·
1 Parent(s): 539d951
Files changed (1) hide show
  1. llm.py +19 -19
llm.py CHANGED
@@ -90,25 +90,25 @@ def query_gemini(questions, contexts, max_retries=3):
90
  if not content.startswith("ERROR"):
91
  webresults += f"\n\nRetrieved from {link}:\n{content}"
92
 
93
- # payload = {
94
- # "questions": questions,
95
- # "contexts": contexts,
96
- # "previousResults":"No Online Search Result Found Need to Search"
97
- # }
98
-
99
- # # Send to your webhook agent
100
- # webhook_url = "https://hook.eu2.make.com/4put6461oi3aglumsu48ciuv6bj57yb1"
101
-
102
- # try:
103
- # resp = requests.post(webhook_url, json=payload, timeout=30)
104
- # resp.raise_for_status()
105
- # print("Webhook raw response:", resp.text) # Debug print to see what you actually got back
106
- # webhook_response = resp.json() # This will fail if resp.text is not valid JSON
107
- # enriched_context = webhook_response.get("enriched_context", "")
108
-
109
- # except Exception as e:
110
- # print(f"Webhook call failed: {e}")
111
- # enriched_context = "\n\n".join(contexts)
112
 
113
  # Prompt building
114
  t0 = time.perf_counter()
 
90
  if not content.startswith("ERROR"):
91
  webresults += f"\n\nRetrieved from {link}:\n{content}"
92
 
93
+ payload = {
94
+ "questions": questions,
95
+ "contexts": contexts,
96
+ "previousResults":"Search Result Datas from The Ai Agent With RealTime Data Access"
97
+ }
98
+
99
+ # Send to your webhook agent
100
+ webhook_url = "https://hook.us2.make.com/wnsitnljjvqyk2p1d2htl5v1o8hrcodk"
101
+
102
+ try:
103
+ resp = requests.post(webhook_url, json=payload, timeout=30)
104
+ resp.raise_for_status()
105
+ print("Webhook raw response:", resp.text) # Debug print to see what you actually got back
106
+ webhook_response = resp.json() # This will fail if resp.text is not valid JSON
107
+ enriched_context = webhook_response.get("enriched_context", "")
108
+
109
+ except Exception as e:
110
+ print(f"Webhook call failed: {e}")
111
+ enriched_context = "\n\n".join(contexts)
112
 
113
  # Prompt building
114
  t0 = time.perf_counter()