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.
41 lines
1.2 KiB
Swift
41 lines
1.2 KiB
Swift
//
|
|
// ContextIn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ContextIn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** BudgetTokens caps the bundle's size. Clamped to [256, 32000]; 0 or absent uses 4000. */
|
|
public var budgetTokens: Int64?
|
|
/** Query is what to retrieve context for. Required, max 4000 bytes. */
|
|
public var query: String?
|
|
/** Repo narrows retrieval to one repository. Empty searches every repo the org has indexed. */
|
|
public var repo: String?
|
|
|
|
public init(budgetTokens: Int64? = nil, query: String? = nil, repo: String? = nil) {
|
|
self.budgetTokens = budgetTokens
|
|
self.query = query
|
|
self.repo = repo
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case budgetTokens
|
|
case query
|
|
case repo
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(budgetTokens, forKey: .budgetTokens)
|
|
try container.encodeIfPresent(query, forKey: .query)
|
|
try container.encodeIfPresent(repo, forKey: .repo)
|
|
}
|
|
}
|
|
|