kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
pull/693/head
rodzic
e0fa4cded9
commit
43bda73d09
|
@ -19,24 +19,3 @@ export function createAISDKTools(...aiFunctionLikeTools: AIFunctionLike[]) {
|
|||
])
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a set of Agentic stdlib AI functions to an object compatible with
|
||||
* the Vercel AI SDK's `experimental_activeTools` parameter.
|
||||
*/
|
||||
export function createAISDKExperimentalActiveTools(
|
||||
...aiFunctionLikeTools: AIFunctionLike[]
|
||||
) {
|
||||
const fns = new AIFunctionSet(aiFunctionLikeTools)
|
||||
|
||||
return Object.fromEntries(
|
||||
fns.map((fn) => [
|
||||
fn.spec.name,
|
||||
tool({
|
||||
description: fn.spec.description,
|
||||
parameters: fn.inputSchema,
|
||||
execute: fn.impl
|
||||
})
|
||||
])
|
||||
)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue