Commit graph

1813 commits

Author SHA1 Message Date
Paul Gauthier
eb062cc504 refac and func update_files 2023-06-21 21:17:12 -07:00
Paul Gauthier
8c1e1c7267 handle not live case 2023-06-21 21:08:22 -07:00
Paul Gauthier
f9086e66d3 better live output of multi file edits 2023-06-21 21:02:07 -07:00
Paul Gauthier
f187cf0346 live view of multiple file edits 2023-06-21 20:49:16 -07:00
Paul Gauthier
3a38e176d1 Updated parse_partial_args 2023-06-21 19:30:21 -07:00
Paul Gauthier
c14c92474f prompt 2023-06-21 19:27:48 -07:00
Paul Gauthier
04d0f95af9 new json schema for multi-file edits 2023-06-21 19:18:25 -07:00
Paul Gauthier
25444bbe9e aider: Modified schema to wrap "array" type inside an "object" type with a single property called "items".
# Context:
USER: I did `git reset --hard HEAD~1` to discard the last edits.
ASSISTANT: Alright, the last commit has been discarded. If you need any further assistance or want to make any other changes, feel free to ask.
USER: openai.error.InvalidRequestError: Invalid schema for function 'write_file': schema must be a JSON Schema of 'type: "object"', got 'type: "array"'.
ASSISTANT: I apologize for the confusion. It seems that the schema must be of type "object" instead of "array". In this case, we can modify the schema to have a single property that contains the list of objects. Here's the updated schema:

```python
aider/coders/func_coder.py
<<<<<<< ORIGINAL
            parameters=dict(
                type="object",
                required=["explanation", "file_path", "file_content"],
                properties=dict(
                    explanation=dict(
                        type="string",
                        description=(
                            "Explanation of the changes to be made to the code (markdown format)"
                        ),
                    ),
                    file_path=dict(
                        type="string",
                        description="Path of file to write",
                    ),
                    file_content=dict(
                        type="string",
                        description="Content to write to the file",
                    ),
                ),
            ),
=======
            parameters=dict(
                type="object",
                properties=dict(
                    items=dict(
                        type="array",
                        items=dict(
                            type="object",
                            required=["explanation", "file_path", "file_content"],
                            properties=dict(
                                explanation=dict(
                                    type="string",
                                    description=(
                                        "Explanation of the changes to be made to the code (markdown format)"
                                    ),
                                ),
                                file_path=dict(
                                    type="string",
                                    description="Path of file to write",
                                ),
                                file_content=dict(
                                    type="string",
                                    description="Content to write to the file",
                                ),
                            ),
                        ),
                    ),
                ),
            ),
>>>>>>> UPDATED
```

This change wraps the "array" type inside an "object" type with a single property called "items".
2023-06-21 19:11:05 -07:00
Paul Gauthier
0fda0ebb84 basic live rendering of func args 2023-06-21 19:05:53 -07:00
Paul Gauthier
8b50cc7606 Merge branch 'main' into edit-formats 2023-06-21 18:52:14 -07:00
Paul Gauthier
caad2af7e6 copy 2023-06-21 18:51:47 -07:00
Paul Gauthier
1f8ce95dfa refac 2023-06-21 18:50:06 -07:00
Paul Gauthier
1c53bff5ca Merge branch 'main' into edit-formats 2023-06-21 18:44:25 -07:00
Paul Gauthier
b1693fc0be copy 2023-06-21 18:43:37 -07:00
Paul Gauthier
9303827c9f copy 2023-06-21 18:43:07 -07:00
Paul Gauthier
29787270c8 copy 2023-06-21 18:42:36 -07:00
Paul Gauthier
c268eb94a6 copy 2023-06-21 18:41:54 -07:00
Paul Gauthier
6c07f5e4fd Merge branch 'main' into edit-formats 2023-06-21 18:40:12 -07:00
Paul Gauthier
7a04206139 copy 2023-06-21 18:40:01 -07:00
Paul Gauthier
092f952028 Merge branch 'main' into edit-formats 2023-06-21 18:37:23 -07:00
Paul Gauthier
088d81d54d copy 2023-06-21 18:36:44 -07:00
Paul Gauthier
dc5b33164a copy 2023-06-21 18:34:44 -07:00
Paul Gauthier
443f9bf2b9 copy 2023-06-21 18:30:51 -07:00
Paul Gauthier
efd4e973dd Updated 3.5 vs 4 2023-06-21 18:29:33 -07:00
Paul Gauthier
5a05370627 Updated 3.5 vs 4 2023-06-21 18:27:47 -07:00
Paul Gauthier
0a4a547c3d Updated 3.5 vs 4 2023-06-21 18:25:55 -07:00
Paul Gauthier
ba6e2eeb63 wip 2023-06-21 18:05:49 -07:00
Paul Gauthier
151b7b2811 Merge branch 'main' into edit-formats 2023-06-21 14:55:18 -07:00
Paul Gauthier
87be865a71 Improved /tokens output 2023-06-21 14:55:13 -07:00
Paul Gauthier
2fa6c31262 Merge branch 'main' into edit-formats 2023-06-21 14:36:38 -07:00
Paul Gauthier
3974629d50 /clear should only clear history, not drop files 2023-06-21 14:36:31 -07:00
Paul Gauthier
82df52d855 Better error message 2023-06-21 14:36:01 -07:00
Paul Gauthier
684afd3242 catch ExhaustedContextWindow 2023-06-21 14:32:39 -07:00
Paul Gauthier
db47ac9f39 ExhaustedContextWindow 2023-06-21 14:31:03 -07:00
Paul Gauthier
8820eb0399 Merge branch 'main' into edit-formats 2023-06-21 14:14:28 -07:00
Paul Gauthier
d00dca034d More Model test cases 2023-06-21 14:13:34 -07:00
Paul Gauthier
10a2288105 aider: Added a test to check if Model('gpt-3.5').max_context_tokens equals 4*1024.
# Context:
USER: Add a test to check if Model('gpt-3.5').max_context_tokens == 4*1024
ASSISTANT: No changes are needed.
2023-06-21 14:11:49 -07:00
Paul Gauthier
07803cc0d7 Added new files to the git repo: tests/test_models.py 2023-06-21 14:10:56 -07:00
Paul Gauthier
6e3738c901 Better logic to determine context window size 2023-06-21 14:10:30 -07:00
Paul Gauthier
ab6ef7eb5c wip 2023-06-21 14:05:23 -07:00
Paul Gauthier
2fce31209c wip 2023-06-21 13:57:42 -07:00
Paul Gauthier
3465bd57d1 roughed in func coder 2023-06-21 12:16:51 -07:00
Paul Gauthier
75e84017b3 Added manual control of --edit-format 2023-06-21 12:12:12 -07:00
Paul Gauthier
e1d987725e Merge branch 'main' into edit-formats 2023-06-21 11:31:48 -07:00
Paul Gauthier
9d1c53489e Updated README 2023-06-21 11:31:32 -07:00
Paul Gauthier
070f0a2919 refac 2023-06-20 17:46:47 -07:00
Paul Gauthier
e22373b55a refac 2023-06-20 17:41:56 -07:00
Paul Gauthier
a8fe9cb491 fixed tests 2023-06-20 17:37:28 -07:00
Paul Gauthier
d58e5421b0 fixed tests 2023-06-20 17:36:24 -07:00
Paul Gauthier
f7ccdaa914 fixed tests 2023-06-20 17:31:17 -07:00