diff --git a/pilot/const/function_calls.py b/pilot/const/function_calls.py index 4bbf730..c271943 100644 --- a/pilot/const/function_calls.py +++ b/pilot/const/function_calls.py @@ -28,7 +28,7 @@ def return_array_from_prompt(name_plural, name_singular, return_var_name): "properties": { f"{return_var_name}": { "type": "array", - "description": f"List of {name_plural} that are created in a list.", + "description": f"List of {name_plural}.", "items": { "type": "string", "description": f"{name_singular}" diff --git a/pilot/helpers/agents/Developer.py b/pilot/helpers/agents/Developer.py index 53b3bcd..69e5364 100644 --- a/pilot/helpers/agents/Developer.py +++ b/pilot/helpers/agents/Developer.py @@ -339,32 +339,20 @@ class Developer(Agent): }, 'timeout': { 'type': 'number', - 'description': 'Timeout in seconds for the approcimate time this command takes to finish.', + 'description': 'Timeout in seconds for the approximate time this command takes to finish.', } }, 'required': ['command', 'timeout'], }, }], 'functions': { - 'execute_command': execute_command_and_check_cli_response - }, - 'send_convo': True + 'execute_command': lambda command, timeout: (command, timeout) + } }) - if llm_response != 'DONE': - installation_commands = self.convo_os_specific_tech.send_message('development/env_setup/unsuccessful_installation.prompt', - { 'technology': technology }, EXECUTE_COMMANDS) - if installation_commands is not None: - for cmd in installation_commands: - run_command_until_success(cmd['command'], cmd['timeout'], self.convo_os_specific_tech) + cli_response, llm_response = execute_command_and_check_cli_response(command, timeout, self.convo_os_specific_tech) - logger.info('The entire tech stack needed is installed and ready to be used.') - - save_progress(self.project.args['app_id'], self.project.current_step, { - "os_specific_technologies": os_specific_technologies, "newly_installed_technologies": [], "app_data": generate_app_data(self.project.args) - }) - - # ENVIRONMENT SETUP END + return llm_response def test_code_changes(self, code_monkey, convo): (test_type, command, automated_test_description, manual_test_description) = convo.send_message( diff --git a/pilot/prompts/architecture/technologies.prompt b/pilot/prompts/architecture/technologies.prompt index 2fd17df..c041a6a 100644 --- a/pilot/prompts/architecture/technologies.prompt +++ b/pilot/prompts/architecture/technologies.prompt @@ -27,7 +27,7 @@ Here are user tasks that specify what users need to do to interact with "{{ name {% endfor %} ```#} -Now, based on the app's description, user stories and user tasks, think step by step and write up all technologies that will be used by your development team to create the app "{{ name }}". Do not write any explanations behind your choices but only a list of technologies that will be used. +Now, based on the app's description, user stories and user tasks, think step by step and list the names of the technologies that will be used by your development team to create the app "{{ name }}". Do not write any explanations behind your choices but only a list of technologies that will be used. You do not need to list any technologies related to automated tests like Jest, Cypress, Mocha, Selenium, etc. diff --git a/pilot/utils/test_llm_connection.py b/pilot/utils/test_llm_connection.py index e896b2c..2505bdd 100644 --- a/pilot/utils/test_llm_connection.py +++ b/pilot/utils/test_llm_connection.py @@ -63,10 +63,10 @@ class TestLlmConnection: ("OPENROUTER", "openai/gpt-3.5-turbo"), # role: user ("OPENROUTER", "meta-llama/codellama-34b-instruct"), # rule: user, is_llama missed "choices" ("OPENROUTER", "google/palm-2-chat-bison"), # role: user/system - - # See https://github.com/1rgs/jsonformer-claude/blob/main/jsonformer_claude/main.py - ("OPENROUTER", "anthropic/claude-2"), # role: user, prompt 2 - sometimes JSON, sometimes Python to generate JSON - # ("OPENROUTER", "google/palm-2-codechat-bison"), # not working + ("OPENROUTER", "google/palm-2-codechat-bison"), + # TODO: See https://github.com/1rgs/jsonformer-claude/blob/main/jsonformer_claude/main.py + # https://github.com/guidance-ai/guidance - token healing + ("OPENROUTER", "anthropic/claude-2"), # role: user, is_llama ]) def test_chat_completion_Architect(self, endpoint, model, monkeypatch): # Given