From e095fde27ec0aef34ad9df6293187a04a9088b00 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 27 Jun 2024 10:10:36 -0700 Subject: [PATCH] updated docs --- website/_includes/model-warnings.md | 3 + website/docs/config.md | 2 +- website/docs/config/adv-model-settings.md | 86 +++++++++++++++++++++ website/docs/{ => config}/aider_conf.md | 0 website/docs/{ => config}/dotenv.md | 0 website/docs/{ => config}/options.md | 0 website/docs/llms/warnings.md | 67 ---------------- website/docs/troubleshooting/edit-errors.md | 4 +- 8 files changed, 92 insertions(+), 70 deletions(-) create mode 100644 website/docs/config/adv-model-settings.md rename website/docs/{ => config}/aider_conf.md (100%) rename website/docs/{ => config}/dotenv.md (100%) rename website/docs/{ => config}/options.md (100%) diff --git a/website/_includes/model-warnings.md b/website/_includes/model-warnings.md index 4d5a07a41..aaba1f0b1 100644 --- a/website/_includes/model-warnings.md +++ b/website/_includes/model-warnings.md @@ -14,6 +14,9 @@ for that model. Aider will use an unlimited context window and assume the model is free, so this is not usually a significant problem. +See the docs on +[configuring advanced model settings](/docs/config/adv-model-settings.html) +for details on how to remove this warning. ## Did you mean? diff --git a/website/docs/config.md b/website/docs/config.md index b018e5a90..dca28da0f 100644 --- a/website/docs/config.md +++ b/website/docs/config.md @@ -12,7 +12,7 @@ Most options can also be set in an `.aider.conf.yml` file which can be placed in your home directory or at the root of your git repo. Or via environment variables like `AIDER_xxx`, -as noted in the [options reference](options.html). +as noted in the [options reference](/docs/config/options.html). Here are 3 equivalent ways of setting an option. First, via a command line switch: diff --git a/website/docs/config/adv-model-settings.md b/website/docs/config/adv-model-settings.md new file mode 100644 index 000000000..41f1be9da --- /dev/null +++ b/website/docs/config/adv-model-settings.md @@ -0,0 +1,86 @@ +--- +parent: Configuration +nav_order: 950 +description: Configuring advanced settings for LLMs. +--- + +# Advanced model settings + +## Context window size and token costs + +In most cases, you can safely ignore aider's warning about unknown context +window size and model costs. + +But, you can register context window limits and costs for models that aren't known +to aider. Create a `.aider.litellm.models.json` file in one of these locations: + +- Your home directory. +- The root if your git repo. +- The current directory where you launch aider. +- Or specify a specific file with the `--model-metadata-file ` switch. + + +If the files above exist, they will be loaded in that order. +Files loaded last will take priority. + +The json file should be a dictionary with an entry for each model, as follows: + +``` +{ + "deepseek-chat": { + "max_tokens": 4096, + "max_input_tokens": 32000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.00000014, + "output_cost_per_token": 0.00000028, + "litellm_provider": "deepseek", + "mode": "chat" + } +} +``` + +See +[litellm's model_prices_and_context_window.json file](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json) for more examples. + +## Model settings + +Aider has a number of settings that control how it works with +different models. +These model settings are pre-configured for most popular models. +But it can sometimes be helpful to override them or add settings for +a model that aider doesn't know about. + +To do that, +create a `.aider.models.yml` file in one of these locations: + +- Your home directory. +- The root if your git repo. +- The current directory where you launch aider. +- Or specify a specific file with the `--model-settings-file ` switch. + +If the files above exist, they will be loaded in that order. +Files loaded last will take priority. + +The yaml file should be a a list of dictionary objects for each model, as follows: + +``` +- name: "gpt-3.5-turbo" + edit_format: "whole" + weak_model_name: "gpt-3.5-turbo" + use_repo_map: false + send_undo_reply: false + accepts_images: false + lazy: false + reminder_as_sys_msg: true + examples_as_sys_msg: false +- name: "gpt-4-turbo-2024-04-09" + edit_format: "udiff" + weak_model_name: "gpt-3.5-turbo" + use_repo_map: true + send_undo_reply: true + accepts_images: true + lazy: true + reminder_as_sys_msg: true + examples_as_sys_msg: false +``` + diff --git a/website/docs/aider_conf.md b/website/docs/config/aider_conf.md similarity index 100% rename from website/docs/aider_conf.md rename to website/docs/config/aider_conf.md diff --git a/website/docs/dotenv.md b/website/docs/config/dotenv.md similarity index 100% rename from website/docs/dotenv.md rename to website/docs/config/dotenv.md diff --git a/website/docs/options.md b/website/docs/config/options.md similarity index 100% rename from website/docs/options.md rename to website/docs/config/options.md diff --git a/website/docs/llms/warnings.md b/website/docs/llms/warnings.md index c33acffd2..1034089f9 100644 --- a/website/docs/llms/warnings.md +++ b/website/docs/llms/warnings.md @@ -8,70 +8,3 @@ nav_order: 900 {% include model-warnings.md %} -## Adding settings for missing models -You can register model settings used by aider for unknown models. -Create a `.aider.models.yml` file in one of these locations: - -- Your home directory. -- The root if your git repo. -- The current directory where you launch aider. -- Or specify a specific file with the `--model-settings-file ` switch. - -If the files above exist, they will be loaded in that order. -Files loaded last will take priority. - -The yaml file should be a a list of dictionary objects for each model, as follows: - -``` -- name: "gpt-3.5-turbo" - edit_format: "whole" - weak_model_name: "gpt-3.5-turbo" - use_repo_map: false - send_undo_reply: false - accepts_images: false - lazy: false - reminder_as_sys_msg: true - examples_as_sys_msg: false -- name: "gpt-4-turbo-2024-04-09" - edit_format: "udiff" - weak_model_name: "gpt-3.5-turbo" - use_repo_map: true - send_undo_reply: true - accepts_images: true - lazy: true - reminder_as_sys_msg: true - examples_as_sys_msg: false -``` - -## Specifying context window size and token costs - -You can register context window limits and costs for models that aren't known -to aider. Create a `.aider.litellm.models.json` file in one of these locations: - -- Your home directory. -- The root if your git repo. -- The current directory where you launch aider. -- Or specify a specific file with the `--model-metadata-file ` switch. - - -If the files above exist, they will be loaded in that order. -Files loaded last will take priority. - -The json file should be a dictionary with an entry for each model, as follows: - -``` -{ - "deepseek-chat": { - "max_tokens": 4096, - "max_input_tokens": 32000, - "max_output_tokens": 4096, - "input_cost_per_token": 0.00000014, - "output_cost_per_token": 0.00000028, - "litellm_provider": "deepseek", - "mode": "chat" - } -} -``` - -See -[litellm's model_prices_and_context_window.json file](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json) for more examples. diff --git a/website/docs/troubleshooting/edit-errors.md b/website/docs/troubleshooting/edit-errors.md index dbbd527dd..6fe8978ad 100644 --- a/website/docs/troubleshooting/edit-errors.md +++ b/website/docs/troubleshooting/edit-errors.md @@ -21,8 +21,8 @@ In these cases, here are some things you might try. ## Use a capable model -If possible try using GPT-4o or Opus, as they are the strongest and most -capable models. +If possible try using GPT-4o, Claude 3.5 Sonnet or Claude 3 Opus, +as they are the strongest and most capable models. Weaker models are more prone to