# Utils

Utility functions for JSON parsing, cost estimation, and token counting.

## Helpers

### safe_json_parse

::: rotalabs_eval.utils.helpers.safe_json_parse
    options:
      show_source: true

### get_api_key

::: rotalabs_eval.utils.helpers.get_api_key
    options:
      show_source: true

## Cost Estimation

### estimate_cost

::: rotalabs_eval.utils.cost.estimate_cost
    options:
      show_source: true

### estimate_eval_cost

::: rotalabs_eval.utils.cost.estimate_eval_cost
    options:
      show_source: true

### MODEL_PRICING

::: rotalabs_eval.utils.cost.MODEL_PRICING
    options:
      show_source: true

## Token Counting

### count_tokens

::: rotalabs_eval.utils.tiktoken_cache.count_tokens
    options:
      show_source: true

### estimate_tokens

::: rotalabs_eval.utils.tiktoken_cache.estimate_tokens
    options:
      show_source: true

### truncate_to_tokens

::: rotalabs_eval.utils.tiktoken_cache.truncate_to_tokens
    options:
      show_source: true
