Skip to content

Commit

Permalink
finish read me
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrochabrun committed Nov 29, 2023
1 parent 035b8d6 commit c8d8c5f
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1089,14 +1089,8 @@ public struct FineTuningJobObject: Decodable {
public let id: String
/// The Unix timestamp (in seconds) for when the fine-tuning job was created.
public let createdAt: Int

//TODO: Error
/**
error
object or null
For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
*/

/// For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
public let error: OpenAIErrorResponse.Error?
/// The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.
public let fineTunedModel: String?
/// 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.
Expand Down Expand Up @@ -2132,7 +2126,33 @@ let messages = try await service.listMessages(threadID: threadID, limit: nil, or
```
### Message File Object
Documentation in progress. 👷‍♂️
[A list of files attached to a message](https://platform.openai.com/docs/api-reference/messages/file-object)
Response
```swift
public struct MessageFileObject: Decodable {
/// The identifier, which can be referenced in API endpoints.
public let id: String
/// The object type, which is always thread.message.file.
public let object: String
/// The Unix timestamp (in seconds) for when the message file was created.
public let createdAt: Int
}
```
Usage
[Retrieve Message File](https://platform.openai.com/docs/api-reference/messages/getMessageFile)
```swift
let threadID = "thread_abc123"
let messageID = "msg_abc123"
let fileID = "file-abc123"
let messageFile = try await service.retrieveMessageFile(threadID: threadID, messageID: messageID, fileID: fileID)
```
[List Message Files](https://platform.openai.com/docs/api-reference/messages/listMessageFiles0)
```swift
let threadID = "thread_abc123"
let messageID = "msg_abc123"
let messageFiles = try await service.listMessageFiles(threadID: threadID, messageID: messageID, limit: nil, order: nil, after: nil, before: v)
```
### Runs
Parameters
Expand Down

0 comments on commit c8d8c5f

Please sign in to comment.