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.
51 lines
1.9 KiB
Swift
51 lines
1.9 KiB
Swift
//
|
|
// WebQuestion.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct WebQuestion: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Language narrows the search to a locale, BCP-47-ish (\"en\", \"ja\"). Empty means no narrowing. */
|
|
public var language: String?
|
|
/** MaxSources caps how many pages are read. Empty means the mode's own budget. */
|
|
public var maxSources: Int64?
|
|
/** Mode is how much work to do: `search` (fast, one pass), `news` (recency biased), `research` (a plan and several rounds) or `deep` (the widest survey). Empty means research. */
|
|
public var mode: String?
|
|
/** Q is the question, in plain language. Required. */
|
|
public var q: String?
|
|
/** Sources narrows where the evidence comes from: any of `web`, `news`, `academic`, `github`, `reddit`, `x`. Each becomes a site-scoped search, so `[\"x\"]` researches X/Twitter posts rather than the open web. */
|
|
public var sources: [String]?
|
|
|
|
public init(language: String? = nil, maxSources: Int64? = nil, mode: String? = nil, q: String? = nil, sources: [String]? = nil) {
|
|
self.language = language
|
|
self.maxSources = maxSources
|
|
self.mode = mode
|
|
self.q = q
|
|
self.sources = sources
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case language
|
|
case maxSources = "max_sources"
|
|
case mode
|
|
case q
|
|
case sources
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(language, forKey: .language)
|
|
try container.encodeIfPresent(maxSources, forKey: .maxSources)
|
|
try container.encodeIfPresent(mode, forKey: .mode)
|
|
try container.encodeIfPresent(q, forKey: .q)
|
|
try container.encodeIfPresent(sources, forKey: .sources)
|
|
}
|
|
}
|
|
|