Skip to content

Commit 352dc41

Browse files
Fxing tool resources
1 parent 5ec6e9a commit 352dc41

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

Sources/OpenAI/Public/Parameters/Assistant/AssistantParameters.swift

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,33 @@ public struct AssistantParameters: Encodable {
7575
topP: Double? = nil,
7676
responseFormat: ResponseFormat? = nil)
7777
{
78-
self.model = action?.model ?? self.model
79-
self.name = name
80-
self.description = description
81-
self.instructions = instructions
78+
if let action {
79+
self.model = action.model ?? self.model
80+
}
81+
if let name {
82+
self.name = name
83+
}
84+
if let description {
85+
self.description = description
86+
}
87+
if let instructions {
88+
self.instructions = instructions
89+
}
8290
self.tools = tools
83-
self.metadata = metadata
84-
self.temperature = temperature
85-
self.topP = topP
86-
self.responseFormat = responseFormat
91+
if let toolResources {
92+
self.toolResources = toolResources
93+
}
94+
if let metadata {
95+
self.metadata = metadata
96+
}
97+
if let temperature {
98+
self.temperature = temperature
99+
}
100+
if let topP {
101+
self.topP = topP
102+
}
103+
if let responseFormat {
104+
self.responseFormat = responseFormat
105+
}
87106
}
88107
}

0 commit comments

Comments
 (0)