Commit graph

438 commits

Author SHA1 Message Date
Thinh Nguyen
2f835e9c46
Add default value for skip_model_availabily_check 2023-09-08 16:09:35 -07:00
Thinh Nguyen
45298f8af6
Add option to skip model availability check 2023-09-08 14:04:02 -07:00
paul-gauthier
7ba70632e8
Merge pull request #244 from joshuavial/fix-openrouter-token-usage
only show token costs if usage exists
2023-09-08 08:37:09 -07:00
Paul Gauthier
bfbd7b8416 Merge remote-tracking branch 'origin/main' 2023-09-08 08:26:23 -07:00
Joshua Vial
166984e94a only show token costs if usage exists 2023-09-08 11:49:41 +12:00
Joshua Vial
98097005c7 small fix for better error handling if the summarizer ever fails
- fix #231
2023-09-06 15:03:54 +12:00
Paul Gauthier
1334392418 lint 2023-09-01 15:53:19 -07:00
Paul Gauthier
0de722a7b3 lint 2023-09-01 15:52:56 -07:00
Paul Gauthier
fa6ae80653 Merge branch 'main' into sitter-map 2023-09-01 12:00:48 -07:00
Joshua Vial
abbc93678b finishing openrouter integration 2023-08-23 21:26:27 +12:00
JV
a0d6efc13c dynamically get pricing and context length for openrouter models 2023-08-23 14:39:12 +12:00
JV
041f3a4a38 initial code for working with openrouter 2023-08-23 14:39:12 +12:00
Paul Gauthier
de0cfe4d39 refac to remove ctags 2023-08-19 19:24:42 -07:00
Paul Gauthier
ae8d04a95f Handle diff of file not yet part of repo 2023-08-18 13:20:27 -07:00
Paul Gauthier
cd830cbc3c noop 2023-08-18 10:16:17 -07:00
Paul Gauthier
7af82ba185 keep track of the files which need dirty commits 2023-08-18 09:50:18 -07:00
Paul Gauthier
752e47a886 better tests, small cleanups 2023-08-18 09:43:40 -07:00
Paul Gauthier
e608a351f0 standardize on abs_root_path(), simplify get/apply_edit 2023-08-18 07:20:15 -07:00
Paul Gauthier
f45bcbf8eb make reference to repo conditional 2023-08-18 07:11:42 -07:00
Paul Gauthier
8f26c27921 just diff the named files on commit 2023-08-18 07:09:16 -07:00
Paul Gauthier
389bf9310c commit just the edited files, treat named files outside git as dirty 2023-08-18 07:05:48 -07:00
Paul Gauthier
d89316147a do not add new files to git 2023-08-17 16:31:21 -07:00
Paul Gauthier
fbc4a49c24 Removed support for func based coders 2023-08-17 11:19:49 -07:00
Paul Gauthier
3401395e61 fix wholefile tests 2023-08-17 11:08:50 -07:00
Paul Gauthier
fef5a7b917 only check tracked files if there is a repo 2023-08-17 10:44:33 -07:00
Paul Gauthier
0a653d34d3 cleanup 2023-08-17 10:40:56 -07:00
Paul Gauthier
d981de5f5f do the commit before applying edits 2023-08-17 10:40:01 -07:00
Paul Gauthier
2455676a44 refactor to enumerate files to be edited, then make the edits 2023-08-17 10:07:22 -07:00
Paul Gauthier
f4e1c1010b aider: Accept voice_language param in __init__, pass to Commands.
# Aider chat conversation:

USER: accept voice_language param in __ini__, pass to Commands

ASSISTANT: To implement this change, we need to modify the following files:

1. `aider/coders/base_coder.py`: We need to modify the `__init__` method of the `Coder` class to accept a new parameter `voice_language`. We also need to pass this new parameter to the `Commands` class.

Here are the changes:

```python
aider/coders/base_coder.py
<<<<<<< HEAD
    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,
    ):
=======
    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,
    ):
>>>>>>> updated
```

