We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8988ba5 commit 66cf0faCopy full SHA for 66cf0fa
1 file changed
Sources/FunctionCalling-AIProxySwift/FunctionCalling_AIProxySwift.swift
@@ -5,13 +5,14 @@ import FunctionCalling
5
import AIProxy
6
7
extension ToolContainer {
8
+ public typealias AIProxyOpenAITool = OpenAIChatCompletionRequestBody.Tool
9
// swiftlint:disable:next line_length
10
// https://github.com/lzell/AIProxySwift?tab=readme-ov-file#how-to-use-openai-structured-outputs-json-schemas-in-a-tool-call
- func toOpenAITools(strict: Bool = false) -> [OpenAIChatCompletionTool] {
11
+ func toOpenAITools(strict: Bool = false) -> [AIProxyOpenAITool] {
12
guard let allTools else { return [] }
13
14
return allTools.map { tool in
- OpenAIChatCompletionTool.function(
15
+ AIProxyOpenAITool.function(
16
name: tool.name,
17
description: tool.description,
18
parameters: tool.inputSchema.toJSONSchema(),
0 commit comments