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.1.0 to 0.1.1

11

dist/index.js

@@ -175,3 +175,6 @@ var __defProp = Object.defineProperty;

...baseArgs,
response_format: { type: "json_object" },
response_format: {
type: "json_schema",
json_schema: mode.schema
},
tools: void 0

@@ -214,3 +217,5 @@ },

tools: args.tools,
top_p: args.top_p
top_p: args.top_p,
// @ts-expect-error response_format not yet added to types
response_format: args.response_format
},

@@ -223,3 +228,3 @@ { gateway: this.config.gateway ?? this.settings.gateway }

return {
text: output.response,
text: typeof output.response === "object" && output.response !== null ? JSON.stringify(output.response) : output.response,
toolCalls: output.tool_calls?.map((toolCall) => ({

@@ -226,0 +231,0 @@ toolCallType: "function",

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

"type": "module",
"version": "0.1.0",
"version": "0.1.1",
"main": "dist/index.js",

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

@@ -101,3 +101,6 @@ import {

...baseArgs,
response_format: { type: "json_object" },
response_format: {
type: "json_schema",
json_schema: mode.schema,
},
tools: undefined,

@@ -148,2 +151,4 @@ },

top_p: args.top_p,
// @ts-expect-error response_format not yet added to types
response_format: args.response_format,
},

@@ -158,3 +163,6 @@ { gateway: this.config.gateway ?? this.settings.gateway }

return {
text: output.response,
text:
typeof output.response === "object" && output.response !== null
? JSON.stringify(output.response) // ai-sdk expects a string here
: output.response,
toolCalls: output.tool_calls?.map((toolCall) => ({

@@ -161,0 +169,0 @@ toolCallType: "function",

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