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

portkey-ai

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

portkey-ai - npm Package Compare versions

Comparing version 1.7.1 to 1.7.2

2

dist/package.json
{
"name": "portkey-ai",
"version": "1.7.1",
"version": "1.7.2",
"description": "Node client library for the Portkey API",

@@ -5,0 +5,0 @@ "types": "./src/index.d.ts",

@@ -36,2 +36,8 @@ export type Headers = Record<string, string | null | undefined>;

dangerouslyAllowBrowser?: boolean | null | undefined;
vertexStorageBucketName?: string | null | undefined;
providerFileName?: string | null | undefined;
providerModel?: string | null | undefined;
awsS3Bucket?: string | null | undefined;
awsS3ObjectKey?: string | null | undefined;
awsBedrockModel?: string | null | undefined;
[key: string]: any;

@@ -38,0 +44,0 @@ }

@@ -14,9 +14,18 @@ import { TranscriptionCreateParams } from 'openai/resources/audio/transcriptions';

export declare class transcriptions extends ApiResource {
create(_body: TranscriptionCreateParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
create(_body: TranscriptionCreateBody, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
}
export declare class translations extends ApiResource {
create(_body: TranslationCreateParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
create(_body: TranslationCreateBody, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
}
export declare class speech extends ApiResource {
create(_body: SpeechCreateParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
create(_body: SpeechCreateBody, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
}
export interface TranscriptionCreateBody extends TranscriptionCreateParams {
[key: string]: any;
}
export interface TranslationCreateBody extends TranslationCreateParams {
[key: string]: any;
}
export interface SpeechCreateBody extends SpeechCreateParams {
[key: string]: any;
}

@@ -6,3 +6,3 @@ import { BatchCreateParams, BatchListParams } from 'openai/resources/batches';

export declare class Batches extends ApiResource {
create(_body: BatchCreateParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
create(_body: BatchCreateBody, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
retrieve(batchId: string, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;

@@ -13,1 +13,4 @@ list(_query?: BatchListParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;

}
export interface BatchCreateBody extends BatchCreateParams {
[key: string]: any;
}

@@ -13,3 +13,3 @@ import { JobCreateParams, JobListEventsParams, JobListParams } from 'openai/resources/fine-tuning/jobs/jobs';

constructor(client: any);
create(_body: JobCreateParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
create(_body: JobCreateBody, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
retrieve(fineTuningJobId: string, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;

@@ -23,1 +23,9 @@ list(_query?: JobListParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;

}
export interface JobCreateBody extends JobCreateParams {
role_arn: string;
job_name: string;
output_file: string;
provider_options: Record<string, any>;
portkey_options: Record<string, any>;
[key: string]: any;
}

@@ -10,3 +10,6 @@ import { ApiClientInterface } from '../_types/generalTypes';

export declare class Sessions extends ApiResource {
create(_body: SessionCreateParams, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
create(_body: SessionCreateBody, params?: ApiClientInterface, opts?: RequestOptions): Promise<any>;
}
export interface SessionCreateBody extends SessionCreateParams {
[key: string]: any;
}

@@ -45,3 +45,3 @@ /// <reference types="node" />

private fetch;
constructor({ apiKey, baseURL, config, virtualKey, traceID, metadata, provider, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser, ...rest }: ApiClientInterface);
constructor({ apiKey, baseURL, config, virtualKey, traceID, metadata, provider, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser, vertexStorageBucketName, providerFileName, providerModel, awsS3Bucket, awsS3ObjectKey, awsBedrockModel, ...rest }: ApiClientInterface);
protected defaultHeaders(): Record<string, string>;

@@ -48,0 +48,0 @@ _post<Rsp extends APIResponseType>(path: string, opts?: RequestOptions): APIPromise<Rsp>;

@@ -105,3 +105,3 @@ "use strict";

constructor(_a) {
var { apiKey, baseURL, config, virtualKey, traceID, metadata, provider, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance = false, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser } = _a, rest = __rest(_a, ["apiKey", "baseURL", "config", "virtualKey", "traceID", "metadata", "provider", "Authorization", "cacheForceRefresh", "debug", "customHost", "openaiProject", "openaiOrganization", "awsSecretAccessKey", "awsAccessKeyId", "awsSessionToken", "awsRegion", "vertexProjectId", "vertexRegion", "workersAiAccountId", "azureResourceName", "azureDeploymentId", "azureApiVersion", "azureEndpointName", "huggingfaceBaseUrl", "forwardHeaders", "cacheNamespace", "requestTimeout", "strictOpenAiCompliance", "anthropicBeta", "anthropicVersion", "mistralFimCompletion", "dangerouslyAllowBrowser"]);
var { apiKey, baseURL, config, virtualKey, traceID, metadata, provider, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance = false, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser, vertexStorageBucketName, providerFileName, providerModel, awsS3Bucket, awsS3ObjectKey, awsBedrockModel } = _a, rest = __rest(_a, ["apiKey", "baseURL", "config", "virtualKey", "traceID", "metadata", "provider", "Authorization", "cacheForceRefresh", "debug", "customHost", "openaiProject", "openaiOrganization", "awsSecretAccessKey", "awsAccessKeyId", "awsSessionToken", "awsRegion", "vertexProjectId", "vertexRegion", "workersAiAccountId", "azureResourceName", "azureDeploymentId", "azureApiVersion", "azureEndpointName", "huggingfaceBaseUrl", "forwardHeaders", "cacheNamespace", "requestTimeout", "strictOpenAiCompliance", "anthropicBeta", "anthropicVersion", "mistralFimCompletion", "dangerouslyAllowBrowser", "vertexStorageBucketName", "providerFileName", "providerModel", "awsS3Bucket", "awsS3ObjectKey", "awsBedrockModel"]);
this.maxRetries = 1;

@@ -141,3 +141,9 @@ this.apiKey = apiKey !== null && apiKey !== void 0 ? apiKey : '';

anthropicBeta,
dangerouslyAllowBrowser }, rest));
dangerouslyAllowBrowser,
vertexStorageBucketName,
providerFileName,
providerModel,
awsS3Bucket,
awsS3ObjectKey,
awsBedrockModel }, rest));
this.portkeyHeaders = this.defaultHeaders();

@@ -144,0 +150,0 @@ this.fetch = getFetch();

@@ -40,3 +40,9 @@ import { ApiClientInterface } from './_types/generalTypes';

dangerouslyAllowBrowser?: boolean | null | undefined;
constructor({ apiKey, baseURL, config, virtualKey, provider, traceID, metadata, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser, ...rest }: ApiClientInterface);
vertexStorageBucketName?: string | null | undefined;
providerFileName?: string | null | undefined;
providerModel?: string | null | undefined;
awsS3Bucket?: string | null | undefined;
awsS3ObjectKey?: string | null | undefined;
awsBedrockModel?: string | null | undefined;
constructor({ apiKey, baseURL, config, virtualKey, provider, traceID, metadata, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser, vertexStorageBucketName, providerFileName, providerModel, awsS3Bucket, awsS3ObjectKey, awsBedrockModel, ...rest }: ApiClientInterface);
completions: API.Completions;

@@ -43,0 +49,0 @@ chat: API.Chat;

@@ -45,3 +45,3 @@ "use strict";

var _b, _c;
var { apiKey = (_b = (0, utils_1.readEnv)('PORTKEY_API_KEY')) !== null && _b !== void 0 ? _b : null, baseURL = (_c = (0, utils_1.readEnv)('PORTKEY_BASE_URL')) !== null && _c !== void 0 ? _c : null, config, virtualKey, provider, traceID, metadata, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser } = _a, rest = __rest(_a, ["apiKey", "baseURL", "config", "virtualKey", "provider", "traceID", "metadata", "Authorization", "cacheForceRefresh", "debug", "customHost", "openaiProject", "openaiOrganization", "awsSecretAccessKey", "awsAccessKeyId", "awsSessionToken", "awsRegion", "vertexProjectId", "vertexRegion", "workersAiAccountId", "azureResourceName", "azureDeploymentId", "azureApiVersion", "azureEndpointName", "huggingfaceBaseUrl", "forwardHeaders", "cacheNamespace", "requestTimeout", "strictOpenAiCompliance", "anthropicBeta", "anthropicVersion", "mistralFimCompletion", "dangerouslyAllowBrowser"]);
var { apiKey = (_b = (0, utils_1.readEnv)('PORTKEY_API_KEY')) !== null && _b !== void 0 ? _b : null, baseURL = (_c = (0, utils_1.readEnv)('PORTKEY_BASE_URL')) !== null && _c !== void 0 ? _c : null, config, virtualKey, provider, traceID, metadata, Authorization, cacheForceRefresh, debug, customHost, openaiProject, openaiOrganization, awsSecretAccessKey, awsAccessKeyId, awsSessionToken, awsRegion, vertexProjectId, vertexRegion, workersAiAccountId, azureResourceName, azureDeploymentId, azureApiVersion, azureEndpointName, huggingfaceBaseUrl, forwardHeaders, cacheNamespace, requestTimeout, strictOpenAiCompliance, anthropicBeta, anthropicVersion, mistralFimCompletion, dangerouslyAllowBrowser, vertexStorageBucketName, providerFileName, providerModel, awsS3Bucket, awsS3ObjectKey, awsBedrockModel } = _a, rest = __rest(_a, ["apiKey", "baseURL", "config", "virtualKey", "provider", "traceID", "metadata", "Authorization", "cacheForceRefresh", "debug", "customHost", "openaiProject", "openaiOrganization", "awsSecretAccessKey", "awsAccessKeyId", "awsSessionToken", "awsRegion", "vertexProjectId", "vertexRegion", "workersAiAccountId", "azureResourceName", "azureDeploymentId", "azureApiVersion", "azureEndpointName", "huggingfaceBaseUrl", "forwardHeaders", "cacheNamespace", "requestTimeout", "strictOpenAiCompliance", "anthropicBeta", "anthropicVersion", "mistralFimCompletion", "dangerouslyAllowBrowser", "vertexStorageBucketName", "providerFileName", "providerModel", "awsS3Bucket", "awsS3ObjectKey", "awsBedrockModel"]);
if ((0, core_1.isRunningInBrowser)() && !dangerouslyAllowBrowser) {

@@ -82,3 +82,9 @@ throw new Error("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew Portkey({ ..., dangerouslyAllowBrowser: true, ... });");

mistralFimCompletion,
dangerouslyAllowBrowser }, rest));
dangerouslyAllowBrowser,
vertexStorageBucketName,
providerFileName,
providerModel,
awsS3Bucket,
awsS3ObjectKey,
awsBedrockModel }, rest));
this.completions = new API.Completions(this);

@@ -145,2 +151,8 @@ this.chat = new API.Chat(this);

this.dangerouslyAllowBrowser = dangerouslyAllowBrowser !== null && dangerouslyAllowBrowser !== void 0 ? dangerouslyAllowBrowser : false;
this.vertexStorageBucketName = vertexStorageBucketName;
this.providerFileName = providerFileName;
this.providerModel = providerModel;
this.awsS3Bucket = awsS3Bucket;
this.awsS3ObjectKey = awsS3ObjectKey;
this.awsBedrockModel = awsBedrockModel;
}

@@ -147,0 +159,0 @@ }

@@ -1,1 +0,1 @@

export declare const VERSION = "1.7.1";
export declare const VERSION = "1.7.2";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
exports.VERSION = '1.7.1';
exports.VERSION = '1.7.2';
//# sourceMappingURL=version.js.map
{
"name": "portkey-ai",
"version": "1.7.1",
"version": "1.7.2",
"description": "Node client library for the Portkey API",

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

@@ -37,2 +37,8 @@ export type Headers = Record<string, string | null | undefined>;

dangerouslyAllowBrowser?: boolean | null | undefined;
vertexStorageBucketName?: string | null | undefined;
providerFileName?: string | null | undefined;
providerModel?: string | null | undefined;
awsS3Bucket?: string | null | undefined;
awsS3ObjectKey?: string | null | undefined;
awsBedrockModel?: string | null | undefined;
[key: string]: any;

@@ -39,0 +45,0 @@ }

@@ -25,7 +25,7 @@ import { TranscriptionCreateParams } from 'openai/resources/audio/transcriptions';

async create(
_body: TranscriptionCreateParams,
_body: TranscriptionCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: TranscriptionCreateParams = _body;
const body: TranscriptionCreateBody = _body;
if (params) {

@@ -48,7 +48,7 @@ const config = overrideConfig(this.client.config, params.config);

async create(
_body: TranslationCreateParams,
_body: TranslationCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: TranslationCreateParams = _body;
const body: TranslationCreateBody = _body;
if (params) {

@@ -71,7 +71,7 @@ const config = overrideConfig(this.client.config, params.config);

async create(
_body: SpeechCreateParams,
_body: SpeechCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: SpeechCreateParams = _body;
const body: SpeechCreateBody = _body;
if (params) {

@@ -89,1 +89,13 @@ const config = overrideConfig(this.client.config, params.config);

}
export interface TranscriptionCreateBody extends TranscriptionCreateParams {
[key: string]: any;
}
export interface TranslationCreateBody extends TranslationCreateParams {
[key: string]: any;
}
export interface SpeechCreateBody extends SpeechCreateParams {
[key: string]: any;
}

@@ -10,7 +10,7 @@ import { BatchCreateParams, BatchListParams } from 'openai/resources/batches';

async create(
_body: BatchCreateParams,
_body: BatchCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: BatchCreateParams = _body;
const body: BatchCreateBody = _body;
if (params) {

@@ -110,1 +110,5 @@ const config = overrideConfig(this.client.config, params.config);

}
export interface BatchCreateBody extends BatchCreateParams {
[key: string]: any;
}

@@ -29,7 +29,7 @@ import {

async create(
_body: JobCreateParams,
_body: JobCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: JobCreateParams = _body;
const body: JobCreateBody = _body;
if (params) {

@@ -165,1 +165,10 @@ const config = overrideConfig(this.client.config, params.config);

}
export interface JobCreateBody extends JobCreateParams {
role_arn: string;
job_name: string;
output_file: string;
provider_options: Record<string, any>;
portkey_options: Record<string, any>;
[key: string]: any;
}

@@ -18,7 +18,7 @@ import { ApiClientInterface } from '../_types/generalTypes';

async create(
_body: SessionCreateParams,
_body: SessionCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: SessionCreateParams = _body;
const body: SessionCreateBody = _body;
if (params) {

@@ -40,1 +40,5 @@ const config = overrideConfig(this.client.config, params.config);

}
export interface SessionCreateBody extends SessionCreateParams {
[key: string]: any;
}

@@ -190,2 +190,8 @@ import KeepAliveAgent from 'agentkeepalive';

dangerouslyAllowBrowser,
vertexStorageBucketName,
providerFileName,
providerModel,
awsS3Bucket,
awsS3ObjectKey,
awsBedrockModel,
...rest

@@ -228,2 +234,8 @@ }: ApiClientInterface) {

dangerouslyAllowBrowser,
vertexStorageBucketName,
providerFileName,
providerModel,
awsS3Bucket,
awsS3ObjectKey,
awsBedrockModel,
...rest,

@@ -230,0 +242,0 @@ });

@@ -43,2 +43,8 @@ import { ApiClientInterface } from './_types/generalTypes';

dangerouslyAllowBrowser?: boolean | null | undefined;
vertexStorageBucketName?: string | null | undefined;
providerFileName?: string | null | undefined;
providerModel?: string | null | undefined;
awsS3Bucket?: string | null | undefined;
awsS3ObjectKey?: string | null | undefined;
awsBedrockModel?: string | null | undefined;
constructor({

@@ -78,2 +84,8 @@ apiKey = readEnv('PORTKEY_API_KEY') ?? null,

dangerouslyAllowBrowser,
vertexStorageBucketName,
providerFileName,
providerModel,
awsS3Bucket,
awsS3ObjectKey,
awsBedrockModel,
...rest

@@ -120,2 +132,8 @@ }: ApiClientInterface) {

dangerouslyAllowBrowser,
vertexStorageBucketName,
providerFileName,
providerModel,
awsS3Bucket,
awsS3ObjectKey,
awsBedrockModel,
...rest,

@@ -155,2 +173,8 @@ });

this.dangerouslyAllowBrowser = dangerouslyAllowBrowser ?? false;
this.vertexStorageBucketName = vertexStorageBucketName;
this.providerFileName = providerFileName;
this.providerModel = providerModel;
this.awsS3Bucket = awsS3Bucket;
this.awsS3ObjectKey = awsS3ObjectKey;
this.awsBedrockModel = awsBedrockModel;
}

@@ -157,0 +181,0 @@

@@ -1,1 +0,1 @@

export const VERSION = '1.7.1';
export const VERSION = '1.7.2';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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