You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from datasets import Dataset
from bespokelabs import curator
ds = Dataset.from_dict({"prompt": ["Is there a way to create a Python class that represents a Person and has attributes for name and age?"]})
llm = curator.LLM(
prompt_func=lambda row: row["prompt"],
model_name="gemini-1.5-flash",
)
Throws
Traceback (most recent call last):
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/main.py", line 2340, in completion
model_response = vertex_chat_completion.completion( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio/gemini/vertex_and_google_ai_studio_gemini.py", line 1367, in completion
_auth_header, vertex_project = self._ensure_access_token(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio/vertex_llm_base.py", line 137, in _ensure_access_token
self._credentials, cred_project_id = self.load_auth(
^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio/vertex_llm_base.py", line 45, in load_auth
import google.auth as google_auth
ModuleNotFoundError: No module named 'google'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ryan/curator/../dcft_dump/gemini_filter.py", line 6, in <module>
llm = curator.LLM(
^^^^^^^^^^^^
File "/Users/ryan/curator/src/bespokelabs/curator/llm/llm.py", line 144, in __init__
self._request_processor = LiteLLMOnlineRequestProcessor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ryan/curator/src/bespokelabs/curator/request_processor/litellm_online_request_processor.py", line 69, in __init__
self.get_header_based_rate_limits()
File "/Users/ryan/curator/src/bespokelabs/curator/request_processor/litellm_online_request_processor.py", line 177, in get_header_based_rate_limits
headers = self.test_call()
^^^^^^^^^^^^^^^^
File "/Users/ryan/curator/src/bespokelabs/curator/request_processor/litellm_online_request_processor.py", line 148, in test_call
completion = litellm.completion(
^^^^^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/utils.py", line 960, in wrapper
raise e
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/utils.py", line 849, in wrapper
result = original_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/main.py", line 3059, in completion
raise exception_type(
^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2136, in exception_type
raise e
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2112, in exception_type
raise APIConnectionError(
litellm.exceptions.APIConnectionError: litellm.APIConnectionError: No module named 'google'
Traceback (most recent call last):
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/main.py", line 2340, in completion
model_response = vertex_chat_completion.completion( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio/gemini/vertex_and_google_ai_studio_gemini.py", line 1367, in completion
_auth_header, vertex_project = self._ensure_access_token(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio/vertex_llm_base.py", line 137, in _ensure_access_token
self._credentials, cred_project_id = self.load_auth(
^^^^^^^^^^^^^^^
File "/Users/ryan/curator/.venv/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio/vertex_llm_base.py", line 45, in load_auth
import google.auth as google_auth
ModuleNotFoundError: No module named 'google'
This happened by accidentally using gemini-1.5-flash
instead of gemini/gemini-1.5-flash.
Throws
This happened by accidentally using
gemini-1.5-flash
instead of
gemini/gemini-1.5-flash
.But this is not obvious from the error message.
https://docs.litellm.ai/docs/providers/vertex
https://docs.litellm.ai/docs/providers/gemini
The text was updated successfully, but these errors were encountered: