Hi - I'm using on-prem jupyter notebook to run the following code and am getting the error "NotFound: 404 Publisher Model `publishers/google/models/chat-bison@001` is not found". Has anyone run into this issue? Thank you.
def predict_large_language_model_sample(
project_id: str,
model_name: str,
temperature: float,
max_output_tokens: int,
top_p: float,
top_k: int,
location: str = "us-central1",
) :
"""Predict using a Large Language Model."""
vertexai.init(project=project_id, location=location)
chat_model = ChatModel.from_pretrained(model_name)
parameters = {
"temperature": temperature,
"max_output_tokens": max_output_tokens,
"top_p": top_p,
"top_k": top_k,
}
chat = chat_model.start_chat(
examples=[]
)
response=chat.send_message('''What version of PaLM are you?''',**parameters)
print(response.text)
predict_large_language_model_sample(PROJECT_ID, "chat-bison@001", 0, 256, 0.8, 40, LOCATION)
Did you ever find a fix for this?
I am getting the same error with a different model:
404 Publisher Model `publishers/google/models/textembedding-gecko` is not found.
us-central1
This worked!
Can confirm, this did work.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |