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/AIProxy/AIProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import UIKit
public enum AIProxy {

/// The current sdk version
public static let sdkVersion = "0.126.0"
public static let sdkVersion = "0.127.0"

/// Configures the AIProxy SDK. Call this during app launch by adding an `init` to your SwiftUI MyApp.swift file, e.g.
///
Expand Down
8 changes: 8 additions & 0 deletions Sources/AIProxy/OpenAI/OpenAICreateResponseRequestBody.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public struct OpenAICreateResponseRequestBody: Encodable {
/// Configuration options for reasoning models.
public let reasoning: Reasoning?

/// A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
/// The IDs should be a string that uniquely identifies each user.
/// We recommend hashing their username or email address, in order to avoid sending us any identifying information.
public let safetyIdentifier: String?

/// If set, partial response deltas will be sent as server-sent events.
/// Set this to true when using the streaming response method.
public var stream: Bool?
Expand Down Expand Up @@ -80,6 +85,7 @@ public struct OpenAICreateResponseRequestBody: Encodable {
case tools
case toolChoice = "tool_choice"
case reasoning
case safetyIdentifier = "safety_identifier"
case parallelToolCalls = "parallel_tool_calls"
case previousResponseId = "previous_response_id"
case prompt
Expand All @@ -101,6 +107,7 @@ public struct OpenAICreateResponseRequestBody: Encodable {
previousResponseId: String? = nil,
prompt: OpenAICreateResponseRequestBody.Prompt? = nil,
reasoning: OpenAICreateResponseRequestBody.Reasoning? = nil,
safetyIdentifier: String? = nil,
stream: Bool? = nil,
temperature: Double? = nil,
text: OpenAIResponse.TextConfiguration? = nil,
Expand All @@ -116,6 +123,7 @@ public struct OpenAICreateResponseRequestBody: Encodable {
self.previousResponseId = previousResponseId
self.prompt = prompt
self.reasoning = reasoning
self.safetyIdentifier = safetyIdentifier
self.stream = stream
self.temperature = temperature
self.text = text
Expand Down