Skip to content

Commit

Permalink
fix: add enum values
Browse files Browse the repository at this point in the history
Signed-off-by: rawnly <[email protected]>
  • Loading branch information
rawnly committed Nov 19, 2023
1 parent d393a43 commit 6228d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/OpenAI/Public/Models/Chat/JSONSchema.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public struct JSONSchema: Codable, Equatable {
public let maxItems: Int?
public let uniqueItems: Bool?

public static func string(description: String?=nil) -> Self {
return Property(type: .string, description: description)
public static func string(description: String?=nil, enumValues: [String]?=nil) -> Self {
return Property(type: .string, description: description, enumValues: enumValues)
}

public static func boolean(description: String?=nil) -> Self {
Expand Down

0 comments on commit 6228d63

Please sign in to comment.