Open vi3k6i5 opened 5 days ago
Hi @vi3k6i5 , REST transport is working on my side (see the following code). Maybe it's an issue with your api endpoint?
import vertexai
from vertexai.language_models import TextEmbeddingModel
vertexai.init(
project='my-project',
api_transport='rest',
)
embedding_model = TextEmbeddingModel.from_pretrained(model_name='text-embedding-004')
resp = embedding_model.count_tokens(['Hello world'])
Thanks for stopping by to let us know something could be better!
Environment details
google-cloud-aiplatform
: 1.69.0Steps to reproduce
Code example
Stack trace
Thanks!