Skip to content

Commit c8d8c5f

Browse files
finish read me
1 parent 035b8d6 commit c8d8c5f

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

README.md

+29-9
Original file line numberDiff line numberDiff line change
@@ -1089,14 +1089,8 @@ public struct FineTuningJobObject: Decodable {
10891089
public let id: String
10901090
/// The Unix timestamp (in seconds) for when the fine-tuning job was created.
10911091
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?
11001094
/// The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.
11011095
public let fineTunedModel: String?
11021096
/// 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
21322126
```
21332127
21342128
### 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+
```
21362156
21372157
### Runs
21382158
Parameters

0 commit comments

Comments
 (0)