Closed jm-nab closed 7 months ago
@jm-nab What value are you passing in for model_name
?
Hi @sasha-gitg the model name string being passed in at the top is: google/gemini-pro@001
I see though after it works it way through langchain to the python sdk it looks like its trying to find it in us-central1 by default? even though the project stuff is in us-east4-b? would that cause an issue?
From the traceback above:
-> stream = self._prediction_client.stream_generate_content(request=request)
(Pdb) request
model: "projects/genai-qa-230803/locations/us-central1/google/gemini-pro@001"
contents {
role: "user"
parts {
text: "Answer the question at the end. \nWhen providing code samples, write them in codeblocks.\nAnswer in english.\nWhen providing how to\'s, write them as lists.\n\n\nQuestion: how do i operate a husqvarna snow blower?\nAnswer:"
}
}
generation_config {
temperature: 0.5
top_p: 0.7
top_k: 2
candidate_count: 1
max_output_tokens: 1024
}
Thank you for the quick response, any other debugging i can add?
You shouldn't use the @001
version for gemini-pro
. Just pass gemini-pro
.
You should be able to set the location in Langchain:
llm = VertexAI(..., location='us-central1')
@sasha-gitg ah! Thank you, that was it!
I was confused by the documentation here: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemini-pro
I had been able to previously copy and paste the model names at the bottom and it'd work, so i tried that approach again.
I was excited to give gemini a try, but ran into an issue. Any way to debug this? or info that I can grab to fix this?
Environment details
Code example
Stack trace
Related: