From e561227b78b8bce152fc38724278409b52e9b8d5 Mon Sep 17 00:00:00 2001 From: yoannchb-pro <71560747+yoannchb-pro@users.noreply.github.com> Date: Wed, 19 Mar 2025 09:27:19 -0400 Subject: [PATCH] updated doc --- README.md | 17 +++++++++++++++-- src/background/core/get-response.ts | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a820655..fd8dfe6 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,10 @@ Find the extension on the Chrome Webstore right [here](https://chrome.google.com - [Donate](#donate) - [Update](#update) - [Set up](#set-up) - - [Mode](#mode) - [Settings](#settings) + - [Advanced Settings](#advanced-settings) + - [Mode](#mode) + - [Options](#options) - [Internal other features](#internal-other-features) - [Support table](#support-table) - [Supported questions type](#supported-questions-type) @@ -61,6 +63,17 @@ See the [changelog](./CHANGELOG.md) to see every updates ! Go to "Manage my extensions" on your browser, then click on "Load unpacked extension" and select the "extension" folder. Afterwards, click on the extension icon and enter the ApiKey obtained from [openai api](https://platform.openai.com/api-keys). Finally, select a [gpt model](https://platform.openai.com/docs/models) (ensure it work with completion api). +## Settings + +- API KEY\*: Your openai [API KEY](https://platform.openai.com/api-keys) +- GPT MODEL\*: The [gpt model](https://platform.openai.com/docs/models) (you can click on the play button to ensure the model work with the extension) + +## Advanced Settings + +- CODE: A code you will need to type on your keyboard to inject/remove the extension code from the moodle page. It allow you to be more discret and control the injection so it's recommended. +- BASE URL: The API endpoint if you need to use your own llm. +- MAX TOKENS: The max tokens length you want the api to respond with. + ## Mode
@@ -72,7 +85,7 @@ Go to "Manage my extensions" on your browser, then click on "Load unpa
- Question to answer: The question is converted to the answer and you can click on it to show back the question (or show back the answer).
-## Settings
+## Options
diff --git a/src/background/core/get-response.ts b/src/background/core/get-response.ts
index 1bce9e2..2542fba 100644
--- a/src/background/core/get-response.ts
+++ b/src/background/core/get-response.ts
@@ -37,7 +37,7 @@ async function getChatGPTResponse(
temperature: 0.1, // Controls the randomness of the generated responses, with lower values producing more deterministic and predictable outputs. With set to 0.1 instead of 0 for more creativity.
top_p: 0.6, // Determines the diversity of the generated responses
presence_penalty: 0, // Encourages the model to introduce new concepts by penalizing words that have already appeared in the text.
- max_tokens: config.maxTokens || 2000 // Use maxTokens from config
+ max_tokens: config.maxTokens || 2000 // Maximum length of the response,
}),
{ signal: config.timeout ? controller.signal : null }
);