Skip to content

Commit

Permalink
fix: Correct run.configId usage
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith committed Dec 20, 2024
1 parent b5692ba commit 92a21b9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions app/components/chat/prompt-textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,14 @@ export function PromptTextarea({ clusterId }: { clusterId: string }) {
const body: ClientInferRequest<typeof contract.createRun>["body"] = {};

if (config.template?.id) {
body.template = {
id: config.template.id,
input: Object.fromEntries(
Object.entries(config.template.input).map(([key, value]) => [
key.replaceAll("{{", "").replaceAll("}}", ""),
value,
])
),
};
body.configId = config.template.id,

body.input = Object.fromEntries(
Object.entries(config.template.input).map(([key, value]) => [
key.replaceAll("{{", "").replaceAll("}}", ""),
value,
])
)
} else {
body.initialPrompt = config.prompt.replace(/{{.*?}}/g, "");
}
Expand Down

0 comments on commit 92a21b9

Please sign in to comment.