Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@activepieces/pieces-common

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@activepieces/pieces-common - npm Package Compare versions

Comparing version 0.2.19 to 0.2.20

4

package.json
{
"name": "@activepieces/pieces-common",
"version": "0.2.19",
"version": "0.2.20",
"type": "commonjs",

@@ -8,3 +8,3 @@ "dependencies": {

"@sinclair/typebox": "0.32.35",
"axios": "1.7.4",
"axios": "1.7.7",
"dayjs": "1.11.9",

@@ -11,0 +11,0 @@ "deepmerge": "4.3.1",

@@ -14,7 +14,7 @@ import { ServerContext } from '@activepieces/pieces-framework';

model: string;
numImages: number;
quality: string;
size: string;
};
export type AIImageCompletion = {
url: string;
image: string;
};

@@ -64,3 +64,3 @@ export type AIChat = {

name: string;
type: "string" | "number" | "boolean";
type: 'string' | 'number' | 'boolean';
description?: string;

@@ -67,0 +67,0 @@ isRequired: boolean;

@@ -23,6 +23,8 @@ "use strict";

prompt: params.prompt,
n: params.numImages,
quality: params.quality,
size: params.size,
response_format: 'b64_json',
});
const url = response.data[0].url;
return url ? { url } : null;
const imageBase64 = response.data[0].b64_json;
return imageBase64 ? { image: imageBase64 } : null;
}),

@@ -90,4 +92,3 @@ },

return {
choices: completion.choices
.map((choice) => {
choices: completion.choices.map((choice) => {
var _a;

@@ -99,9 +100,11 @@ return ({

}),
call: toolCall ? {
id: toolCall.id,
function: {
name: toolCall.function.name,
arguments: JSON.parse(toolCall.function.arguments),
},
} : null,
call: toolCall
? {
id: toolCall.id,
function: {
name: toolCall.function.name,
arguments: JSON.parse(toolCall.function.arguments),
},
}
: null,
created: completion.created,

@@ -108,0 +111,0 @@ id: completion.id,

Sorry, the diff of this file is not supported yet

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