Closed aarushik93 closed 4 months ago
PR Description updated to latest commit (https://github.com/Significant-Gravitas/codex/commit/8a9dd90d23cb7ef2335dff9994fe64ce8b963853)
/review
โฑ๏ธ Estimated effort to review [1-5] | 2, because the changes are straightforward and consistent across multiple files, involving only the update of a model name from 'gpt-4-turbo' to 'gpt-4o'. The PR is well-documented and the impact is clear, making it easier to review. |
๐งช Relevant tests | No |
โก Possible issues | Compatibility Issue: Ensure that 'gpt-4o' is compatible and performs as expected in all the contexts where 'gpt-4-turbo' was used. Testing should verify that the new model integrates well with the existing system functionalities. |
๐ Security concerns | No |
No code suggestions found for PR.
/review auto_approve
Auto-approve error: PR review effort (2) is higher than the maximal review effort (0) allowed
**Action:** test |
**Failed stage:** [Test with pytest](https://github.com/Significant-Gravitas/codex/actions/runs/9126242407/job/25094101421) [โ] |
**Failed test name:** gen_test.py |
**Failure summary:**
The action failed primarily due to multiple instances of LLMFailure exceptions being raised during the execution of various tests in gen_test.py . These failures were caused by the inability to locate specific files, as indicated by the error message "No such file or directory: '/home/runner/work/***/***/***/prompts/gpt-4o'". Additionally, there was an AlreadyConnectedError from the Prisma query engine, indicating an attempt to connect to an already connected query engine. Database connection issues were also evident, with repeated "database does not exist" errors, suggesting configuration or setup problems in the database environment. |
Relevant error logs:```yaml 1: ##[group]Operating System 2: Ubuntu ... 769: Applying migration `20240321151108_updates` 770: Applying migration `20240325164008_updates` 771: Applying migration `20240329115058_remove_resu` 772: Applying migration `20240402075217_event_log` 773: Applying migration `20240410100857_save_github_repo` 774: Applying migration `20240410175822_access_level_protected_public` 775: Applying migration `20240418082025_add_user_db_details_to_deployment` 776: Applying migration `20240418131804_new_requirements_system` 777: Applying migration `20240425074949_add_function_failed_state` ... 792: โโ 20240410100857_save_github_repo/ 793: โโ migration.sql 794: โโ 20240410175822_access_level_protected_public/ 795: โโ migration.sql 796: โโ 20240418082025_add_user_db_details_to_deployment/ 797: โโ migration.sql 798: โโ 20240418131804_new_requirements_system/ 799: โโ migration.sql 800: โโ 20240425074949_add_function_failed_state/ ... 859: ***/tests/endpoint_fixing_test.py ........ [ 49%] 860: ***/tests/exec_external_tool_test.py ...... [ 58%] 861: ***/tests/prisma_parse_test.py ...... [ 68%] 862: ***/tests/type_parsing_test.py .. [ 71%] 863: ***/tests/api_test.py ..s.s [ 79%] 864: ***/tests/frontend_gen_test.py ss [ 82%] 865: ***/tests/gen_test.py FFFFFFFFFF [ 98%] 866: ***/tests/model_test.py F [100%] 867: =================================== FAILURES =================================== ... 873: > func = await generate_function() 874: ***/tests/gen_test.py:183: 875: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 876: ***/tests/gen_test.py:176: in generate_function 877: return await with_db_connection(execute) 878: ***/tests/gen_test.py:154: in with_db_connection 879: result = await func() 880: ***/tests/gen_test.py:173: in execute 881: func = await agent.develop_application(ids=ids, spec=spec, eat_errors=False) 882: ../../../.cache/pypoetry/virtualenvs/***-ORswSzyp-py3.11/lib/python3.11/site-packages/langsmith/run_helpers.py:451: in async_wrapper 883: raise e 884: ../../../.cache/pypoetry/virtualenvs/***-ORswSzyp-py3.11/lib/python3.11/site-packages/langsmith/run_helpers.py:440: in async_wrapper 885: function_result = await asyncio.create_task( # type: ignore[call-arg] 886: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 887: ids = Identifiers(user_id='123e4567-e89b-12d3-a456-426614174000', cloud_services_id='', app_id='cc8fe485-d2df-40b7-becc-bbf6...4d22-b439-5df74a1e15db', function_id='473ed35d-dbb1-4cbb-8714-fddbf24caa94', completed_app_id=None, deployment_id=None) 888: spec = Specification(id='b3889263-fd40-4f4a-ab63-c2a975a0d083', createdAt=datetime.datetime(2024, 5, 17, 9, 47, 2, 664000, tz...Specification=None, specificationId='b3889263-fd40-4f4a-ab63-c2a975a0d083', InterviewStep=None, interviewStepId=None)]) 889: lang = 'python', eat_errors = False 890: @traceable 891: async def develop_application( 892: ids: Identifiers, 893: spec: Specification, 894: lang: str = "python", 895: eat_errors: bool = True, ... 931: lang, 932: ) 933: tasks.append(task) 934: # Run the tasks concurrently 935: results = await asyncio.gather(*tasks, return_exceptions=True) 936: if any(isinstance(r, Exception) for r in results): 937: exceptions = [r for r in results if isinstance(r, Exception)] 938: # if the only exceptions are LLMFailures, we can continue 939: if eat_errors and all(isinstance(r, LLMFailure) for r in exceptions): 940: logger.warning( 941: f"App Id: {ids.app_id} Eating Errors developing API routes: {exceptions}" 942: ) 943: pass 944: else: 945: error_message = "".join(f"\n* {e}" for e in exceptions) 946: > raise LLMFailure( 947: f"App Id: {ids.app_id} Error developing API routes: \n{error_message}" 948: ) 949: E ***.common.ai_block.LLMFailure: App Id: cc8fe485-d2df-40b7-becc-bbf63c8b2ee4 Error developing API routes: ... 962: > result = await generate_function() 963: ***/tests/gen_test.py:191: 964: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 965: ***/tests/gen_test.py:176: in generate_function 966: return await with_db_connection(execute) 967: ***/tests/gen_test.py:154: in with_db_connection 968: result = await func() 969: ***/tests/gen_test.py:173: in execute 970: func = await agent.develop_application(ids=ids, spec=spec, eat_errors=False) 971: ../../../.cache/pypoetry/virtualenvs/***-ORswSzyp-py3.11/lib/python3.11/site-packages/langsmith/run_helpers.py:451: in async_wrapper 972: raise e 973: ../../../.cache/pypoetry/virtualenvs/***-ORswSzyp-py3.11/lib/python3.11/site-packages/langsmith/run_helpers.py:440: in async_wrapper 974: function_result = await asyncio.create_task( # type: ignore[call-arg] 975: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 976: ids = Identifiers(user_id='123e4567-e89b-12d3-a456-426614174000', cloud_services_id='', app_id='bb7730b0-0cbe-4069-81e6-1c84...4906-bfa4-da43f8672540', function_id='aab3cfb8-bf54-4708-8efc-ed032a944cab', completed_app_id=None, deployment_id=None) 977: spec = Specification(id='3a877afb-2e02-46f5-92b3-36dec76c8e41', createdAt=datetime.datetime(2024, 5, 17, 9, 47, 2, 993000, tz...Specification=None, specificationId='3a877afb-2e02-46f5-92b3-36dec76c8e41', InterviewStep=None, interviewStepId=None)]) 978: lang = 'python', eat_errors = False 979: @traceable 980: async def develop_application( 981: ids: Identifiers, 982: spec: Specification, 983: lang: str = "python", 984: eat_errors: bool = True, ... 1020: lang, 1021: ) 1022: tasks.append(task) 1023: # Run the tasks concurrently 1024: results = await asyncio.gather(*tasks, return_exceptions=True) 1025: if any(isinstance(r, Exception) for r in results): 1026: exceptions = [r for r in results if isinstance(r, Exception)] 1027: # if the only exceptions are LLMFailures, we can continue 1028: if eat_errors and all(isinstance(r, LLMFailure) for r in exceptions): 1029: logger.warning( 1030: f"App Id: {ids.app_id} Eating Errors developing API routes: {exceptions}" 1031: ) 1032: pass 1033: else: 1034: error_message = "".join(f"\n* {e}" for e in exceptions) 1035: > raise LLMFailure( 1036: f"App Id: {ids.app_id} Error developing API routes: \n{error_message}" 1037: ) 1038: E ***.common.ai_block.LLMFailure: App Id: bb7730b0-0cbe-4069-81e6-1c84a877857d Error developing API routes: ... 1046: _________________________ test_unimplemented_function __________________________ 1047: @pytest.mark.asyncio 1048: @pytest.mark.integration_test 1049: async def test_unimplemented_function(): 1050: ai_block.MOCK_RESPONSE = WITH_UNIMPLEMENTED_FUNCTION_RESPONSE 1051: with pytest.raises(LLMFailure) as e: 1052: await generate_function() 1053: > assert "not implemented" in str(e.value) 1054: E assert 'not implemented' in "App Id: 7d609779-bf34-4aa2-b61c-e0c543968615 Error developing API routes: \n\n* [Errno 2] No such file or directory: '/home/runner/work/***/***/***/prompts/gpt-4o'" 1055: E + where "App Id: 7d609779-bf34-4aa2-b61c-e0c543968615 Error developing API routes: \n\n* [Errno 2] No such file or directory: '/home/runner/work/***/***/***/prompts/gpt-4o'" = str(LLMFailure("App Id: 7d609779-bf34-4aa2-b61c-e0c543968615 Error developing API routes: \n\n* [Errno 2] No such file or directory: '/home/runner/work/***/***/***/prompts/gpt-4o'")) 1056: E + where LLMFailure("App Id: 7d609779-bf34-4aa2-b61c-e0c543968615 Error developing API routes: \n\n* [Errno 2] No such file or directory: '/home/runner/work/***/***/***/prompts/gpt-4o'") = |
User description
This PR updates all steps to use the latest gpt4o model
PR Type
enhancement
Description
gpt-4-turbo
togpt-4o
across various blocks and functions in the codebase.Changes walkthrough ๐
10 files
ai_model.py
Update AI model in common utility function
codex/common/ai_model.py
gpt-4-turbo
togpt-4o
in thenum_tokens_from_messages
function.ai_extractor.py
Update AI model in documentation extractor
codex/develop/ai_extractor.py
DocumentationExtractor
fromgpt-4-turbo
to
gpt-4o
.develop.py
Update AI model in development block
codex/develop/develop.py
DevelopAIBlock
fromgpt-4-turbo
togpt-4o
.ai_interview.py
Update AI model in interview block
codex/interview/ai_interview.py
InterviewBlock
fromgpt-4-turbo
togpt-4o
.ai_interview_update.py
Update AI model in interview update block
codex/interview/ai_interview_update.py
InterviewUpdateBlock
fromgpt-4-turbo
togpt-4o
.ai_module.py
Update AI model in module generation block
codex/interview/ai_module.py
ModuleGenerationBlock
fromgpt-4-turbo
togpt-4o
.ai_database.py
Update AI model in database generation block
codex/requirements/blocks/ai_database.py
DatabaseGenerationBlock
fromgpt-4-turbo
togpt-4o
.ai_endpoint.py
Update AI model in endpoint schema refinement block
codex/requirements/blocks/ai_endpoint.py
EndpointSchemaRefinementBlock
fromgpt-4-turbo
to
gpt-4o
.ai_module_routes.py
Update AI model in module generation routes block
codex/requirements/blocks/ai_module_routes.py
ModuleGenerationBlock
fromgpt-4-turbo
togpt-4o
.ai_page_decompose.py
Update AI model in page decomposition block
codex/requirements/blocks/ai_page_decompose.py
PageDecompositionBlock
fromgpt-4-turbo
togpt-4o
.