Commit graph

24 commits

Author SHA1 Message Date
Paul Gauthier
cf2a48b21f get_weak_model 2024-04-18 13:55:43 -07:00
Paul Gauthier
93f4a46996 reorg 2024-04-18 09:29:26 -07:00
JV
041f3a4a38 initial code for working with openrouter 2023-08-23 14:39:12 +12:00
Paul Gauthier
b4fe54a917 Disabled general availability of gpt-4 (it's rolling out, not 100% available yet) 2023-07-08 05:57:56 -07:00
Paul Gauthier
42977230b1 Mark gpt-4 as always_available to skip the availability check on startup 2023-07-06 17:44:12 -07:00
Paul Gauthier
d9b356de99 wip 2023-06-23 14:36:45 -07:00
Paul Gauthier
5c432592cd compute cost 2023-06-23 13:40:32 -07:00
Paul Gauthier
16a89fb5ab switch 3.5 models to use whole-func edit-format by default 2023-06-22 11:47:18 -07:00
Paul Gauthier
8820eb0399 Merge branch 'main' into edit-formats 2023-06-21 14:14:28 -07:00
Paul Gauthier
6e3738c901 Better logic to determine context window size 2023-06-21 14:10:30 -07:00
Paul Gauthier
3465bd57d1 roughed in func coder 2023-06-21 12:16:51 -07:00
Paul Gauthier
122c1c4f6c Model.use_repo_map, Model.send_undo_reply 2023-06-20 16:13:50 -07:00
Paul Gauthier
43ba638ac4 refac 2023-06-20 15:46:22 -07:00
Paul Gauthier
4d3fc3de7e Merge branch 'main' into edit-formats 2023-06-20 15:43:14 -07:00
Paul Gauthier
8fb4ab2be3 cleaned up Model init 2023-06-15 06:26:16 -07:00
Paul Gauthier
8660d35601 More flexible models 2023-06-14 17:51:17 -07:00
Paul Gauthier
8b5dcecbe2 aider: Added regex to extract tokens from name in get_model function.
# Context:
USER: use a regex to check `name` for "-XXk" and set tokens = the number XX
ASSISTANT: To use a regex to check for "-XXk" in the `name` and set `tokens` to the number XX, you can modify the `get_model` function in the `aider/models.py` file. Here's the updated code:

```python
aider/models.py
<<<<<<< ORIGINAL
def get_model(name):
    models = GPT35_models + GPT4_models

    for model in models:
        if model.name == name:
            return model

    tokens = 0

    model = Model(name, tokens)
=======
import re

def get_model(name):
    models = GPT35_models + GPT4_models

    for model in models:
        if model.name == name:
            return model

    match = re.search(r'-([0-9]+)k', name)
    tokens = int(match.group(1)) if match else 0

    model = Model(name, tokens)
>>>>>>> UPDATED
```

This change imports the `re` module and uses the `re.search()` function to find the "-XXk" pattern in the `name`. If the pattern is found, it sets `tokens` to the number XX.
2023-06-14 17:11:29 -07:00
Paul Gauthier
8c91e107e0 wip 2023-06-14 17:10:27 -07:00
Paul Gauthier
67ee800c55 refactor models to add gpt-4-32k-0613 2023-06-14 17:09:53 -07:00
Paul Gauthier
9c126210a9 Make 3.5-16k use diff 2023-06-13 13:02:26 -07:00
Paul Gauthier
21672d5231 roughed in edit-formats 2023-06-13 12:54:03 -07:00
Paul Gauthier
25a28e6f9c Improved support for gpt-3.5-turbo-16k 2023-06-13 12:19:56 -07:00
Paul Gauthier
1ce38d230b Added basic support for gpt-3.5-turbo-16k 2023-06-13 11:59:03 -07:00
Paul Gauthier
587261ef12 added adier/models.py 2023-06-07 13:14:55 -07:00