Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Please provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible please provide a summary of what steps or workarounds you have already tried, and any docs or articles you found (un)helpful.
Problem you have encountered:
Using Kaggle notebook, I've been stuck testing the embeddings with the following:
# Test Embeddings
from langchain_google_vertexai import VertexAIEmbeddings
# Initialize the embeddings model
embedding_model = VertexAIEmbeddings(
model_name="textembedding-gecko",
project="xyz",
location="us-central1"
)
sample = ["The company's revenue increased by 25% in 2023 due to strong performance in the cloud segment."]
embedding = embedding_model.embed_documents(sample)
print("✅ Embedding shape:", len(embedding[0]))
print("🔢 First 5 vector values:", embedding[0][:5])
What you expected to happen:
Instead of successfully executing the above code block, I keep getting the same error that says
"theproject# is not allowed to use Publisher Model `projects/theproject_id/locations/us-central1/publishers/google/models/textembedding-gecko@003`
Steps to reproduce:
Other information (workarounds you have tried, documentation consulted, etc):
I've checked that I pulled the project id correctly as a JSON file into the Kaggle notebook through the dataset. I just can't get past the embedding. I've enabled all the necessary vertex AI APIs, ensured permission, but to no avail.