bigframes.extensions.core.series_mixins.AIMixin#
- class bigframes.extensions.core.series_mixins.AIMixin(obj: S)[source]#
- embed(*, endpoint: str | None = None, model: str | None = None, task_type: Literal['retrieval_query', 'retrieval_document', 'semantic_similarity', 'classification', 'clustering', 'question_answering', 'fact_verification', 'code_retrieval_query'] | None = None, title: str | None = None, model_params: Mapping[Any, Any] | None = None, connection_id: str | None = None, session: Session | None = None) S[source]#
Creates embeddings from text or image data in BigQuery.
This is an accessor for
bigframes.bigquery.ai.embed(). See that function’s documentation for detailed parameter descriptions and examples.
- generate_embedding(model: BaseEstimator | str | Series, *, output_dimensionality: int | None = None, task_type: str | None = None, start_second: float | None = None, end_second: float | None = None, interval_seconds: float | None = None, trial_id: int | None = None, session: Session | None = None) T[source]#
Creates embeddings that describe an entity — for example, a piece of text or an image.
This is an accessor for
bigframes.bigquery.ai.generate_embedding(). See that function’s documentation for detailed parameter descriptions and examples.
- generate_table(model: BaseEstimator | str | Series, *, output_schema: str | Mapping[str, str], temperature: float | None = None, top_p: float | None = None, max_output_tokens: int | None = None, stop_sequences: List[str] | None = None, request_type: str | None = None, session: Session | None = None) T[source]#
Generates a table using a BigQuery ML model.
This is an accessor for
bigframes.bigquery.ai.generate_table(). See that function’s documentation for detailed parameter descriptions and examples.
- generate_text(model: BaseEstimator | str | Series, *, temperature: float | None = None, max_output_tokens: int | None = None, top_k: int | None = None, top_p: float | None = None, stop_sequences: List[str] | None = None, ground_with_google_search: bool | None = None, request_type: str | None = None, session: Session | None = None) T[source]#
Generates text using a BigQuery ML model.
This is an accessor for
bigframes.bigquery.ai.generate_text(). See that function’s documentation for detailed parameter descriptions and examples.
- similarity(other: str | Series | Series, *, endpoint: str | None = None, model: str | None = None, model_params: Mapping[Any, Any] | None = None, connection_id: str | None = None, session: Session | None = None) S[source]#
Returns a FLOAT64 value that represents the cosine similarity between the two inputs.
This is an accessor for
bigframes.bigquery.ai.similarity(). See that function’s documentation for detailed parameter descriptions and examples.