evals.models.bedrock#

class BedrockModel(default_concurrency: int = 20, _verbose: bool = False, _rate_limiter: phoenix.evals.models.rate_limiters.RateLimiter = <factory>, model_id: str = 'anthropic.claude-v2', temperature: float = 0.0, max_tokens: int = 256, top_p: float = 1, top_k: int = 256, stop_sequences: List[str] = <factory>, session: Any = None, client: Any = None, max_content_size: Optional[int] = None, extra_parameters: Dict[str, Any] = <factory>)#

Bases: BaseModel

client: Any = None#

The bedrock session client. If unset, a new one is created with boto3.

extra_parameters: Dict[str, Any]#

Any extra parameters to add to the request body (e.g., countPenalty for a21 models)

max_content_size: int | None = None#

If you’re using a fine-tuned model, set this to the maximum content size

max_tokens: int = 256#

The maximum number of tokens to generate in the completion.

model_id: str = 'anthropic.claude-v2'#

The model name to use.

session: Any = None#

A bedrock session. If provided, a new bedrock client will be created using this session.

stop_sequences: List[str]#

If the model encounters a stop sequence, it stops generating further tokens.

temperature: float = 0.0#

What sampling temperature to use.

top_k: int = 256#

The cutoff where the model no longer selects the words

top_p: float = 1#

Total probability mass of tokens to consider at each step.