mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
288 of hanzoai/ai's 294 operations now declare a response, against 1 before. GET /v1/models, POST /v1/chat/completions, /v1/embeddings, /v1/messages — every address a client actually calls — used to reach this client untyped, because cloud's relay carried an operation's sentence and dropped the shapes it named. It carries both now. Fleet-wide the document goes from 69% to 81% of operations declaring what comes back, which is where the ~208 new models here come from.
86 lines
2.9 KiB
Swift
86 lines
2.9 KiB
Swift
//
|
|
// Vector.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Vector: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var createdTime: String?
|
|
public var currency: String?
|
|
public var data: [Double]?
|
|
public var dimension: Int?
|
|
public var displayName: String?
|
|
public var file: String?
|
|
public var index: Int?
|
|
public var name: String?
|
|
public var owner: String?
|
|
public var price: Double?
|
|
public var provider: String?
|
|
public var score: Double?
|
|
public var store: String?
|
|
public var text: String?
|
|
public var tokenCount: Int?
|
|
|
|
public init(createdTime: String? = nil, currency: String? = nil, data: [Double]? = nil, dimension: Int? = nil, displayName: String? = nil, file: String? = nil, index: Int? = nil, name: String? = nil, owner: String? = nil, price: Double? = nil, provider: String? = nil, score: Double? = nil, store: String? = nil, text: String? = nil, tokenCount: Int? = nil) {
|
|
self.createdTime = createdTime
|
|
self.currency = currency
|
|
self.data = data
|
|
self.dimension = dimension
|
|
self.displayName = displayName
|
|
self.file = file
|
|
self.index = index
|
|
self.name = name
|
|
self.owner = owner
|
|
self.price = price
|
|
self.provider = provider
|
|
self.score = score
|
|
self.store = store
|
|
self.text = text
|
|
self.tokenCount = tokenCount
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case createdTime
|
|
case currency
|
|
case data
|
|
case dimension
|
|
case displayName
|
|
case file
|
|
case index
|
|
case name
|
|
case owner
|
|
case price
|
|
case provider
|
|
case score
|
|
case store
|
|
case text
|
|
case tokenCount
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(createdTime, forKey: .createdTime)
|
|
try container.encodeIfPresent(currency, forKey: .currency)
|
|
try container.encodeIfPresent(data, forKey: .data)
|
|
try container.encodeIfPresent(dimension, forKey: .dimension)
|
|
try container.encodeIfPresent(displayName, forKey: .displayName)
|
|
try container.encodeIfPresent(file, forKey: .file)
|
|
try container.encodeIfPresent(index, forKey: .index)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(owner, forKey: .owner)
|
|
try container.encodeIfPresent(price, forKey: .price)
|
|
try container.encodeIfPresent(provider, forKey: .provider)
|
|
try container.encodeIfPresent(score, forKey: .score)
|
|
try container.encodeIfPresent(store, forKey: .store)
|
|
try container.encodeIfPresent(text, forKey: .text)
|
|
try container.encodeIfPresent(tokenCount, forKey: .tokenCount)
|
|
}
|
|
}
|
|
|