We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e09e7f2 commit bb58ab8Copy full SHA for bb58ab8
google/generativeai/client.py
@@ -27,7 +27,6 @@
27
__version__ = "0.0.0"
28
29
USER_AGENT = "genai-py"
30
-GENAI_API_DISCOVERY_URL = "https://generativelanguage.googleapis.com/$discovery/rest"
31
32
33
class FileServiceClient(glm.FileServiceClient):
@@ -43,7 +42,7 @@ def _setup_discovery_api(self):
43
42
request = googleapiclient.http.HttpRequest(
44
http=httplib2.Http(),
45
postproc=lambda resp, content: (resp, content),
46
- uri=f"{GENAI_API_DISCOVERY_URL}?version=v1beta&key={api_key}",
+ uri=f"https://{self.api_endpoint}/$discovery/rest?version=v1beta&key={api_key}",
47
)
48
response, content = request.execute()
49
0 commit comments