evals.models.vertexai#

class VertexAIModel(default_concurrency: int = 20, _verbose: bool = False, _rate_limiter: phoenix.evals.models.rate_limiters.RateLimiter = <factory>, project: Optional[str] = None, location: Optional[str] = None, credentials: Optional[ForwardRef('Credentials')] = None, model: str = 'text-bison', tuned_model: Optional[str] = None, temperature: float = 0.0, max_tokens: int = 256, top_p: float = 0.95, top_k: int = 40, model_name: Optional[str] = None, tuned_model_name: Optional[str] = None)#

Bases: BaseModel

credentials: Credentials | None = None#
property invocation_params: Dict[str, Any]#
property is_codey_model: bool#
location: str | None = None#

The default location to use when making API calls. If not

Type:

location (str)

max_tokens: int = 256#

The maximum number of tokens to generate in the completion. -1 returns as many tokens as possible given the prompt and the models maximal context size.

model: str = 'text-bison'#
model_name: str | None = None#

Deprecated since version 3.0.0.

use model instead. This will be removed in a future release.

project: str | None = None#

The default project to use when making API calls.

Type:

project (str)

temperature: float = 0.0#

What sampling temperature to use.

top_k: int = 40#

How the model selects tokens for output, the next token is selected from

top_p: float = 0.95#

Tokens are selected from most probable to least until the sum of their

tuned_model: str | None = None#

The name of a tuned model. If provided, model is ignored.

tuned_model_name: str | None = None#

Deprecated since version 3.0.0.

use tuned_model instead. This will be removed in a future release.

verbose_generation_info() str#
is_codey_model(model_name: str) bool#

Returns True if the model name is a Codey model.

Parameters:

model_name – The model name to check.

Returns: True if the model name is a Codey model.