track_bedrock¶
- opik.integrations.bedrock.track_bedrock(client: BedrockRuntimeClient, project_name: str | None = None) BedrockRuntimeClient ¶
Adds Opik tracking to an AWS Bedrock client.
Tracks calls to converse() and converse_stream() methods Can be used within other Opik-tracked functions.
- Parameters:
client – An instance of an AWS Bedrock client (botocore.client.BedrockRuntime or botocore.client.AgentsforBedrockRuntime).
project_name – The name of the project to log data.
- Returns:
The modified bedrock client with Opik tracking enabled.