```python
aider/coders/base_coder.py
<<<<<<< HEAD
        self.commands = Commands(self.io, self)
=======
        self.commands = Commands(self.io, self, voice_language)
>>>>>>> updated
```

Please confirm these changes.
2023-08-14 14:09:45 -03:00
Paul Gauthier
9cb1a9b186 cleanup 2023-08-08 07:38:37 -03:00
paul-gauthier
6a88d0f2b9
Merge pull request #177 from h0x91b/h0x91b-patch-1
Update base_coder.py
2023-08-08 07:37:51 -03:00
Paul Gauthier
3c0720ff1c Fix corner case of undefined text when using --no-pretty 2023-08-08 07:00:21 -03:00
Paul Gauthier
03ac5202dd Handle a pending summarization 2023-08-07 08:33:06 -03:00
Arseniy Pavlenko
aedd6ed8d0
Update base_coder.py
It fixes 2 exceptions on Azure GPT-4

1)
Traceback (most recent call last):
  File "/opt/homebrew/bin//aider", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.10/site-packages/aider/main.py", line 523, in main
    coder.run()
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 339, in run
    new_user_message = self.run_loop()
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 423, in run_loop
    return self.send_new_user_message(inp)
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 456, in send_new_user_message
    interrupted = self.send(messages, functions=self.functions)
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 580, in send
    self.show_send_output_stream(completion)
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 680, in show_send_output_stream
    sys.stdout.write(text)
UnboundLocalError: local variable 'text' referenced before assignment

2) 
Traceback (most recent call last):
  File "/opt/homebrew/bin//aider", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.10/site-packages/aider/main.py", line 523, in main
    coder.run()
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 339, in run
    new_user_message = self.run_loop()
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 423, in run_loop
    return self.send_new_user_message(inp)
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 456, in send_new_user_message
    interrupted = self.send(messages, functions=self.functions)
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 580, in send
    self.show_send_output_stream(completion)
  File "/opt/homebrew/lib/python3.10/site-packages/aider/coders/base_coder.py", line 656, in show_send_output_stream
    if chunk.choices[0].finish_reason == "length":
IndexError: list index out of range
2023-08-03 23:37:44 +03:00
Paul Gauthier
d5a7aac560 include token/cost in log 2023-07-28 11:33:37 -03:00
Paul Gauthier
80d5c0b75c use 3.5 for summaries 2023-07-27 22:54:26 -03:00
Paul Gauthier
d1d498bb24 cleanup 2023-07-27 22:34:41 -03:00
Paul Gauthier
16dea76691 Merge branch 'main' into chat-history 2023-07-27 22:32:33 -03:00
Paul Gauthier
832259b55b Bugfix reference to self.get_tracked_files, plus test coverage 2023-07-27 06:55:06 -03:00
Paul Gauthier
05c1b3bc99 cleanup 2023-07-25 09:13:07 -03:00
Paul Gauthier
9050b9bd93 threading 2023-07-25 07:57:05 -03:00
Paul Gauthier
4e348102bf wip 2023-07-25 07:46:05 -03:00
Paul Gauthier
0db9d210d7 Advise the user when chat history is being summarized 2023-07-24 19:05:57 -03:00
Paul Gauthier
844194c268 Merge branch 'refactor-repo' into chat-history 2023-07-24 18:48:26 -03:00
Paul Gauthier
64c50bab48 Accept either a git dname or a list of fnames 2023-07-24 17:31:00 -03:00
Paul Gauthier
69aea3e745 Add summary prefix 2023-07-22 12:11:01 -03:00
Paul Gauthier
c26917851f Added a ChatSummary object to Coder class and used it to summarize chat history. 2023-07-22 10:34:48 -03:00
Paul Gauthier
6e03d2f214 Merge branch 'refactor-repo' into chat-history 2023-07-22 09:48:05 -03:00
Paul Gauthier
9ab21d36a6 bugfix 2023-07-22 09:47:54 -03:00
Paul Gauthier
c27087bbda Remove the call to the summarize_chat_history function in move_back_cur_messages method. 2023-07-22 09:45:27 -03:00