GoogleCloudPlatform / firebase-extensions

Apache License 2.0
75 stars 36 forks source link

[firestore-genai-chatbot]: strange error (may be filters not handled correctly) #387

Open cabljac opened 7 months ago

cabljac commented 7 months ago

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

Issues filed here should be about bugs for a specific extension in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

[REQUIRED] Step 2: Describe your configuration

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

  1. install extension with overrides on and a nested COLLECTION_NAME/COLLECTION_PATH param
  2. add context "you are a pirate" to the parent doc
  3. add the first prompt "hello"

This results in the following error:

Screenshot 2024-02-26 at 08 53 15

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

MrDariusAD commented 6 months ago

I also have this issue for some days now. I also tried to adjust my context but it didn't help. My logs look like this:

ClientError: [VertexAI.ClientError]: got status: 400 Bad Request 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 }