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.
69 lines
2.4 KiB
Swift
69 lines
2.4 KiB
Swift
//
|
|
// O11yO11yLLMUser.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yO11yLLMUser: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** CompletionTokens is their total output tokens. */
|
|
public var completionTokens: Int64?
|
|
/** ID is the end user's id (user.id). */
|
|
public var id: String?
|
|
/** Observations is how many observations they produced. */
|
|
public var observations: Int64?
|
|
/** PromptTokens is their total input tokens. */
|
|
public var promptTokens: Int64?
|
|
/** Sessions is how many conversations they had. */
|
|
public var sessions: Int64?
|
|
/** TotalCost is their total cost. */
|
|
public var totalCost: Double?
|
|
/** TotalTokens is their total tokens. */
|
|
public var totalTokens: Int64?
|
|
/** Traces is how many traces they produced. */
|
|
public var traces: Int64?
|
|
|
|
public init(completionTokens: Int64? = nil, id: String? = nil, observations: Int64? = nil, promptTokens: Int64? = nil, sessions: Int64? = nil, totalCost: Double? = nil, totalTokens: Int64? = nil, traces: Int64? = nil) {
|
|
self.completionTokens = completionTokens
|
|
self.id = id
|
|
self.observations = observations
|
|
self.promptTokens = promptTokens
|
|
self.sessions = sessions
|
|
self.totalCost = totalCost
|
|
self.totalTokens = totalTokens
|
|
self.traces = traces
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case completionTokens
|
|
case id
|
|
case observations
|
|
case promptTokens
|
|
case sessions
|
|
case totalCost
|
|
case totalTokens
|
|
case traces
|
|
}
|
|
|
|
// 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(id, forKey: .id)
|
|
try container.encodeIfPresent(observations, forKey: .observations)
|
|
try container.encodeIfPresent(promptTokens, forKey: .promptTokens)
|
|
try container.encodeIfPresent(sessions, forKey: .sessions)
|
|
try container.encodeIfPresent(totalCost, forKey: .totalCost)
|
|
try container.encodeIfPresent(totalTokens, forKey: .totalTokens)
|
|
try container.encodeIfPresent(traces, forKey: .traces)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension O11yO11yLLMUser: Identifiable {}
|