auto-coder 0.1.6__tar.gz → 0.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {auto-coder-0.1.6 → auto-coder-0.1.7}/PKG-INFO +29 -4
- {auto-coder-0.1.6 → auto-coder-0.1.7}/README.md +28 -3
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/auto_coder.egg-info/PKG-INFO +29 -4
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/auto_coder.py +10 -2
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/common/__init__.py +1 -0
- auto-coder-0.1.7/src/autocoder/version.py +1 -0
- auto-coder-0.1.6/src/autocoder/version.py +0 -1
- {auto-coder-0.1.6 → auto-coder-0.1.7}/setup.cfg +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/setup.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/auto_coder.egg-info/SOURCES.txt +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/auto_coder.egg-info/dependency_links.txt +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/auto_coder.egg-info/entry_points.txt +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/auto_coder.egg-info/top_level.txt +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/__init__.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/common/JupyterClient.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/common/ShellClient.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/common/cleaner.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/common/const.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/dispacher/__init__.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/dispacher/actions/__init__.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/dispacher/actions/copilot.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/index/__init__.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/index/index.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/pyproject/__init__.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/suffixproject/__init__.py +0 -0
- {auto-coder-0.1.6 → auto-coder-0.1.7}/src/autocoder/tsproject/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: auto-coder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
@@ -27,7 +27,7 @@ Auto-Coder (powered by Byzer-LLM)
|
|
|
27
27
|
|
|
28
28
|
*Latest News* 🔥
|
|
29
29
|
|
|
30
|
-
- [2024/03] Release Auto-Coder 0.1.
|
|
30
|
+
- [2024/03] Release Auto-Coder 0.1.7
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
@@ -101,14 +101,14 @@ pip install -U auto-coder
|
|
|
101
101
|
|
|
102
102
|
The auto-coder provide two ways:
|
|
103
103
|
|
|
104
|
-
1. Generate context for the query and
|
|
104
|
+
1. Generate context for the query and you can copy&&Paste to Web UI of ChatGPT/Claud3/Kimi.
|
|
105
105
|
2. Use the model from Byzer-LLM to generate the result directly.
|
|
106
106
|
|
|
107
107
|
>> Note: You should make sure the model has a long context length support, e.g. >32k.
|
|
108
108
|
|
|
109
109
|
The auto-coder will collect the source code from the source directory, and then generate context into the target file based on the query.
|
|
110
110
|
|
|
111
|
-
Then you can copy the content of `output.txt` and paste it to Web of ChatGPT
|
|
111
|
+
Then you can copy the content of `output.txt` and paste it to Web UI of ChatGPT/Claud3/Kimi:
|
|
112
112
|
|
|
113
113
|
For example:
|
|
114
114
|
|
|
@@ -141,6 +141,31 @@ auto-coder --source_dir /home/winubuntu/projects/ByzerRawCopilot --target_file /
|
|
|
141
141
|
|
|
142
142
|
In the above command, we provide a model and enable the execute mode, the auto-coder will collect the source code from the source directory, and then generate context for the query, and then use the model to generate the result, then put the result into the target file.
|
|
143
143
|
|
|
144
|
+
### How to reduce the context length?
|
|
145
|
+
|
|
146
|
+
As you may know, auto-coder will collect the source code from the source directory, and then generate context for the query, if the source directory is too large, the context will be too large, and the model may not be able to handle it.
|
|
147
|
+
|
|
148
|
+
You can change the source directory to sub directory to reduce the context length.
|
|
149
|
+
|
|
150
|
+
We also provide a way to reduce the context length, you can use the following configuration:
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
source_dir: /home/winubuntu/projects/ByzerRawCopilot
|
|
154
|
+
target_file: /home/winubuntu/projects/ByzerRawCopilot/output.txt
|
|
155
|
+
model: qianwen_chat
|
|
156
|
+
model_max_length: 2000
|
|
157
|
+
anti_quota_limit: 13
|
|
158
|
+
skip_build_index: false
|
|
159
|
+
project_type: "copilot/.py"
|
|
160
|
+
query: |
|
|
161
|
+
优化 copilot 里的 get_suffix_from_project_type 函数并更新原文件
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
here we add a new parameter `skip_build_index`, by default, this value is true. If you set it to false, the auto-coder collect the source code from the source directory, and then generate index for the source code(This may cost a lot of tokens), and then create a directory called `.auto-coder` in source directory to store the index. Once the index is created, the auto-coder will use the index to filter files and reduce the context length. notice that the filter is also cost tokens, so you should use it carefully.
|
|
165
|
+
|
|
166
|
+
> skip_build_index only works for project_type "copilot" now.
|
|
167
|
+
|
|
168
|
+
|
|
144
169
|
### Advanced
|
|
145
170
|
|
|
146
171
|
> This feature only works with the model from Byzer-LLM.
|
|
@@ -18,7 +18,7 @@ Auto-Coder (powered by Byzer-LLM)
|
|
|
18
18
|
|
|
19
19
|
*Latest News* 🔥
|
|
20
20
|
|
|
21
|
-
- [2024/03] Release Auto-Coder 0.1.
|
|
21
|
+
- [2024/03] Release Auto-Coder 0.1.7
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -92,14 +92,14 @@ pip install -U auto-coder
|
|
|
92
92
|
|
|
93
93
|
The auto-coder provide two ways:
|
|
94
94
|
|
|
95
|
-
1. Generate context for the query and
|
|
95
|
+
1. Generate context for the query and you can copy&&Paste to Web UI of ChatGPT/Claud3/Kimi.
|
|
96
96
|
2. Use the model from Byzer-LLM to generate the result directly.
|
|
97
97
|
|
|
98
98
|
>> Note: You should make sure the model has a long context length support, e.g. >32k.
|
|
99
99
|
|
|
100
100
|
The auto-coder will collect the source code from the source directory, and then generate context into the target file based on the query.
|
|
101
101
|
|
|
102
|
-
Then you can copy the content of `output.txt` and paste it to Web of ChatGPT
|
|
102
|
+
Then you can copy the content of `output.txt` and paste it to Web UI of ChatGPT/Claud3/Kimi:
|
|
103
103
|
|
|
104
104
|
For example:
|
|
105
105
|
|
|
@@ -132,6 +132,31 @@ auto-coder --source_dir /home/winubuntu/projects/ByzerRawCopilot --target_file /
|
|
|
132
132
|
|
|
133
133
|
In the above command, we provide a model and enable the execute mode, the auto-coder will collect the source code from the source directory, and then generate context for the query, and then use the model to generate the result, then put the result into the target file.
|
|
134
134
|
|
|
135
|
+
### How to reduce the context length?
|
|
136
|
+
|
|
137
|
+
As you may know, auto-coder will collect the source code from the source directory, and then generate context for the query, if the source directory is too large, the context will be too large, and the model may not be able to handle it.
|
|
138
|
+
|
|
139
|
+
You can change the source directory to sub directory to reduce the context length.
|
|
140
|
+
|
|
141
|
+
We also provide a way to reduce the context length, you can use the following configuration:
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
source_dir: /home/winubuntu/projects/ByzerRawCopilot
|
|
145
|
+
target_file: /home/winubuntu/projects/ByzerRawCopilot/output.txt
|
|
146
|
+
model: qianwen_chat
|
|
147
|
+
model_max_length: 2000
|
|
148
|
+
anti_quota_limit: 13
|
|
149
|
+
skip_build_index: false
|
|
150
|
+
project_type: "copilot/.py"
|
|
151
|
+
query: |
|
|
152
|
+
优化 copilot 里的 get_suffix_from_project_type 函数并更新原文件
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
here we add a new parameter `skip_build_index`, by default, this value is true. If you set it to false, the auto-coder collect the source code from the source directory, and then generate index for the source code(This may cost a lot of tokens), and then create a directory called `.auto-coder` in source directory to store the index. Once the index is created, the auto-coder will use the index to filter files and reduce the context length. notice that the filter is also cost tokens, so you should use it carefully.
|
|
156
|
+
|
|
157
|
+
> skip_build_index only works for project_type "copilot" now.
|
|
158
|
+
|
|
159
|
+
|
|
135
160
|
### Advanced
|
|
136
161
|
|
|
137
162
|
> This feature only works with the model from Byzer-LLM.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: auto-coder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
@@ -27,7 +27,7 @@ Auto-Coder (powered by Byzer-LLM)
|
|
|
27
27
|
|
|
28
28
|
*Latest News* 🔥
|
|
29
29
|
|
|
30
|
-
- [2024/03] Release Auto-Coder 0.1.
|
|
30
|
+
- [2024/03] Release Auto-Coder 0.1.7
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
@@ -101,14 +101,14 @@ pip install -U auto-coder
|
|
|
101
101
|
|
|
102
102
|
The auto-coder provide two ways:
|
|
103
103
|
|
|
104
|
-
1. Generate context for the query and
|
|
104
|
+
1. Generate context for the query and you can copy&&Paste to Web UI of ChatGPT/Claud3/Kimi.
|
|
105
105
|
2. Use the model from Byzer-LLM to generate the result directly.
|
|
106
106
|
|
|
107
107
|
>> Note: You should make sure the model has a long context length support, e.g. >32k.
|
|
108
108
|
|
|
109
109
|
The auto-coder will collect the source code from the source directory, and then generate context into the target file based on the query.
|
|
110
110
|
|
|
111
|
-
Then you can copy the content of `output.txt` and paste it to Web of ChatGPT
|
|
111
|
+
Then you can copy the content of `output.txt` and paste it to Web UI of ChatGPT/Claud3/Kimi:
|
|
112
112
|
|
|
113
113
|
For example:
|
|
114
114
|
|
|
@@ -141,6 +141,31 @@ auto-coder --source_dir /home/winubuntu/projects/ByzerRawCopilot --target_file /
|
|
|
141
141
|
|
|
142
142
|
In the above command, we provide a model and enable the execute mode, the auto-coder will collect the source code from the source directory, and then generate context for the query, and then use the model to generate the result, then put the result into the target file.
|
|
143
143
|
|
|
144
|
+
### How to reduce the context length?
|
|
145
|
+
|
|
146
|
+
As you may know, auto-coder will collect the source code from the source directory, and then generate context for the query, if the source directory is too large, the context will be too large, and the model may not be able to handle it.
|
|
147
|
+
|
|
148
|
+
You can change the source directory to sub directory to reduce the context length.
|
|
149
|
+
|
|
150
|
+
We also provide a way to reduce the context length, you can use the following configuration:
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
source_dir: /home/winubuntu/projects/ByzerRawCopilot
|
|
154
|
+
target_file: /home/winubuntu/projects/ByzerRawCopilot/output.txt
|
|
155
|
+
model: qianwen_chat
|
|
156
|
+
model_max_length: 2000
|
|
157
|
+
anti_quota_limit: 13
|
|
158
|
+
skip_build_index: false
|
|
159
|
+
project_type: "copilot/.py"
|
|
160
|
+
query: |
|
|
161
|
+
优化 copilot 里的 get_suffix_from_project_type 函数并更新原文件
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
here we add a new parameter `skip_build_index`, by default, this value is true. If you set it to false, the auto-coder collect the source code from the source directory, and then generate index for the source code(This may cost a lot of tokens), and then create a directory called `.auto-coder` in source directory to store the index. Once the index is created, the auto-coder will use the index to filter files and reduce the context length. notice that the filter is also cost tokens, so you should use it carefully.
|
|
165
|
+
|
|
166
|
+
> skip_build_index only works for project_type "copilot" now.
|
|
167
|
+
|
|
168
|
+
|
|
144
169
|
### Advanced
|
|
145
170
|
|
|
146
171
|
> This feature only works with the model from Byzer-LLM.
|
|
@@ -21,8 +21,16 @@ def parse_args() -> AutoCoderArgs:
|
|
|
21
21
|
parser.add_argument("--file", default=None, required=False, help="Path to the YAML configuration file")
|
|
22
22
|
parser.add_argument("--anti_quota_limit",type=int, default=1, help="After how much time to wait for the next request. default is 1s")
|
|
23
23
|
parser.add_argument("--skip_build_index", action='store_true', help="Skip building index or not. default is True")
|
|
24
|
+
parser.add_argument("--print_request", action='store_true', help="Print request to model or not. default is False")
|
|
24
25
|
|
|
25
26
|
args = parser.parse_args()
|
|
27
|
+
|
|
28
|
+
print("Command Line Arguments:")
|
|
29
|
+
print("-" * 50)
|
|
30
|
+
for arg, value in vars(args).items():
|
|
31
|
+
print(f"{arg:20}: {value}")
|
|
32
|
+
print("-" * 50)
|
|
33
|
+
|
|
26
34
|
return AutoCoderArgs(**vars(args))
|
|
27
35
|
|
|
28
36
|
|
|
@@ -36,8 +44,8 @@ def main():
|
|
|
36
44
|
setattr(args, key, value)
|
|
37
45
|
|
|
38
46
|
if args.model:
|
|
39
|
-
byzerllm.connect_cluster()
|
|
40
|
-
llm = byzerllm.ByzerLLM(verbose=
|
|
47
|
+
byzerllm.connect_cluster()
|
|
48
|
+
llm = byzerllm.ByzerLLM(verbose=args.print_request)
|
|
41
49
|
llm.setup_template(model=args.model,template="auto")
|
|
42
50
|
llm.setup_default_model_name(args.model)
|
|
43
51
|
llm.setup_max_output_length(args.model,args.model_max_length)
|
|
@@ -67,6 +67,7 @@ class AutoCoderArgs(pydantic.BaseModel):
|
|
|
67
67
|
file: Optional[str] = pydantic.Field(None, description="the configuration file to use")
|
|
68
68
|
anti_quota_limit: Optional[int] = pydantic.Field(1, description="After how much time to wait for the next request. default is 1s")
|
|
69
69
|
skip_build_index: bool = pydantic.Field(True, description="Skip building index or not. default is True")
|
|
70
|
+
print_request: bool = pydantic.Field(False, description="Print request to model or not. default is False")
|
|
70
71
|
|
|
71
72
|
|
|
72
73
|
def is_likely_useful_file(file_path):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.7"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|