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

[Multimodal Tasks with the Gemini API] Publisher Model not found #522

Open
jaybconsulting opened this issue Jun 19, 2024 · 2 comments
Open

Comments

@jaybconsulting
Copy link

jaybconsulting commented Jun 19, 2024

Describe your configuration

  • Extension name: Multimodal Tasks with the Gemini API
  • Extension version: 1.0.0
  • Configuration values:
    • Gemini API Provider: vertex-ai
    • Gemini model: gemini-1.0-pro
    • Google AI API Key: [Parameter not set]
    • Firestore Collection Path: users/{uid}/{realmId}
    • Prompt: "Summarize this transaction"
    • Image field: [Parameter not set]
    • Response Field: [output]
    • Cloud Functions location: us-west2
    • Temperature: 0.1
    • All other configuration parameters were left as defaults

Describe the problem

When I added a new document to the users/{uid}/{realmId} collection in my Firestore database, a "status" map was added to my document with an "error" key of "An error occurred while processing the provided message, failed to generate content, see function logs for details".

The Cloud Function logs show the following message:

{
  "textPayload": "ClientError: [VertexAI.ClientError]: got status: 404 Not Found. {\"error\":{\"code\":404,\"message\":\"Publisher Model `projects/booksmart-6870c/locations/us-west2/publishers/google/models/gemini-1.0-pro` not found.\",\"status\":\"NOT_FOUND\"}}\n    at throwErrorIfNotOK (/workspace/node_modules/@google-cloud/vertexai/build/src/functions/post_fetch_processing.js:32:19)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async generateContentStream (/workspace/node_modules/@google-cloud/vertexai/build/src/functions/generate_content.js:90:5)\n    at async VertexLanguageClient.generate (/workspace/lib/generative-client/vertex_ai.js:63:36)\n    at async /workspace/lib/index.js:69:24 {\n  stackTrace: undefined\n}",
  "insertId": "66730b4f000e0547422191ef",
  "resource": {
    "type": "cloud_function",
    "labels": {
      "region": "us-west2",
      "project_id": "booksmart-6870c",
      "function_name": "ext-firestore-multimodal-genai-generateText"
    }
  },
  "timestamp": "2024-06-19T16:46:07.918855Z",
  "severity": "ERROR",
  "labels": {
    "execution_id": "9iw8yb7ut9vu",
    "instance_id": "005b708770540ea71cb38bf2fec9bdf216ac60625d6040905efe49549d0ceb2c0c128afcd54de1b780ddc45206897b345986dc2a6b07cf307977340d34843e1d",
    "runtime_version": "nodejs18_20240616_18_20_3_RC00"
  },
  "logName": "projects/booksmart-6870c/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
  "trace": "projects/booksmart-6870c/traces/282d831499c124eb2167ceec4c69a637",
  "receiveTimestamp": "2024-06-19T16:46:08.078329165Z",
  "errorGroups": [
    {
      "id": "CN7n7NT9uMq9bw"
    }
  ]
}

Here's the error for better readability:

{"error":
   {"code":404,
    "message": "Publisher Model `projects/booksmart-6870c/locations/us-west2/publishers/google/models/gemini-1.0-pro` not found.",
   "status":"NOT_FOUND"
   }
}
at throwErrorIfNotOK (/workspace/node_modules/@google-cloud/vertexai/build/src/functions/post_fetch_processing.js:32:19)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

at async generateContentStream (/workspace/node_modules/@google-cloud/vertexai/build/src/functions/generate_content.js:90:5)

at async VertexLanguageClient.generate (/workspace/lib/generative-client/vertex_ai.js:63:36)

at async /workspace/lib/index.js:69:24 

{stackTrace: undefined}

Steps to reproduce:

Added the extension to my project, filled out the configuration, then added a document to the appropriate collection (users/{uid}/{realmId}

Expected result

Adding a "output" map to my document with a response from the Gemini API.

Actual result

Added a "status" map to my document with the error message described above.

@jaybconsulting
Copy link
Author

jaybconsulting commented Jun 19, 2024

Figured it out. Was the same issue as issue 380, here: #380

Note that the documentation here https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations says us-west2 is available for Vertex AI, but clearly that's not the case. As outlined in issue 380 as well, the drop down menu when setting up the extension still has us-west2. This should be removed until it's supported.

@jaybconsulting
Copy link
Author

Keeping it open so the documentation and the dropdown in the extension setup screen can be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants