Commit graph

438 commits

Author SHA1 Message Date
Paul Gauthier
48fd67485c add a user message during --show-prompts 2024-05-08 13:49:38 -07:00
Paul Gauthier
9e7f2ec790 cleanup 2024-05-08 13:41:24 -07:00
Paul Gauthier
f256b43043 wip 2024-05-08 13:35:34 -07:00
Paul Gauthier
9ff6770a04 refactored litellm to avoid duplicating workarounds 2024-05-08 08:05:15 -07:00
Paul Gauthier
04b224962e send the reminder if unknown context window size 2024-05-07 08:42:33 -07:00
Paul Gauthier
e61857ef09 summarize as many messages as will fit into the summarizer context 2024-05-06 09:47:14 -07:00
Paul Gauthier
64470955d4 pass max_chat_history_tokens into ChatSummary 2024-05-06 09:29:21 -07:00
Paul Gauthier
1747525418 aider: Added max_chat_history_tokens as an explicit argument to the Coder.__init__ method and passed args.max_chat_history_tokens when creating the Coder instance in main().
# Aider chat conversation:

USER: don't use kwargs, add it as an explicit arg

ASSISTANT: Here is the *SEARCH/REPLACE block* to add `max_chat_history_tokens` as an explicit argument instead of using `**kwargs`:

aider/coders/base_coder.py
```python
<<<<<<< SEARCH
    def __init__(
        self,
        main_model,
        io,
        fnames=None,
        git_dname=None,
        pretty=True,
        show_diffs=False,
        auto_commits=True,
        dirty_commits=True,
        dry_run=False,
        map_tokens=1024,
        verbose=False,
        assistant_output_color="blue",
        code_theme="default",
        stream=True,
        use_git=True,
        voice_language=None,
        aider_ignore_file=None,
        cur_messages=None,
        done_messages=None,
    ):
=======
    def __init__(
        self,
        main_model,
        io,
        fnames=None,
        git_dname=None,
        pretty=True,
        show_diffs=False,
        auto_commits=True,
        dirty_commits=True,
        dry_run=False,
        map_tokens=1024,
        verbose=False,
        assistant_output_color="blue",
        code_theme="default",
        stream=True,
        use_git=True,
        voice_language=None,
        aider_ignore_file=None,
        cur_messages=None,
        done_messages=None,
        max_chat_history_tokens=None,
    ):
>>>>>>> REPLACE
```

aider/main.py
```python
<<<<<<< SEARCH
        coder = Coder.create(
            main_model=main_model,
            edit_format=args.edit_format,
            io=io,
            ##
            fnames=fnames,
            git_dname=git_dname,
            pretty=args.pretty,
            show_diffs=args.show_diffs,
            auto_commits=args.auto_commits,
            dirty_commits=args.dirty_commits,
            dry_run=args.dry_run,
            map_tokens=args.map_tokens,
            verbose=args.verbose,
            assistant_output_color=args.assistant_output_color,
            code_theme=args.code_theme,
            stream=args.stream,
            use_git=args.git,
            voice_language=args.voice_language,
            aider_ignore_file=args.aiderignore,
        )
=======
        coder = Coder.create(
            main_model=main_model,
            edit_format=args.edit_format,
            io=io,
            ##
            fnames=fnames,
            git_dname=git_dname,
            pretty=args.pretty,
            show_diffs=args.show_diffs,
            auto_commits=args.auto_commits,
            dirty_commits=args.dirty_commits,
            dry_run=args.dry_run,
            map_tokens=args.map_tokens,
            verbose=args.verbose,
            assistant_output_color=args.assistant_output_color,
            code_theme=args.code_theme,
            stream=args.stream,
            use_git=args.git,
            voice_language=args.voice_language,
            aider_ignore_file=args.aiderignore,
            max_chat_history_tokens=args.max_chat_history_tokens,
        )
>>>>>>> REPLACE
```

This adds `max_chat_history_tokens` as an explicit argument to the `Coder.__init__` method, and passes `args.max_chat_history_tokens` when creating the `Coder` instance in `main()`.
2024-05-06 09:25:04 -07:00
Paul Gauthier
eac8e4cb8f announce reload of chat history 2024-05-05 19:08:00 -07:00
Paul Gauthier
00c12efd3f cleanup 2024-05-05 19:04:24 -07:00
Paul Gauthier
b3e19cf5be reload history 2024-05-05 19:03:17 -07:00
Paul Gauthier
7bcce6e8c6 move reminder after examples 2024-05-04 08:00:39 -07:00
Paul Gauthier
b5bb453378 examples_as_sys_msg 2024-05-03 15:24:36 -07:00
Paul Gauthier
5d32dd77fc Added diff-fenced coder 2024-05-03 13:50:15 -07:00
Paul Gauthier
921c7ceb80 Merge branch 'main' into gemini-editblock-and-examples 2024-05-03 13:17:23 -07:00
Paul Gauthier
e76d1c0cfa accepts_multi_system_msgs -> reminder_as_sys_msg 2024-05-01 10:30:41 -07:00
Paul Gauthier
862c0dd0d7 stronger code base switch prompt 2024-05-01 09:40:47 -07:00
Paul Gauthier
0fb08896e3 Merge branch 'main' into gemini-editblock-and-examples 2024-05-01 09:02:08 -07:00
Paul Gauthier
7fd3b8aeee Tell the AI we are switching code bases 2024-04-30 20:51:24 -07:00
Paul Gauthier
d51cada163 make the examples part of the chat 2024-04-30 20:45:49 -07:00
Paul Gauthier
256a9a454c move cloning into Coder.create, summarize chat history if edit format changes 2024-04-30 17:31:58 -07:00
Paul Gauthier
8e9a00006b carry conversation history to switched model 2024-04-30 16:25:47 -07:00
Paul Gauthier
a3a4d87a0c treat litellm.exceptions.BadRequestError as a 400 error and do not retry 2024-04-30 15:40:28 -07:00
Paul Gauthier
d38a38f0dd implemented accepts_multi_system_msgs 2024-04-30 07:57:29 -07:00
Paul Gauthier
2d16ee16ac Make lazy prompt configurable 2024-04-30 07:45:16 -07:00
Paul Gauthier
65dccb6205 Merge branch 'main' into gemini-editblock 2024-04-29 20:42:52 -07:00
Paul Gauthier
ec9fac2500 simpler launch of streamlit 2024-04-28 14:48:40 -07:00
Paul Gauthier
ca6349069c noop 2024-04-28 12:38:25 -07:00
Paul Gauthier
0f8efa3714 Coder.drop_rel_fname 2024-04-28 07:15:48 -07:00
Paul Gauthier
296a336d22 yield from 2024-04-27 11:47:18 -07:00
Paul Gauthier
701103a9cc chat works, with commits and reflected messages 2024-04-27 08:09:13 -07:00
Paul Gauthier
86d7705166 restructured reflected messages 2024-04-26 16:02:45 -07:00
Paul Gauthier
15e6651e09 stream to gui 2024-04-26 15:41:47 -07:00
Paul Gauthier
3f5cdb603c fixed announcements 2024-04-26 13:20:14 -07:00
Paul Gauthier
d21de778ff announcements 2024-04-26 11:24:42 -07:00
Paul Gauthier
29eb2f4681 seems to work better 2024-04-23 14:06:08 -07:00
Paul Gauthier
f92aecbf7a Allow repo map to work with whole edit format, for weaker models with large context 2024-04-23 10:21:54 -07:00
Paul Gauthier
efd3c39e50 Better unknown model warnings 2024-04-22 14:09:08 -07:00
Paul Gauthier
7ec4de865d Added --weak-model 2024-04-19 10:57:21 -07:00
Paul Gauthier
0da1b59901 Fixed up images in chat 2024-04-18 14:39:32 -07:00
Paul Gauthier
cf2a48b21f get_weak_model 2024-04-18 13:55:43 -07:00
Paul Gauthier
c770fc4380 cleaned up client refs 2024-04-17 15:47:07 -07:00
Paul Gauthier
f1a31d3944 pass in commit models to gitrepo 2024-04-17 15:41:30 -07:00
Paul Gauthier
3662a4680b token pricing 2024-04-17 15:34:59 -07:00
Paul Gauthier
c9bb22d6d5 roughed in tokenizer, dropped openai, openrouter 2024-04-17 15:22:35 -07:00
Paul Gauthier
855e787175 removed skip-model-avail-check 2024-04-17 15:02:39 -07:00
Paul Gauthier
5c10944054 Abstract the default model name so it applies to scripting #537 2024-04-11 06:42:38 -07:00
Aloha
1fc1c304c7
Fix: use f-string 2024-04-11 16:58:10 +08:00
Paul Gauthier
0871764766 Don't share local git errors with GPT #500 2024-03-08 12:24:54 -08:00
Paul Gauthier
7fbd9e2be4 Added claude post 2024-03-08 08:00:41 -08:00