Skip to content

Commit

Permalink
feat: adds doneReason to chat and generation responses (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhermawan authored Jul 30, 2024
1 parent 85a7c55 commit 5f36880
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/OllamaKit/Responses/OKChatResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public struct OKChatResponse: OKCompletionResponse, Decodable {
/// A boolean indicating whether the chat session is complete.
public let done: Bool

/// An optional string indicating the cause for the completion of the chat session.
public let doneReason: String?

/// An optional integer representing the total duration of processing the request.
public let totalDuration: Int?

Expand Down
3 changes: 3 additions & 0 deletions Sources/OllamaKit/Responses/OKGenerateResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public struct OKGenerateResponse: OKCompletionResponse, Decodable {
/// A boolean indicating whether the generation process is complete.
public let done: Bool

/// An optional string indicating the cause for the completion of the generation.
public let doneReason: String?

/// An optional integer representing the total duration of processing the request.
public let totalDuration: Int?

Expand Down

0 comments on commit 5f36880

Please sign in to comment.