-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add transformation copilot to ingestion (generated)
algolia/api-clients-automation#3479 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
- Loading branch information
1 parent
4881704
commit 3b051ad
Showing
3 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on | ||
// https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
|
||
import Foundation | ||
#if canImport(Core) | ||
import Core | ||
#endif | ||
|
||
public struct Model: Codable, JSONEncodable { | ||
public var fullname: String | ||
public var modelName: String | ||
public var systemPrompt: String | ||
public var id: String | ||
public var provider: String | ||
|
||
public init(fullname: String, modelName: String, systemPrompt: String, id: String, provider: String) { | ||
self.fullname = fullname | ||
self.modelName = modelName | ||
self.systemPrompt = systemPrompt | ||
self.id = id | ||
self.provider = provider | ||
} | ||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable { | ||
case fullname | ||
case modelName | ||
case systemPrompt | ||
case id | ||
case provider | ||
} | ||
|
||
// Encodable protocol methods | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
try container.encode(self.fullname, forKey: .fullname) | ||
try container.encode(self.modelName, forKey: .modelName) | ||
try container.encode(self.systemPrompt, forKey: .systemPrompt) | ||
try container.encode(self.id, forKey: .id) | ||
try container.encode(self.provider, forKey: .provider) | ||
} | ||
} | ||
|
||
extension Model: Equatable { | ||
public static func ==(lhs: Model, rhs: Model) -> Bool { | ||
lhs.fullname == rhs.fullname && | ||
lhs.modelName == rhs.modelName && | ||
lhs.systemPrompt == rhs.systemPrompt && | ||
lhs.id == rhs.id && | ||
lhs.provider == rhs.provider | ||
} | ||
} | ||
|
||
extension Model: Hashable { | ||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(self.fullname.hashValue) | ||
hasher.combine(self.modelName.hashValue) | ||
hasher.combine(self.systemPrompt.hashValue) | ||
hasher.combine(self.id.hashValue) | ||
hasher.combine(self.provider.hashValue) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on | ||
// https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
|
||
import Foundation | ||
#if canImport(Core) | ||
import Core | ||
#endif | ||
|
||
/// List of available AI models for transformation purposes. | ||
public struct TransformationModels: Codable, JSONEncodable { | ||
public var llms: [Model] | ||
|
||
public init(llms: [Model]) { | ||
self.llms = llms | ||
} | ||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable { | ||
case llms | ||
} | ||
|
||
// Encodable protocol methods | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
try container.encode(self.llms, forKey: .llms) | ||
} | ||
} | ||
|
||
extension TransformationModels: Equatable { | ||
public static func ==(lhs: TransformationModels, rhs: TransformationModels) -> Bool { | ||
lhs.llms == rhs.llms | ||
} | ||
} | ||
|
||
extension TransformationModels: Hashable { | ||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(self.llms.hashValue) | ||
} | ||
} |