googleapis / googleapis/python-genai
AttributeError: module 'google.genai.types' has no attribute 'FileSearchTool'
- Vorherrschende Sprache
- Python
- Sterne
- 4k
- Forks
- 1k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 41
Beschreibung
#### Environment details
- Programming language: Python 3.12
- OS: MacOS
- Language runtime version: 3.12
- Package version: 1.50.0
Problem:
We tried to use the newly released Gemini FileSearch API.
Here is the code snippet
`response = client.models.generate_content(
model="gemini-2.5-flash",
contents="""Can you list courses related to Law ?""",
config=types.GenerateContentConfig(
tools=[
types.Tool(
file_search=types.FileSearchTool(
file_search_store_names=[file_search_store.name]
)
)
]
)
)
print(response.text)`
This is throwing error AttributeError: module 'google.genai.types' has no attribute 'FileSearchTool'
The same feature i tried in the nodeJS library and its working fine.
Thanks!
Sijohn Mathew
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.