Skip to content

Add cost tracking via DB or API #32

@johann-petrak

Description

@johann-petrak
  • fields per logged cost:
    • provider/model
    • modelalias
    • hostname
    • user
    • project (set during enable call)
    • task (set during enable call)
    • note (set during enable call)
    • datetime
    • cost
    • input tokens
    • output tokens
    • api key env name, if provided
  • enable:
    • logging to local sqlite db file
    • logging to API endpoint (later)
  • `llms.enable_cost_logging(file=..., project=, task=, note=, url=...) # all have defaults except file and url
  • also create llms_wrapper_costs CMD for exporting, importing, and simple summarizing of cost by user/project/model etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions