oc_chat
Loading...
Searching...
No Matches
turn_cost.py File Reference

Go to the source code of this file.

Classes

class  oc_chat.core.turn_cost.TurnCost
class  oc_chat.core.turn_cost.TurnCostAccumulator

Namespaces

namespace  oc_chat
namespace  oc_chat.core
namespace  oc_chat.core.turn_cost

Functions

Optional[CanonicalUsage] oc_chat.core.turn_cost._canonical_sample (int cache_hit_tokens, int cache_miss_tokens, int prompt_tokens, int completion_tokens)
float|None oc_chat.core.turn_cost.price_usage (str provider, str model, *, int cache_hit_tokens, int cache_miss_tokens, int prompt_tokens, int completion_tokens, Optional[datetime] at)

Variables

str oc_chat.core.turn_cost.MIXED_MODEL = "mixed"
 oc_chat.core.turn_cost._MONEY_CONTEXT = Context(prec=28, rounding=ROUND_HALF_EVEN)
 oc_chat.core.turn_cost._USD_QUANTUM = Decimal("0.000001")