Closed DhruvinKoshiya closed 3 weeks ago
It seems that Trulens does not support cost tracking for Bedrock models, including the Bedrock Llama 2 model you're using. This limitation is noted in the Trulens codebase, specifically in tests for Bedrock models where cost tracking is explicitly disabled. This is because Trulens currently only supports cost tracking for OpenAI models.
For Bedrock models, while there is an indication that cost tracking might be possible through the Litellm integration, it's mentioned that this could be inaccurate. This suggests that any cost tracking for Bedrock models would need to be implemented manually and might not align perfectly with Trulens' existing cost tracking features.
If cost tracking is critical for your use case with Bedrock models, you might need to look into custom solutions or workarounds that can approximate the cost based on your specific usage patterns and the pricing model provided by Bedrock.
Hi @DhruvinKoshiya , do you know if Bedrock models are charged at some fixed rate that can be determined from model name?
@piotrm0 - Bedrock modes are charged per the input and output token. This document provides pricing of all the models.
Bug Description I'm trying to evaluate RAG using Trulense with the Bedrock Llama 2 model, but in the Trulense dashboard, it does not provide the cost of inference. It only shows $0. If I use OpenAI instead of Bedrock Llama 2, then it shows the price for every inference.
To Reproduce
Expected behavior Trulens should provide the cost for every inference in any LLM.
Relevant Logs/Tracebacks Trulens dashboard using Bedrock Llama 2 model.
Environment: