3 ms·
That particular task didn't need parallel agents or any of the advanced features. The prompt was: <prompt> Research claude pricing with caching and then review
by irthomasthomas 2y ago
That particular task didn't need parallel agents or any of the advanced features.
The prompt was:
<prompt>
Research claude pricing with caching and then review a conversation history to calculate the cost.
First, search online for pricing for anthropic api with and without caching enabled for all of the models: claude-3-haiku, claude-3-opus and claude-3.5-sonnet (sonnet 3.5).
Create a json file with ALL the pricing data.
from the llm history db, fetch the response.response_json.usage for each result under conversation_id=01j7jzcbxzrspg7qz9h8xbq1ww
llm_db=$(llm logs path)
schema=$(sqlite3 $llm_db '.schema')
example usage: {
"input_tokens": 1086,
"output_tokens": 1154,
"cache_creation_input_tokens": 2364,
"cache_read_input_tokens": 0
}
Calculate the actual costs of each prompt by using the usage object for each response based the actual token usage cached or not.
Also calculate/simulate what it would have cost if the tokens where not cached.
Create interactive graphs of different kinds to show the real cost of conversation, the cache usage, and a comparison to what it would have costed without caching.
Write to intermediary files along the way.
Ask me if anything is unclear.
</prompt>
I just gave it your task and I'll share the results tomorrow (I'm off to bed).