Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions backend/agent/coding_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def query(self, input: str, command: Optional[str] = None) -> List[str]:
"stream": True,
}

print("Message Count: ", len(keyword_args["messages"]))
# Removed unnecessary print statement

# Override normal function calling when function_name is providednd}")
if command and command.lower() == "changes":
Expand All @@ -146,7 +146,7 @@ def query(self, input: str, command: Optional[str] = None) -> List[str]:
self.memory_manager.prompt_handler.identity = DEFAULT_SYSTEM_PROMPT
self.memory_manager.prompt_handler.set_system()

assert keyword_args["messages"][0]["role"] == "system"
# Removed unnecessary print statement
keyword_args["messages"][0]["content"] = temp_system

# Call the model
Expand Down Expand Up @@ -174,7 +174,7 @@ def query(self, input: str, command: Optional[str] = None) -> List[str]:
except json.JSONDecodeError as e:
pass
# Now reset for the new call
idx = call.index
# Removed redundant break statement
json_accumulator = call.function.arguments
function_name = call.function.name # Set the new function name
print(f"Function Name: {function_name}")
Expand Down Expand Up @@ -396,7 +396,7 @@ def generate_anthropic_prompt(self, include_messages: Optional[bool]=True, sys_o
else:
tree = ""

if include_messages:
if sys_only:
sys_prompt = (
self.memory_manager.identity
+ conversation_history
Expand Down