Skip to content

Commit

Permalink
improvements to the checklist node
Browse files Browse the repository at this point in the history
  • Loading branch information
au-re committed Nov 23, 2023
1 parent c9b8655 commit 2ae1ad5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ export const documentCheck: NodeConfig = {
editableSchema: true,
defaultValue: [],
},
{
id: "fields",
name: "Fields",
description: "Custom fields to include in the output for each checklist item",
type: "list",
defaultValue: ["ok (yes/no)"],
},
{
id: "format",
name: "Format",
Expand All @@ -75,12 +82,5 @@ export const documentCheck: NodeConfig = {
{ id: "markdown", name: "Markdown" },
],
},
{
id: "fields",
name: "Fields",
description: "Custom fields to include in the output for each checklist item",
type: "list",
defaultValue: ["ok"],
},
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,17 @@ export const execute: Execute<LLMCompletionInput, LLMCompletionOutput> = async (

// TODO: move into the API
const instructionsWithChecklist = `${instructions}
DOCUMENT:
{{document}}
CHECKLIST DESCRIPTION:
${description}
CHECKLIST FORMAT:
{{table}}
CHECKLIST IN ${format.toUpperCase()} FORMAT:
`;
Return only the CHECKLIST IN ${format.toUpperCase()} FORMAT:
${isCSV ? "check," : "|check|"}`;

// render the prompt without overwriting the document and table variables
const renderedPrompt = Mustache.render(instructionsWithChecklist, {
Expand Down

0 comments on commit 2ae1ad5

Please sign in to comment.