New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

workers-ai-provider

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workers-ai-provider - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

21

dist/index.d.ts

@@ -32,4 +32,4 @@ import { LanguageModelV1 } from '@ai-sdk/provider';

/**
Creates a model for text generation.
*/
* Creates a model for text generation.
**/
chat(modelId: BaseAiTextGenerationModels, settings?: WorkersAIChatSettings): WorkersAIChatLanguageModel;

@@ -39,5 +39,5 @@ }

/**
Provide an `env.AI` binding to use for the AI inference.
You can set up an AI bindings in your Workers project
by adding the following this to `wrangler.toml`:
* Provide an `env.AI` binding to use for the AI inference.
* You can set up an AI bindings in your Workers project
* by adding the following this to `wrangler.toml`:

@@ -47,10 +47,11 @@ ```toml

binding = "AI"
``` */
```
**/
binding: Ai;
}
/**
Create a Workers AI provider instance.
*/
declare function createWorkersAIProvider(options: WorkersAISettings): WorkersAI;
* Create a Workers AI provider instance.
**/
declare function createWorkersAI(options: WorkersAISettings): WorkersAI;
export { type WorkersAI, type WorkersAISettings, createWorkersAIProvider };
export { type WorkersAI, type WorkersAISettings, createWorkersAI };

@@ -225,3 +225,3 @@ var __create = Object.create;

// node_modules/@ai-sdk/provider-utils/node_modules/nanoid/non-secure/index.js
// node_modules/nanoid/non-secure/index.js
var customAlphabet = (alphabet, defaultSize = 21) => {

@@ -485,3 +485,5 @@ return (size = defaultSize) => {

const { args, warnings } = this.getArgs(options);
console.warn(warnings);
if (warnings && warnings.length > 0) {
console.warn(warnings);
}
const response = await this.config.binding.run(args.model, {

@@ -597,3 +599,3 @@ messages: args.messages

// src/index.ts
function createWorkersAIProvider(options) {
function createWorkersAI(options) {
const createChatModel = (modelId, settings = {}) => new WorkersAIChatLanguageModel(modelId, settings, {

@@ -615,4 +617,4 @@ provider: "workerai.chat",

export {
createWorkersAIProvider
createWorkersAI
};
//# sourceMappingURL=index.js.map

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "0.0.2",
"version": "0.0.3",
"main": "dist/index.js",

@@ -8,0 +8,0 @@ "types": "dist/index.d.ts",

@@ -144,3 +144,5 @@ import {

console.warn(warnings);
if (warnings && warnings.length > 0) {
console.warn(warnings);
}

@@ -147,0 +149,0 @@ const response = (await this.config.binding.run(args.model, {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc