Open
Description
Proposal summary
I would like to be able to track cost for models on bedrock. For example this code snippet is currently only logging the number of tokens and not the cost:
from opik import track, opik_context @track(type="llm") # Note - Specifying the type is this is important def llm_call(input): opik_context.update_current_span( provider="bedrock", model="claude-3-5-sonnet-20240620-v1:0", usage={ "prompt_tokens": 4, "completion_tokens": 6, "total_tokens": 10 } ) return "Hello, world!" llm_call("Hello world!")
Motivation
The problem I am trying to solve is track costs of LLM requests while using LLM models on Bedrock
Metadata
Metadata
Assignees
Labels
No labels