Enumerationmacpaw.openai 0.3.3OpenAI
ContentType
ThreadsMessagesResult.swift:34enum ContentType
enum ContentType
s6OpenAI21ThreadsMessagesResultV0C7MessageV0cF7ContentV0G4TypeO
What are these?26NYV
import OpenAI
struct ThreadsMessageContent
struct ThreadsMessagesResult
struct ThreadsMessage
case text
case imageFile
init(from decoder: any Decoder) throws
let imageFile: ThreadsMessageContentText?
let text: ThreadsMessageContentText?
let type: ContentType
struct ImageFileContentText
struct ThreadsMessageContentText
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
init?(rawValue: String)
init(from decoder: any Decoder) throws
Creates a new instance by decoding from the given decoder, when the type’s RawValue
is String
.
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func encode(to encoder: any Encoder) throws
Encodes this value into the given encoder, when the type’s RawValue
is String
.
func hash(into hasher: inout Hasher)