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.
46 lines
1.5 KiB
Swift
46 lines
1.5 KiB
Swift
//
|
|
// AskResponse.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct AskResponse: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Answer is one or two sentences answering the question, every number in it taken from Figures. */
|
|
public var answer: String?
|
|
/** Figures are the grounded numbers the answer states, each already formatted. */
|
|
public var figures: [Figure]?
|
|
/** Followups are sharper questions to ask next, chosen from the same intent. */
|
|
public var followups: [String]?
|
|
/** Sources name the books reports the figures were computed from — \"pnl\", \"position\", \"trial\". */
|
|
public var sources: [String]?
|
|
|
|
public init(answer: String? = nil, figures: [Figure]? = nil, followups: [String]? = nil, sources: [String]? = nil) {
|
|
self.answer = answer
|
|
self.figures = figures
|
|
self.followups = followups
|
|
self.sources = sources
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case answer
|
|
case figures
|
|
case followups
|
|
case sources
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(answer, forKey: .answer)
|
|
try container.encodeIfPresent(figures, forKey: .figures)
|
|
try container.encodeIfPresent(followups, forKey: .followups)
|
|
try container.encodeIfPresent(sources, forKey: .sources)
|
|
}
|
|
}
|
|
|