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.
71 lines
2.5 KiB
Swift
71 lines
2.5 KiB
Swift
//
|
|
// BoardTotals.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct BoardTotals: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** tokens the models answered with */
|
|
public var completionTokens: Int64?
|
|
/** what the window cost, in cents */
|
|
public var costCents: Int64?
|
|
/** calls that did not succeed */
|
|
public var errors: Int64?
|
|
/** how many model calls the window holds */
|
|
public var generations: Int64?
|
|
/** how many distinct models were called */
|
|
public var models: Int64?
|
|
/** tokens sent to the models */
|
|
public var promptTokens: Int64?
|
|
/** share of calls that succeeded, 0..1 */
|
|
public var successRate: Double?
|
|
/** prompt plus completion */
|
|
public var totalTokens: Int64?
|
|
/** how many distinct users called them */
|
|
public var users: Int64?
|
|
|
|
public init(completionTokens: Int64? = nil, costCents: Int64? = nil, errors: Int64? = nil, generations: Int64? = nil, models: Int64? = nil, promptTokens: Int64? = nil, successRate: Double? = nil, totalTokens: Int64? = nil, users: Int64? = nil) {
|
|
self.completionTokens = completionTokens
|
|
self.costCents = costCents
|
|
self.errors = errors
|
|
self.generations = generations
|
|
self.models = models
|
|
self.promptTokens = promptTokens
|
|
self.successRate = successRate
|
|
self.totalTokens = totalTokens
|
|
self.users = users
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case completionTokens
|
|
case costCents
|
|
case errors
|
|
case generations
|
|
case models
|
|
case promptTokens
|
|
case successRate
|
|
case totalTokens
|
|
case users
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(completionTokens, forKey: .completionTokens)
|
|
try container.encodeIfPresent(costCents, forKey: .costCents)
|
|
try container.encodeIfPresent(errors, forKey: .errors)
|
|
try container.encodeIfPresent(generations, forKey: .generations)
|
|
try container.encodeIfPresent(models, forKey: .models)
|
|
try container.encodeIfPresent(promptTokens, forKey: .promptTokens)
|
|
try container.encodeIfPresent(successRate, forKey: .successRate)
|
|
try container.encodeIfPresent(totalTokens, forKey: .totalTokens)
|
|
try container.encodeIfPresent(users, forKey: .users)
|
|
}
|
|
}
|
|
|