kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
old-agentic
rodzic
66a962ce00
commit
b903ed6332
|
@ -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