From 18aa1ee6398abec6270791483699f2887a95ad77 Mon Sep 17 00:00:00 2001 From: arshad Date: Sat, 15 Feb 2025 09:40:51 +0530 Subject: [PATCH] docs: update contributing.md --- CONTRIBUTING.md | 10 ++++++++++ docs/configuration/register-options.md | 3 --- packages/core/src/constants.ts | 2 +- packages/monacopilot/src/types/index.ts | 3 --- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb9028c3..43c87e5d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,6 +52,9 @@ playground/ # NextJS app for testing changes in real-time # For documentation pnpm dev:docs + + # For playground + pnpm dev:playground ``` Note: The development mode includes automatic rebuilding on code changes, so you don't need to run `pnpm build` manually after each change. @@ -80,9 +83,16 @@ playground/ # NextJS app for testing changes in real-time We provide a playground environment to test your changes in real-time: - The `playground/` directory contains a NextJS app that automatically reflects changes made to the packages +- Before starting the playground, create a `.env.local` file in the `playground/` directory and add your OpenAI API key: + ``` + OPENAI_API_KEY=your_api_key_here + ``` +- Run `pnpm dev:playground` to start the playground application - When you run `pnpm dev:monacopilot` or `pnpm dev:core`, your changes will be immediately visible in the playground - Use this playground to verify your changes and test functionality before submitting a PR +## Running Tests + To run tests: ```bash diff --git a/docs/configuration/register-options.md b/docs/configuration/register-options.md index e887160e..d01a27fe 100644 --- a/docs/configuration/register-options.md +++ b/docs/configuration/register-options.md @@ -136,9 +136,6 @@ registerCompletion(monaco, editor, { }); ``` -> [!NOTE] -> If you're using `groq` as your provider, it's recommended to set `maxContextLines` to `60` or less due to its low rate limits and lack of pay-as-you-go pricing. However, Groq is expected to offer pay-as-you-go pricing in the near future. - ## Caching Completions Monacopilot caches completions by default. It uses a FIFO (First In First Out) strategy, reusing cached completions when the context and cursor position match while editing (default: `true`). To disable caching: diff --git a/packages/core/src/constants.ts b/packages/core/src/constants.ts index adf28e36..354ac181 100644 --- a/packages/core/src/constants.ts +++ b/packages/core/src/constants.ts @@ -1,2 +1,2 @@ export const DEFAULT_COPILOT_TEMPERATURE = 0.1 as const; -export const DEFAULT_COPILOT_MAX_TOKENS = 500 as const; +export const DEFAULT_COPILOT_MAX_TOKENS = 64 as const; diff --git a/packages/monacopilot/src/types/index.ts b/packages/monacopilot/src/types/index.ts index 1fbca215..ef3e2add 100644 --- a/packages/monacopilot/src/types/index.ts +++ b/packages/monacopilot/src/types/index.ts @@ -76,9 +76,6 @@ export interface RegisterCompletionOptions { * The maximum number of lines of code to include in the completion request. * This limits the request size to the model to prevent `429 Too Many Requests` errors * and reduce costs for long code. - * - * It is recommended to set `maxContextLines` to `60` or less if you are using `Groq` as your provider, - * since `Groq` does not implement pay-as-you-go pricing and has only low rate limits. */ maxContextLines?: number; /**