diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7bef41..8e048af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,11 @@ jobs: with: fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + - uses: nrwl/nx-set-shas@v3 - run: npm ci diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 340f0a2..7e01096 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -26,6 +26,11 @@ jobs: with: fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + - uses: nrwl/nx-set-shas@v3 - run: npm ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a05da1d..b236aac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,11 @@ jobs: with: fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + - uses: nrwl/nx-set-shas@v3 - run: npm ci diff --git a/apps/chrome-extension/src/pages/Content/prompts.ts b/apps/chrome-extension/src/pages/Content/prompts.ts index 5cba1ca..531f014 100644 --- a/apps/chrome-extension/src/pages/Content/prompts.ts +++ b/apps/chrome-extension/src/pages/Content/prompts.ts @@ -3,6 +3,7 @@ import { CodeErrorHelpPrompt, OptimizeCodePrompt, OptimizeCodeWithExplanationPrompt, + SolveCodingChallengePrompt, SQLQueryPrompt, WriteTestsPrompt, } from '@rpidanny/llm-prompt-templates/core/code'; @@ -54,6 +55,7 @@ const codePrompts: IPrompt[] = [ OptimizeCodePrompt, OptimizeCodeWithExplanationPrompt, CodeErrorHelpPrompt, + SolveCodingChallengePrompt, SQLQueryPrompt, ]; diff --git a/libs/llm-prompt-templates/package.json b/libs/llm-prompt-templates/package.json index 3a14013..7a2ab27 100644 --- a/libs/llm-prompt-templates/package.json +++ b/libs/llm-prompt-templates/package.json @@ -17,4 +17,4 @@ "url": "https://github.com/rpidanny/llm-prompt-templates.git", "directory": "libs/llm-prompt-templates" } -} \ No newline at end of file +} diff --git a/libs/llm-prompt-templates/src/core/code.ts b/libs/llm-prompt-templates/src/core/code.ts index 24d39b2..04a8be1 100644 --- a/libs/llm-prompt-templates/src/core/code.ts +++ b/libs/llm-prompt-templates/src/core/code.ts @@ -75,3 +75,17 @@ Table {table1}, columns = [{columns1}}] Table {table2}, columns = [{columns2}}] `, }; + +export const SolveCodingChallengePrompt: IPrompt = { + name: 'Solve Coding Challenge', + category: PromptCategory.Code, + description: 'Asks the LLM to solve a coding challenge.', + tags: [Tag.Code, Tag.LeetCode], + content: `### Instruction ### +You are an amazing software engineer solving leetcode problems. Solve the given problem in {language}: + +\`\`\` +{challenge} +\`\`\` + `, +}; diff --git a/libs/llm-prompt-templates/src/core/tags.enum.ts b/libs/llm-prompt-templates/src/core/tags.enum.ts index 14e4b08..2d9223f 100644 --- a/libs/llm-prompt-templates/src/core/tags.enum.ts +++ b/libs/llm-prompt-templates/src/core/tags.enum.ts @@ -16,4 +16,5 @@ export enum Tag { Documentation = 'documentation', ProofRead = 'proofread', TreeOfThought = 'tree-of-thought', + LeetCode = 'leetcode', }