Skip to content

Commit b3161d1

Browse files
authored
Merge pull request #15 from FunctionCalling/renovate/macpaw-openai-0.x
Update dependency MacPaw/OpenAI to from: "0.4.5"
2 parents 988e347 + 47cd051 commit b3161d1

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

Package.resolved

Lines changed: 21 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let package = Package(
1717
],
1818
dependencies: [
1919
.package(url: "https://github.com/FunctionCalling/FunctionCalling", from: "0.5.0"),
20-
.package(url: "https://github.com/MacPaw/OpenAI", from: "0.4.4")
20+
.package(url: "https://github.com/MacPaw/OpenAI", from: "0.4.5")
2121
],
2222
targets: [
2323
// Targets are the basic building blocks of a package, defining a module or a test suite.

Sources/FunctionCalling-MacPaw-OpenAI/Extension/ChatQuery+Extension.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ extension ChatQuery.ChatCompletionToolParam.FunctionDefinition {
1919
self.init(
2020
name: tool.name,
2121
description: tool.description,
22-
parameters: AnyJSONSchema(inputSchema: tool.inputSchema)
22+
parameters: JSONSchema(inputSchema: tool.inputSchema)
2323
)
2424
}
2525
}
2626

27-
extension AnyJSONSchema {
27+
extension JSONSchema {
2828
init(inputSchema: InputSchema) {
2929
self.init(fields: [
3030
.type(JSONSchemaInstanceType(type: inputSchema.type)),
31-
.properties(inputSchema.properties?.mapValues { AnyJSONSchema(inputSchema: $0) } ?? [:]),
31+
.properties(inputSchema.properties?.mapValues { JSONSchema(inputSchema: $0) } ?? [:]),
3232
.required(inputSchema.requiredProperties ?? []),
3333
.enumValues(inputSchema.enumValues ?? [])
3434
])

0 commit comments

Comments
 (0)