portkey-ai
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "portkey-ai", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Node client library for the Portkey API", | ||
@@ -5,0 +5,0 @@ "types": "./src/index.d.ts", |
@@ -31,2 +31,3 @@ import { APIResponseType, ApiClientInterface } from "../_types/generalTypes"; | ||
completions: PromptCompletions; | ||
render(_body: PromptsCreateParams, params?: ApiClientInterface, opts?: RequestOptions): APIPromise<PromptsResponse>; | ||
} | ||
@@ -33,0 +34,0 @@ export declare class PromptCompletions extends ApiResource { |
@@ -21,2 +21,11 @@ "use strict"; | ||
} | ||
render(_body, params, opts) { | ||
const body = _body; | ||
const promptId = _body.promptID; | ||
if (params) { | ||
this.client.customHeaders = Object.assign(Object.assign({}, this.client.customHeaders), (0, createHeaders_1.createHeaders)(Object.assign({}, params))); | ||
} | ||
const response = this.post(`/prompts/${promptId}/render`, Object.assign({ body }, opts)); | ||
return response; | ||
} | ||
} | ||
@@ -23,0 +32,0 @@ exports.Prompt = Prompt; |
@@ -50,2 +50,17 @@ import { APIResponseType, ApiClientInterface } from "../_types/generalTypes"; | ||
completions: PromptCompletions = new PromptCompletions(this.client); | ||
render( | ||
_body: PromptsCreateParams, | ||
params?: ApiClientInterface, | ||
opts?: RequestOptions | ||
): APIPromise<PromptsResponse> { | ||
const body = _body | ||
const promptId = _body.promptID | ||
if (params) { | ||
this.client.customHeaders = { ...this.client.customHeaders, ...createHeaders({ ...params }) } | ||
} | ||
const response = this.post<PromptsResponse>(`/prompts/${promptId}/render`, { body, ...opts }) | ||
return response | ||
} | ||
} | ||
@@ -89,2 +104,2 @@ | ||
} | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "1.2.0"; | ||
export declare const VERSION = "1.2.1"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = void 0; | ||
exports.VERSION = "1.2.0"; | ||
exports.VERSION = "1.2.1"; | ||
//# sourceMappingURL=version.js.map |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "1.2.0"; | ||
export const VERSION = "1.2.1"; |
{ | ||
"name": "portkey-ai", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Node client library for the Portkey API", | ||
@@ -5,0 +5,0 @@ "types": "dist/src/index.d.ts", |
@@ -50,2 +50,17 @@ import { APIResponseType, ApiClientInterface } from "../_types/generalTypes"; | ||
completions: PromptCompletions = new PromptCompletions(this.client); | ||
render( | ||
_body: PromptsCreateParams, | ||
params?: ApiClientInterface, | ||
opts?: RequestOptions | ||
): APIPromise<PromptsResponse> { | ||
const body = _body | ||
const promptId = _body.promptID | ||
if (params) { | ||
this.client.customHeaders = { ...this.client.customHeaders, ...createHeaders({ ...params }) } | ||
} | ||
const response = this.post<PromptsResponse>(`/prompts/${promptId}/render`, { body, ...opts }) | ||
return response | ||
} | ||
} | ||
@@ -89,2 +104,2 @@ | ||
} | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "1.2.0"; | ||
export const VERSION = "1.2.1"; |
Sorry, the diff of this file is not supported yet
7081402
8047