Skip to content

Commit

Permalink
fix description extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuyz0112 committed Dec 21, 2023
1 parent 91de325 commit 735fcec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prompts/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ export async function getCode(
throw new Error(`invalid code blocks ${JSON.stringify(codeBlocks)}`);
}

remove(tree, "code");
return {
code: codeBlocks[0],
usage: chatCompletion.usage,
description: toMarkdown(remove(tree, "code")),
description: toMarkdown(tree),
};
},
{ delay: 100, maxTry: 3 }
Expand Down

0 comments on commit 735fcec

Please sign in to comment.