@blaxel/core 0.2.62 → 0.2.63-dev.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -8
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/types/sandbox/client/types.gen.d.ts +11 -0
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +11 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/common/settings.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -310,19 +310,19 @@ import { blModel } from "@blaxel/core";
|
|
|
310
310
|
|
|
311
311
|
// With Vercel AI SDK
|
|
312
312
|
import { blModel } from "@blaxel/vercel";
|
|
313
|
-
const model = await blModel("gpt-
|
|
313
|
+
const model = await blModel("gpt-5-mini");
|
|
314
314
|
|
|
315
315
|
// With LangChain
|
|
316
316
|
import { blModel } from "@blaxel/langgraph";
|
|
317
|
-
const model = await blModel("
|
|
317
|
+
const model = await blModel("gpt-5-mini");
|
|
318
318
|
|
|
319
319
|
// With LlamaIndex
|
|
320
320
|
import { blModel } from "@blaxel/llamaindex";
|
|
321
|
-
const model = await blModel("gpt-
|
|
321
|
+
const model = await blModel("gpt-5-mini");
|
|
322
322
|
|
|
323
323
|
// With Mastra
|
|
324
324
|
import { blModel } from "@blaxel/mastra";
|
|
325
|
-
const model = await blModel("gpt-
|
|
325
|
+
const model = await blModel("gpt-5-mini");
|
|
326
326
|
```
|
|
327
327
|
|
|
328
328
|
#### MCP tool use
|
|
@@ -334,19 +334,38 @@ The SDK includes a helper function that retrieves and returns tool definitions f
|
|
|
334
334
|
```typescript
|
|
335
335
|
// With Vercel AI SDK
|
|
336
336
|
import { blTools } from "@blaxel/vercel";
|
|
337
|
-
const tools = await blTools(['
|
|
337
|
+
const tools = await blTools(['sandbox/my-sandbox'])
|
|
338
338
|
|
|
339
339
|
// With Mastra
|
|
340
340
|
import { blTools } from "@blaxel/mastra";
|
|
341
|
-
const tools = await blTools(['
|
|
341
|
+
const tools = await blTools(['sandbox/my-sandbox'])
|
|
342
342
|
|
|
343
343
|
// With LlamaIndex
|
|
344
344
|
import { blTools } from "@blaxel/llamaindex";
|
|
345
|
-
const tools = await blTools(['
|
|
345
|
+
const tools = await blTools(['sandbox/my-sandbox'])
|
|
346
346
|
|
|
347
347
|
// With LangChain
|
|
348
348
|
import { blTools } from "@blaxel/langgraph";
|
|
349
|
-
const tools = await blTools(['
|
|
349
|
+
const tools = await blTools(['sandbox/my-sandbox'])
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Here is an example of retrieving tool definitions from a Blaxel sandbox's MCP server in the format required by Vercel's AI SDK:
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
import { SandboxInstance } from "@blaxel/core";
|
|
356
|
+
import { blTools } from "@blaxel/vercel";
|
|
357
|
+
|
|
358
|
+
// Create a new sandbox
|
|
359
|
+
const sandbox = await SandboxInstance.createIfNotExists({
|
|
360
|
+
name: "my-sandbox",
|
|
361
|
+
image: "blaxel/base-image:latest",
|
|
362
|
+
memory: 4096,
|
|
363
|
+
region: "us-pdx-1",
|
|
364
|
+
ttl: "24h"
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
// Get sandbox tools
|
|
368
|
+
const tools = await blTools(['sandbox/my-sandbox'])
|
|
350
369
|
```
|
|
351
370
|
|
|
352
371
|
### Telemetry
|