Skip to content

[feat] expose tokens/timings through REST API calls #1887

@Elijas

Description

@Elijas

Use case

Use case use REST APIs to get token counts, timings etc. associated with the request, but keep REST API stateless

Solution Idea

There could be a middle-ground API across all clients, including API clients

pseudocode of /call_with_metrics implementation:

function b.with_stats.Any(...):
    c = Collector()
    r = b.Any(..., collector=c)
    return {result: r, stats: c.stats}

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