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.
70 lines
2.3 KiB
Swift
70 lines
2.3 KiB
Swift
//
|
|
// Memory.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Memory: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var content: String?
|
|
public var createdTime: String?
|
|
public var dimension: Int?
|
|
public var embedding: [Double]?
|
|
public var kind: String?
|
|
public var metadata: [String: String]?
|
|
public var name: String?
|
|
public var owner: String?
|
|
public var score: Double?
|
|
public var updatedTime: String?
|
|
public var userId: String?
|
|
|
|
public init(content: String? = nil, createdTime: String? = nil, dimension: Int? = nil, embedding: [Double]? = nil, kind: String? = nil, metadata: [String: String]? = nil, name: String? = nil, owner: String? = nil, score: Double? = nil, updatedTime: String? = nil, userId: String? = nil) {
|
|
self.content = content
|
|
self.createdTime = createdTime
|
|
self.dimension = dimension
|
|
self.embedding = embedding
|
|
self.kind = kind
|
|
self.metadata = metadata
|
|
self.name = name
|
|
self.owner = owner
|
|
self.score = score
|
|
self.updatedTime = updatedTime
|
|
self.userId = userId
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case content
|
|
case createdTime
|
|
case dimension
|
|
case embedding
|
|
case kind
|
|
case metadata
|
|
case name
|
|
case owner
|
|
case score
|
|
case updatedTime
|
|
case userId
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(content, forKey: .content)
|
|
try container.encodeIfPresent(createdTime, forKey: .createdTime)
|
|
try container.encodeIfPresent(dimension, forKey: .dimension)
|
|
try container.encodeIfPresent(embedding, forKey: .embedding)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(metadata, forKey: .metadata)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(owner, forKey: .owner)
|
|
try container.encodeIfPresent(score, forKey: .score)
|
|
try container.encodeIfPresent(updatedTime, forKey: .updatedTime)
|
|
try container.encodeIfPresent(userId, forKey: .userId)
|
|
}
|
|
}
|
|
|