Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
allwefantasy committed Oct 21, 2024
1 parent 46e8f9f commit ee56b1c
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ide_plugins/vscode/auto-coder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tokenizers

# camelot-py
# llama_index
byzerllm[saas]>=0.1.135
byzerllm[saas]>=0.1.136
patch
diff_match_patch
GitPython
Expand Down
4 changes: 2 additions & 2 deletions src/auto_coder.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: auto-coder
Version: 0.1.182
Version: 0.1.183
Summary: AutoCoder: AutoCoder
Author: allwefantasy
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Expand All @@ -26,7 +26,7 @@ Requires-Dist: tabulate
Requires-Dist: jupyter_client
Requires-Dist: prompt-toolkit
Requires-Dist: tokenizers
Requires-Dist: byzerllm[saas]>=0.1.135
Requires-Dist: byzerllm[saas]>=0.1.136
Requires-Dist: patch
Requires-Dist: diff_match_patch
Requires-Dist: GitPython
Expand Down
2 changes: 1 addition & 1 deletion src/auto_coder.egg-info/requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tabulate
jupyter_client
prompt-toolkit
tokenizers
byzerllm[saas]>=0.1.135
byzerllm[saas]>=0.1.136
patch
diff_match_patch
GitPython
Expand Down
11 changes: 11 additions & 0 deletions src/autocoder/auto_coder_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@ def main(input_args: Optional[List[str]] = None):
help="Disable reordering of document segments after retrieval",
)

serve_parser.add_argument(
"--disable_inference_enhance",
action="store_true",
help="Disable enhanced inference mode",
)
serve_parser.add_argument(
"--inference_deep_thought",
action="store_true",
help="Enable deep thought in inference mode",
)

# Tools command
tools_parser = subparsers.add_parser("tools", help="Various tools")
tools_subparsers = tools_parser.add_subparsers(dest="tool", help="Available tools")
Expand Down
15 changes: 8 additions & 7 deletions src/autocoder/chat_auto_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,11 @@ def get_completions(self, document, complete_event):

parser.coding()
current_word = parser.current_word()

for command in parser.get_sub_commands():
if command.startswith(current_word):
yield Completion(command, start_position=-len(current_word))

if len(new_text.strip()) == 0 or new_text.strip()=="/":
for command in parser.get_sub_commands():
if command.startswith(current_word):
yield Completion(command, start_position=-len(current_word))

all_tags = parser.tags

Expand Down Expand Up @@ -796,6 +797,8 @@ def get_completions(self, document, complete_event):
start_position=-len(name),
display=f"{symbol.symbol_name} ({display_name}/{symbol.symbol_type})",
)

tags = [tag for tag in parser.tags]

if current_word.startswith("<"):
name = current_word[1:]
Expand All @@ -807,9 +810,7 @@ def get_completions(self, document, complete_event):
)
elif tag.startswith(name):
yield Completion(tag, start_position=-len(current_word))

tags = [tag for tag in parser.tags]


if tags and tags[-1].start_tag == "<img>" and tags[-1].end_tag == "":
raw_file_name = tags[0].content
file_name = raw_file_name.strip()
Expand Down
3 changes: 3 additions & 0 deletions src/autocoder/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,8 @@ class AutoCoderArgs(pydantic.BaseModel):
segment_ratio: Optional[float] = 0.2
buff_ratio: Optional[float] = 0.1

disable_inference_enhance: Optional[bool] = False
inference_deep_thought: Optional[bool] = False

class Config:
protected_namespaces = ()
5 changes: 4 additions & 1 deletion src/autocoder/rag/long_context_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,10 @@ def response_generator():

if LLMComputeEngine is not None:
llm_compute_engine = LLMComputeEngine(
llm=self.llm, inference_enhance=True, debug=False
llm=self.llm,
inference_enhance=not self.args.disable_inference_enhance,
inference_deep_thought=self.args.inference_deep_thought,
debug=False,
)
new_conversations = llm_compute_engine.process_conversation(
conversations, query, [doc.source_code for doc in relevant_docs]
Expand Down
2 changes: 1 addition & 1 deletion src/autocoder/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.182"
__version__ = "0.1.183"

0 comments on commit ee56b1c

Please sign in to comment.