bigframes.ml.llm.Claude3TextGenerator#
- class bigframes.ml.llm.Claude3TextGenerator(*, model_name: Literal['claude-3-sonnet', 'claude-3-haiku', 'claude-3-5-sonnet', 'claude-3-opus'] | None = None, session: Session | None = None, connection_name: str | None = None)[source]#
Claude3 text generator LLM model.
Go to Google Cloud Console -> Vertex AI -> Model Garden page to enable the models before use. Must have the Consumer Procurement Entitlement Manager Identity and Access Management (IAM) role to enable the models. https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models#grant-permissions
Note
This product or feature is subject to the “Pre-GA Offerings Terms” in the General Service Terms section of the Service Specific Terms(https://cloud.google.com/terms/service-terms#1). Pre-GA products and features are available “as is” and might have limited support. For more information, see the launch stage descriptions (https://cloud.google.com/products#product-launch-stages).
Note
The models only available in specific regions. Check https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude#regions for details.
Note
claude-3-sonnet model is deprecated. Use other models instead.
- Parameters:
model_name (str, Default to "claude-3-sonnet") – The model for natural language tasks. Possible values are “claude-3-sonnet”, “claude-3-haiku”, “claude-3-5-sonnet” and “claude-3-opus”. “claude-3-sonnet” (deprecated) is Anthropic’s dependable combination of skills and speed. It is engineered to be dependable for scaled AI deployments across a variety of use cases. “claude-3-haiku” is Anthropic’s fastest, most compact vision and text model for near-instant responses to simple queries, meant for seamless AI experiences mimicking human interactions. “claude-3-5-sonnet” is Anthropic’s most powerful AI model and maintains the speed and cost of Claude 3 Sonnet, which is a mid-tier model. “claude-3-opus” is Anthropic’s second-most powerful AI model, with strong performance on highly complex tasks. https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude#available-claude-models If no setting is provided, “claude-3-sonnet” 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. BigQuery DataFrame will try to create the connection and attach permission if the connection isn’t fully set up.
Methods
__init__(*[, model_name, session, ...])get_params([deep])Get parameters for this estimator.
predict(X, *[, max_output_tokens, top_k, ...])Predict the result from input DataFrame.
to_gbq(model_name[, replace])Save the model to BigQuery.