blazickjp / GPT-CodeApp

This project is everything Chat-GPT should be for developers! An advanced AI-driven coding companion tailored for developers. Seamlessly bridging the gap between traditional coding and AI capabilities, we offer real-time chat interactions, on-demand agent functions, and intuitive code management. Feedback welcome!
MIT License
33 stars 12 forks source link

Refactoring System Prompt Management and Test Updates #18

Closed blazickjp closed 11 months ago

blazickjp commented 11 months ago

PR Type:

Refactoring, Tests


PR Description:

This pull request includes a significant refactor of the system prompt management, as well as updates to various tests. The main changes include:


PR Main Files Walkthrough:

files: `backend/agent/agent.py`: The agent.py file has been refactored to process function calls and execute functions. The 'query' method has been updated to handle function calls and execute them when necessary. The 'process_function_call', 'should_stop_and_has_function', and 'execute_function' methods have been added to support this functionality. `backend/tests/test_agent_functions.py`: The test_agent_functions.py file has been updated to reflect the changes in the system prompt management. The tests have been commented out and will likely be updated or replaced in future commits. `backend/memory/memory_manager.py`: The memory_manager.py file has been updated to manage system prompts. The 'set_system' method has been updated to set the system message. The 'get_file_contents' and 'set_files_in_prompt' methods have been added to handle file contents in the system prompt. `backend/memory/system_prompt_handler.py`: The system_prompt_handler.py file has been significantly refactored. It now includes methods for managing system prompts, including setting the system message, getting file contents, setting files in the prompt, and adding line numbers to content. The 'create_tables' method has been added to create tables for system prompts if they don't exist. `backend/agent/agent_functions/changes.py`: The changes.py file has been updated to reflect the changes in the system prompt management. The 'execute' method now takes a directory argument.
blazickjp commented 11 months ago

/describe