Skip to content

Commit

Permalink
update param names
Browse files Browse the repository at this point in the history
  • Loading branch information
abubakarsohail committed Jun 5, 2024
1 parent 8503410 commit bb59256
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,19 @@ export class PromptLayer {

async run({
prompt_name,
version,
label,
prompt_version,
prompt_release_label,
inputVariables,
tags,
metadata,
group_id,
stream = false,
}: RunRequest) {
const prompt_input_variables = inputVariables;
const templateGetParams: GetPromptTemplateParams = {};
if (version) templateGetParams.version = version;
if (label) templateGetParams.label = label;
const templateGetParams: GetPromptTemplateParams = {
label: prompt_release_label,
version: prompt_version,
};
if (inputVariables) templateGetParams.input_variables = inputVariables;
const promptBlueprint = await this.templates.get(
prompt_name,
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export interface RunRequest {
metadata?: Record<string, string>;
group_id?: number;
stream?: boolean;
version?: number;
label?: string;
prompt_version?: number;
prompt_release_label?: string;
inputVariables?: Record<string, string>;
}

0 comments on commit bb59256

Please sign in to comment.