bigframes.ml.llm.TextEmbeddingGenerator#
- class bigframes.ml.llm.TextEmbeddingGenerator(*, model_name: Literal['text-embedding-005', 'text-embedding-004', 'text-multilingual-embedding-002'] | None = None, session: Session | None = None, connection_name: str | None = None)[source]#
Text embedding generator LLM model.
Note
text-embedding-004 is going to be deprecated. Use text-embedding-005(https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.TextEmbeddingGenerator) instead.
- Parameters:
model_name (str, Default to "text-embedding-004") – The model for text embedding. Possible values are “text-embedding-005”, “text-embedding-004” or “text-multilingual-embedding-002”. text-embedding models returns model embeddings for text inputs. text-multilingual-embedding models returns model embeddings for text inputs which support over 100 languages. If no setting is provided, “text-embedding-004” will be used by default and a warning will be issued.
session (bigframes.Session or None) – BQ session to create the model. If None, use the global default session.
connection_name (str or None) – Connection to connect with remote service. str of the format <PROJECT_NUMBER/PROJECT_ID>.<LOCATION>.<CONNECTION_ID>. If None, use default connection in session context.
Methods
__init__(*[, model_name, session, ...])get_params([deep])Get parameters for this estimator.
predict(X, *[, max_retries])Predict the result from input DataFrame.
to_gbq(model_name[, replace])Save the model to BigQuery.