diff --git a/legacy/docs/sdks/xsai.mdx b/legacy/docs/sdks/xsai.mdx
index 0cbd041f..3d42ad58 100644
--- a/legacy/docs/sdks/xsai.mdx
+++ b/legacy/docs/sdks/xsai.mdx
@@ -4,7 +4,7 @@ description: Agentic adapter for the xsAI SDK.
---
- package: `@agentic/xsai`
-- exports: `function createXSAISDKTools`
+- exports: `function createXSAITools`
- [source](https://github.com/transitive-bullshit/agentic/blob/main/packages/xsai/src/xsai.ts)
- [xsAI SDK docs](https://xsai.js.org)
@@ -28,7 +28,7 @@ pnpm add @agentic/xsai xsai @xsai/tool
## Usage
- Note that `createXSAISDKTools` is `async` because `xsai`'s underlying
+ Note that `createXSAITools` is `async` because `xsai`'s underlying
`xsschema.toJsonSchema` is async.
@@ -36,7 +36,7 @@ pnpm add @agentic/xsai xsai @xsai/tool
import 'dotenv/config'
import { WeatherClient } from '@agentic/weather'
-import { createXSAISDKTools } from '@agentic/xsai'
+import { createXSAITools } from '@agentic/xsai'
import { generateText } from 'xsai'
async function main() {
@@ -46,7 +46,7 @@ async function main() {
apiKey: process.env.OPENAI_API_KEY!,
baseURL: 'https://api.openai.com/v1/',
model: 'gpt-4o-mini',
- tools: await createXSAISDKTools(weather),
+ tools: await createXSAITools(weather),
toolChoice: 'required',
temperature: 0,
messages: [
diff --git a/legacy/examples/xsai/bin/weather.ts b/legacy/examples/xsai/bin/weather.ts
index 3028a1c6..37054ed6 100644
--- a/legacy/examples/xsai/bin/weather.ts
+++ b/legacy/examples/xsai/bin/weather.ts
@@ -2,7 +2,7 @@
import 'dotenv/config'
import { WeatherClient } from '@agentic/weather'
-import { createXSAISDKTools } from '@agentic/xsai'
+import { createXSAITools } from '@agentic/xsai'
import { generateText } from 'xsai'
async function main() {
@@ -12,7 +12,7 @@ async function main() {
apiKey: process.env.OPENAI_API_KEY!,
baseURL: 'https://api.openai.com/v1/',
model: 'gpt-4o-mini',
- tools: await createXSAISDKTools(weather),
+ tools: await createXSAITools(weather),
toolChoice: 'required',
temperature: 0,
messages: [
diff --git a/legacy/packages/xsai/src/xsai.test.ts b/legacy/packages/xsai/src/xsai.test.ts
index 96b0af46..766e13ae 100644
--- a/legacy/packages/xsai/src/xsai.test.ts
+++ b/legacy/packages/xsai/src/xsai.test.ts
@@ -1,11 +1,11 @@
import { EchoAITool } from '@agentic/core'
import { describe, expect, test } from 'vitest'
-import { createXSAISDKTools } from './xsai'
+import { createXSAITools } from './xsai'
describe('xsai', () => {
- test('createXSAISDKTools', async () => {
- const tools = await createXSAISDKTools(new EchoAITool())
+ test('createXSAITools', async () => {
+ const tools = await createXSAITools(new EchoAITool())
expect(tools).toHaveLength(1)
expect(tools[0]!.function.name).toBe('echo')
})
diff --git a/legacy/packages/xsai/src/xsai.ts b/legacy/packages/xsai/src/xsai.ts
index d7914753..99934ff3 100644
--- a/legacy/packages/xsai/src/xsai.ts
+++ b/legacy/packages/xsai/src/xsai.ts
@@ -5,7 +5,7 @@ import { tool, type ToolResult } from '@xsai/tool'
* Converts a set of Agentic stdlib AI functions to an object compatible with
* [the xsAI SDK's](https://github.com/moeru-ai/xsai) `tools` parameter.
*/
-export function createXSAISDKTools(
+export function createXSAITools(
...aiFunctionLikeTools: AIFunctionLike[]
): Promise {
const fns = new AIFunctionSet(aiFunctionLikeTools)