Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[firestore-genai-chatbot] [VertexAI.ClientError]: got status: 404 Not Found when I use gemini-1.5-pro #472

Closed
suztomo opened this issue Apr 13, 2024 · 1 comment

Comments

@suztomo
Copy link

suztomo commented Apr 13, 2024

[READ] Step 1: Are you in the right place?

In https://extensions.dev/extensions/googlecloud/firestore-genai-chatbot , the source code points to this repository.

(Previously in #380, the cause of 404 Not Found was the location. It was with gemini-1.0-pro. Now it seems gemini-1.5-pro generates the same error.)

[REQUIRED] Step 2: Describe your configuration

Gemini API Provider
vertex-ai
Google AI API Key (Optional)
Parameter not set
Gemini model
gemini-1.5-pro
Firestore Collection Path
gemini/{userId}/notes
Prompt Field
prompt
Response Field
response
Order Field (Optional)
createTime
Cloud Functions location
us-west4
Context (Optional)
Parameter not set
Temperature (Optional)
Parameter not set
Nucleus sampling probability (Optional)
Parameter not set
Sampling strategy parameter (Optional)
Parameter not set
Candidate count (Optional)
1
Max Output Tokens (Optional)
Parameter not set
Candidates field (Optional)
candidates
Enable per document overrides.
no
Hate Speech Threshold (Optional)
HARM_BLOCK_THRESHOLD_UNSPECIFIED
Dangerous Content Threshold (Optional)
HARM_BLOCK_THRESHOLD_UNSPECIFIED
harassment Content Threshold (Optional)
HARM_BLOCK_THRESHOLD_UNSPECIFIED
Sexual Content Threshold (Optional)
HARM_BLOCK_THRESHOLD_UNSPECIFIED

[REQUIRED] Step 3: Describe the problem

When I tried to use gemini-1.5-pro, the extension fails to generate respond. The log shows "404 Not Found"

Screenshot 2024-04-12 at 11 29 22 PM
[VertexAI.ClientError]: got status: 404 Not Found
    at throwErrorIfNotOK (/workspace/node_modules/@google-cloud/vertexai/build/src/index.js:395:15)
    at GenerativeModel.generateContentStream (/workspace/node_modules/@google-cloud/vertexai/build/src/index.js:321:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async VertexDiscussionClient.generateResponse (/workspace/lib/generative-client/vertex_ai.js:54:36)
    at async VertexDiscussionClient.send (/workspace/lib/generative-client/base_class.js:26:16)
    at async FirestoreOnWriteProcessor.generateChatResponse [as processFn] (/workspace/lib/generate_chat_response.js:25:20)
    at async FirestoreOnWriteProcessor.run (/workspace/lib/firestore-onwrite-processor/index.js:83:28) {
  stack_trace: undefined
}

It was working fine with gemini-1.0-pro.

Steps to reproduce:

  1. Create a document with "prompt" field to a document that matches the specified collection path (Firestore Collection Path).
Expected result

The extension just works to respond message using gemini-1.5-pro.

Actual result

The document is populated with the error message "An error occurred while processing the provided message, Failed to generate response, see function logs for more details."
Screenshot 2024-04-12 at 11 36 06 PM

Read the Cloud Functions log for the function. It has the 404 error of the screenshot above.

Notes

Gemini 1.5 is in preview. https://cloud.google.com/products?hl=en#product-launch-stages:

Preview offerings are often publicly announced, but are not necessarily feature-complete, and no SLAs or technical support commitments are provided for these

So this might not get an answer.

@suztomo
Copy link
Author

suztomo commented Apr 14, 2024

It turned out that the valid value for Gemini 1.5 is "gemini-1.5-pro-preview-0409".

Screenshot 2024-04-13 at 11 03 58 PM

After I set this value there, it started working.

Note that the reason I was able to know the working model name was because I tried Gemini 1.5, which belongs to the multimodal section, in Vertex AI Studio and its "GET CODE" button showed the model name.

Screenshot 2024-04-13 at 10 49 46 PM

@suztomo suztomo closed this as completed Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant