Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/LLMChatOpenAI/ChatCompletion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
/// A struct that represents a chat completion response.
public struct ChatCompletion: Decodable, Sendable {
/// A unique identifier for the chat completion.
public let id: String
public let id: String?

/// An array of chat completion choices. Can be more than one if `n` is greater than 1.
public let choices: [Choice]
Expand Down
2 changes: 1 addition & 1 deletion Sources/LLMChatOpenAI/ChatCompletionChunk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
/// A struct that represents a streamed chunk of a chat completion response.
public struct ChatCompletionChunk: Decodable, Sendable {
/// A unique identifier for the chat completion. Each chunk has the same identifier.
public let id: String
public let id: String?

/// An array of chat completion choices. Can contain more than one elements if `n` is greater than 1.
public var choices: [Choice]
Expand Down