
Я следую инструкцию и соберите три строки из следующих мест (выделено желтым):


Итак, на данный момент ячейка Colab, принимающая параметры, выглядит следующим образом:
[img]https:// i.sstatic.net/GGslV1QE.png[/img]
Проблема возникает, когда я запускаю модель. Вот код из ячейки, в которой возникает проблема, и ее обратная трассировка:
Код: Выделить всё
from langchain_google_vertexai import GemmaVertexAIModelGarden, GemmaChatVertexAIModelGarden
llm = GemmaVertexAIModelGarden(
endpoint_id=endpoint_id,
project=project,
location=location,
)
output = llm.invoke("What is the meaning of life?")
print(output)
Код: Выделить всё
_InactiveRpcError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*args, **kwargs)
75 try:
---> 76 return callable_(*args, **kwargs)
77 except grpc.RpcError as exc:
11 frames
_InactiveRpcError:
The above exception was the direct cause of the following exception:
InvalidArgument Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*args, **kwargs)
76 return callable_(*args, **kwargs)
77 except grpc.RpcError as exc:
---> 78 raise exceptions.from_grpc_error(exc) from exc
79
80 return error_remapped_callable
InvalidArgument: 400 Invalid Endpoint name: projects/use-gemma/locations/us-east1/endpoints/google_gemma-1_1-2b-it-mg-one-click-deploy.
Подробнее здесь: https://stackoverflow.com/questions/788 ... odelgarden