Spaces:
Running
Running
Update geminisearch.py
Browse files- geminisearch.py +2 -5
geminisearch.py
CHANGED
@@ -12,23 +12,20 @@ google_search_tool = Tool(
|
|
12 |
google_search = GoogleSearch()
|
13 |
)
|
14 |
|
15 |
-
def webSearch(prompt
|
16 |
"""
|
17 |
Searches the web using Google Search.
|
18 |
|
19 |
Args:
|
20 |
prompt: A string representing the search query
|
21 |
-
history: A placeholder representing query history
|
22 |
|
23 |
Returns:
|
24 |
Search results in natural language.
|
25 |
"""
|
26 |
|
27 |
-
combined_prompt = f"Current information: \n\nQuestion: {prompt}"
|
28 |
-
|
29 |
response = client.models.generate_content(
|
30 |
model=model_id,
|
31 |
-
contents=
|
32 |
config=GenerateContentConfig(
|
33 |
tools=[google_search_tool],
|
34 |
response_modalities=["TEXT"],
|
|
|
12 |
google_search = GoogleSearch()
|
13 |
)
|
14 |
|
15 |
+
def webSearch(prompt):
|
16 |
"""
|
17 |
Searches the web using Google Search.
|
18 |
|
19 |
Args:
|
20 |
prompt: A string representing the search query
|
|
|
21 |
|
22 |
Returns:
|
23 |
Search results in natural language.
|
24 |
"""
|
25 |
|
|
|
|
|
26 |
response = client.models.generate_content(
|
27 |
model=model_id,
|
28 |
+
contents=prompt,
|
29 |
config=GenerateContentConfig(
|
30 |
tools=[google_search_tool],
|
31 |
response_modalities=["TEXT"],
|