diff --git a/website/docs/faq.md b/website/docs/faq.md index 1744e969d..8159e6e73 100644 --- a/website/docs/faq.md +++ b/website/docs/faq.md @@ -63,34 +63,6 @@ has provided this [Colab notebook](https://colab.research.google.com/drive/1J9XynhrCqekPL5PR6olHP6eE--rnnjS9?usp=sharing). -## Aider isn't editing my files? - -Sometimes the LLM will reply with some code changes that don't get applied to your local files. -In these cases, aider might say something like "Failed to apply edit to *filename*". - -This usually happens because the LLM is not specifying the edits -to make in the format that aider expects. -GPT-3.5 is especially prone to disobeying the system prompt instructions in this manner, but it also happens with stronger models. - -Aider makes every effort to get the LLM -to conform, and works hard to deal with -replies that are "almost" correctly formatted. -If Aider detects an improperly formatted reply, it gives -the LLM feedback to try again. -Also, before each release new versions of aider are -[benchmarked](https://aider.chat/docs/benchmarks.html). -This helps prevent regressions in the code editing -performance of an LLM that could have been inadvertantly -introduced. - -But sometimes the LLM just won't cooperate. -In these cases, here are some things you might try: - - - Use `/drop` to remove files from the chat session which aren't needed for the task at hand. This will reduce distractions and may help GPT produce properly formatted edits. - - Use `/clear` to remove the conversation history, again to help GPT focus. - - Try the a different LLM. - - ## Can I change the system prompts that aider uses? Aider is set up to support different system prompts and edit formats diff --git a/website/docs/scripting.md b/website/docs/scripting.md index de3709f0f..94c357198 100644 --- a/website/docs/scripting.md +++ b/website/docs/scripting.md @@ -62,7 +62,7 @@ from aider.models import Model # This is a list of files to add to the chat fnames = ["greeting.py"] -model = Model("gpt-4-turbo", weak_model="gpt-3.5-turbo") +model = Model("gpt-4-turbo") # Create a coder object coder = Coder.create(main_model=model, fnames=fnames) @@ -84,6 +84,6 @@ It can also be helpful to set the equivalend of `--yes` by doing this: from aider.io import InputOutput io = InputOutput(yes=True) # ... -coder = Coder.create(client=client, fnames=fnames, io=io) +coder = Coder.create(model=model, fnames=fnames, io=io) ``` diff --git a/website/docs/troubleshooting.md b/website/docs/troubleshooting.md new file mode 100644 index 000000000..72d48981b --- /dev/null +++ b/website/docs/troubleshooting.md @@ -0,0 +1,27 @@ +--- +nav_order: 60 +has_children: true +--- + +# Troubleshooting + +Below are some approaches for troubleshooting problems with aider. +If you need more help, please file a +[GitHub issue]() +or drop into our +[Discord](). + +When reporting problems, it is very helpful if you can provide: + +- Aider version +- LLM model you are using + +The easiest way to do that is to copy the "announcement" lines that +aider prints when you run it: + +``` +Aider v0.37.1-dev +Models: gpt-4o with diff edit format, weak model gpt-3.5-turbo +Git repo: .git with 243 files +Repo-map: using 1024 tokens +``` diff --git a/website/docs/troubleshooting/edit-errors.md b/website/docs/troubleshooting/edit-errors.md new file mode 100644 index 000000000..e44d4eb5e --- /dev/null +++ b/website/docs/troubleshooting/edit-errors.md @@ -0,0 +1,42 @@ +--- +parent: Troubleshooting +nav_order: 10 +--- + +# File editing problems + +Sometimes the LLM will reply with some code changes +that don't get applied to your local files. +In these cases, aider might say something like "Failed to apply edit to *filename*" +or other error messages. + +This usually happens because the LLM is disobeying the system prompts +and trying to make edits in a format that aider doesn't expect. +Aider makes every effort to get the LLM +to conform, and works hard to deal with +LLMM edits that are "almost" correctly formatted. + +But sometimes the LLM just won't cooperate. +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. + +Weaker models +are more pront to +disobeying the system prompt instructions. +Most local models are just barely capable of working with aider, +so editing errors should be expected. + +## Reduce distractions + +Many models now have very large context windows, +but filling them with irrelevant code often +cofuses the model. + +- Don't add too many files to the chat, *just* add the files you think need to be edited. +Aider also sends the LLM a [map of your entire git repo](https://aider.chat/docs/repomap.html), so other relevant code will be included automatically. +- Use `/drop` to remove files from the chat session which aren't needed for the task at hand. This will reduce distractions and may help GPT produce properly formatted edits. +- Use `/clear` to remove the conversation history, again to help GPT focus. diff --git a/website/docs/llms/warnings.md b/website/docs/troubleshooting/warnings.md similarity index 98% rename from website/docs/llms/warnings.md rename to website/docs/troubleshooting/warnings.md index d96bb6d44..f8e0f6483 100644 --- a/website/docs/llms/warnings.md +++ b/website/docs/troubleshooting/warnings.md @@ -1,5 +1,5 @@ --- -parent: Connecting to LLMs +parent: Troubleshooting nav_order: 900 ---