diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-06-25 15:14:56 -0700 |
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-06-25 15:14:56 -0700 |
| commit | 3fa2220379f07b162b9c72d1e0d6c13e0d59b8d9 (patch) | |
| tree | d6fe96dcacfd95976659bcb354bf57170a07cc1c /continuedev/src/continuedev/steps | |
| parent | ff688d096f62e538f181b9b5ae84b1b0f930c3bf (diff) | |
| download | sncontinue-3fa2220379f07b162b9c72d1e0d6c13e0d59b8d9.tar.gz sncontinue-3fa2220379f07b162b9c72d1e0d6c13e0d59b8d9.tar.bz2 sncontinue-3fa2220379f07b162b9c72d1e0d6c13e0d59b8d9.zip | |
shipped function calling
Diffstat (limited to 'continuedev/src/continuedev/steps')
| -rw-r--r-- | continuedev/src/continuedev/steps/chat.py | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/continuedev/src/continuedev/steps/chat.py b/continuedev/src/continuedev/steps/chat.py index a940c3ba..2a8ae2da 100644 --- a/continuedev/src/continuedev/steps/chat.py +++ b/continuedev/src/continuedev/steps/chat.py @@ -182,21 +182,24 @@ class ChatWithFunctions(Step): else: if func_name == "python" and "python" not in step_name_step_class_map: # GPT must be fine-tuned to believe this exists, but it doesn't always - self.chat_context.append(ChatMessage( - role="assistant", - content=None, - function_call=FunctionCall( - name=func_name, - arguments=func_args - ), - summary=f"Ran function {func_name}" - )) - self.chat_context.append(ChatMessage( - role="user", - content="The 'python' function does not exist. Don't call it.", - summary="'python' function does not exist." - )) - continue + func_name = "EditHighlightedCodeStep" + func_args = json.dumps({"user_input": self.user_input}) + # self.chat_context.append(ChatMessage( + # role="assistant", + # content=None, + # function_call=FunctionCall( + # name=func_name, + # arguments=func_args + # ), + # summary=f"Ran function {func_name}" + # )) + # self.chat_context.append(ChatMessage( + # role="user", + # content="The 'python' function does not exist. Don't call it. Try again to call another function.", + # summary="'python' function does not exist." + # )) + # msg_step.hide = True + # continue # Call the function, then continue to chat func_args = "{}" if func_args == "" else func_args fn_call_params = json.loads(func_args) |
