mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
56 lines
2.2 KiB
Swift
56 lines
2.2 KiB
Swift
//
|
|
// PublishedClaim.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct PublishedClaim: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Benchmark is the canonical test id the claim is about, from /catalog. */
|
|
public var benchmark: String?
|
|
/** Model is the system the score is claimed for. */
|
|
public var model: String?
|
|
/** Protocol records HOW it was scored — provider-reported, agentic, third-party-leaderboard — because a provider card and a third party running its own harness are different kinds of number and must not be blended. */
|
|
public var _protocol: String?
|
|
/** Provider is who the claim belongs to — the lab or leaderboard whose number this is. It joins a claim to the attempts measured for that same model. */
|
|
public var provider: String?
|
|
/** Score is the reported aggregate, as a percentage. */
|
|
public var score: Double?
|
|
/** Source is the citation the row was read from. A claim without one is a number nobody can check, so every write requires it. */
|
|
public var source: String?
|
|
|
|
public init(benchmark: String? = nil, model: String? = nil, _protocol: String? = nil, provider: String? = nil, score: Double? = nil, source: String? = nil) {
|
|
self.benchmark = benchmark
|
|
self.model = model
|
|
self._protocol = _protocol
|
|
self.provider = provider
|
|
self.score = score
|
|
self.source = source
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case benchmark
|
|
case model
|
|
case _protocol = "protocol"
|
|
case provider
|
|
case score
|
|
case source
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(benchmark, forKey: .benchmark)
|
|
try container.encodeIfPresent(model, forKey: .model)
|
|
try container.encodeIfPresent(_protocol, forKey: ._protocol)
|
|
try container.encodeIfPresent(provider, forKey: .provider)
|
|
try container.encodeIfPresent(score, forKey: .score)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
}
|
|
}
|
|
|