@@ -1089,14 +1089,8 @@ public struct FineTuningJobObject: Decodable {
1089
1089
public let id: String
1090
1090
/// The Unix timestamp (in seconds) for when the fine-tuning job was created.
1091
1091
public let createdAt: Int
1092
-
1093
- // TODO: Error
1094
- /**
1095
- error
1096
- object or null
1097
- For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
1098
- */
1099
-
1092
+ /// For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
1093
+ public let error: OpenAIErrorResponse.Error ?
1100
1094
/// The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.
1101
1095
public let fineTunedModel: String ?
1102
1096
/// The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
@@ -2132,7 +2126,33 @@ let messages = try await service.listMessages(threadID: threadID, limit: nil, or
2132
2126
```
2133
2127
2134
2128
### Message File Object
2135
- Documentation in progress. 👷♂️
2129
+ [A list of files attached to a message](https://platform.openai.com/docs/api-reference/messages/file-object)
2130
+ Response
2131
+ ```swift
2132
+ public struct MessageFileObject: Decodable {
2133
+
2134
+ /// The identifier, which can be referenced in API endpoints.
2135
+ public let id: String
2136
+ /// The object type, which is always thread.message.file.
2137
+ public let object: String
2138
+ /// The Unix timestamp (in seconds) for when the message file was created.
2139
+ public let createdAt: Int
2140
+ }
2141
+ ```
2142
+ Usage
2143
+ [Retrieve Message File](https://platform.openai.com/docs/api-reference/messages/getMessageFile)
2144
+ ```swift
2145
+ let threadID = " thread_abc123"
2146
+ let messageID = " msg_abc123"
2147
+ let fileID = " file- abc123"
2148
+ let messageFile = try await service.retrieveMessageFile(threadID: threadID, messageID: messageID, fileID: fileID)
2149
+ ```
2150
+ [List Message Files](https://platform.openai.com/docs/api-reference/messages/listMessageFiles0)
2151
+ ```swift
2152
+ let threadID = " thread_abc123"
2153
+ let messageID = " msg_abc123"
2154
+ let messageFiles = try await service.listMessageFiles(threadID: threadID, messageID: messageID, limit: nil, order: nil, after: nil, before: v)
2155
+ ```
2136
2156
2137
2157
### Runs
2138
2158
Parameters
0 commit comments