Spaces:
Running
Running
Rivalcoder
commited on
Commit
Β·
db3e188
1
Parent(s):
402c718
Update L4 Version2.2
Browse files
llm.py
CHANGED
@@ -55,6 +55,7 @@ def fetch_all_links(links, timeout=10, max_workers=10):
|
|
55 |
link, content = future.result()
|
56 |
fetched_data[link] = content
|
57 |
print(f"[TIMER] Total link fetching: {time.perf_counter() - t0:.2f}s")
|
|
|
58 |
return fetched_data
|
59 |
|
60 |
def query_gemini(questions, contexts, max_retries=3):
|
@@ -126,8 +127,14 @@ Respond with only the following JSON β no explanations, no comments, no markdo
|
|
126 |
|
127 |
- If Any Retrieved Datas From Url Is There In Context Use it As Fetch From Online Request (Recently) and use it Answer based on The Question and Context Asked or told References
|
128 |
|
|
|
|
|
129 |
π CONTEXT:{context}
|
130 |
β QUESTIONS:{questions_text}
|
|
|
|
|
|
|
|
|
131 |
Your task: For each question, provide a complete, professional, and clearly written answer in 2β3 sentences using a formal but readable tone.
|
132 |
"""
|
133 |
print(f"[TIMER] Prompt build: {time.perf_counter() - t0:.2f}s")
|
|
|
55 |
link, content = future.result()
|
56 |
fetched_data[link] = content
|
57 |
print(f"[TIMER] Total link fetching: {time.perf_counter() - t0:.2f}s")
|
58 |
+
print(fetched_data)
|
59 |
return fetched_data
|
60 |
|
61 |
def query_gemini(questions, contexts, max_retries=3):
|
|
|
127 |
|
128 |
- If Any Retrieved Datas From Url Is There In Context Use it As Fetch From Online Request (Recently) and use it Answer based on The Question and Context Asked or told References
|
129 |
|
130 |
+
|
131 |
+
|
132 |
π CONTEXT:{context}
|
133 |
β QUESTIONS:{questions_text}
|
134 |
+
|
135 |
+
-- If Question Like "What is my flight number?" Then Follow Below Rules also :
|
136 |
+
###Respond Always With Number ThirdCityFlightNumber
|
137 |
+
|
138 |
Your task: For each question, provide a complete, professional, and clearly written answer in 2β3 sentences using a formal but readable tone.
|
139 |
"""
|
140 |
print(f"[TIMER] Prompt build: {time.perf_counter() - t0:.2f}s")
|