mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
43 lines
1.3 KiB
Swift
43 lines
1.3 KiB
Swift
//
|
|
// O11yMetricsResponseUsage.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
/** Usage is the LLM side of the same window: how many calls, how many tokens and what they cost. It counts model traffic, not HTTP requests, so it does not reconcile with series.requests. */
|
|
public struct O11yMetricsResponseUsage: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var calls: Int64?
|
|
public var costCents: Int64?
|
|
public var series: [O11yUsageBucket]?
|
|
public var tokens: Int64?
|
|
|
|
public init(calls: Int64? = nil, costCents: Int64? = nil, series: [O11yUsageBucket]? = nil, tokens: Int64? = nil) {
|
|
self.calls = calls
|
|
self.costCents = costCents
|
|
self.series = series
|
|
self.tokens = tokens
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case calls
|
|
case costCents
|
|
case series
|
|
case tokens
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(calls, forKey: .calls)
|
|
try container.encodeIfPresent(costCents, forKey: .costCents)
|
|
try container.encodeIfPresent(series, forKey: .series)
|
|
try container.encodeIfPresent(tokens, forKey: .tokens)
|
|
}
|
|
}
|
|
|