Commit graph

19 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
c93febc7a3 🚀 feat(test_agents_template.py): add "fileTypes" field to the "path" agent configuration to specify supported file types 2023-07-26 07:43:16 -03:00
gustavoschaedler
11f7846e0a 🔥 refactor(conftest.py): remove unused fixtures and custom chain classes
The following changes were made:
- Removed the `custom_chain` fixture and the `MyCustomChain` and `CustomChain` classes as they were not being used.
- Removed the `data_processing`, `filter_docs`, `get_request`, and `post_request` fixtures as they were not being used.

🔧 fix(test_agents_template.py): set "dynamic" property to False for all template variables to ensure consistency and improve clarity

🐛 fix(test_chains_template.py): add missing "dynamic" field to template dictionaries to ensure consistency and avoid potential bugs

🔧 fix(test_custom_component.py): fix import statements and remove unused imports to improve code readability and maintainability
 feat(test_custom_component.py): add tests for the initialization of the CodeParser, Component, and CustomComponent classes
🔧 fix(test_custom_component.py): fix test names and add missing test cases for the Component and CustomComponent classes

🔨 refactor: refactor server.ts to use uppercase PORT variable for improved semantics
 feat: add support for process.env.PORT environment variable to run app on configurable port

🔨 refactor: refactor CustomComponent tests for improved readability and maintainability

🔨 refactor: refactor CodeParser tests for improved readability and maintainability

🔨 refactor: refactor Component tests for improved readability and maintainability

🐛 fix: fix CustomComponent class template validation to raise HTTPException when code is None

🔧 fix(tests): fix syntax error in custom_component._class_template_validation
 feat(tests): add test_custom_component_get_code_tree_syntax_error to test CustomComponent.get_code_tree method for raising CodeSyntaxError when given incorrect syntax
 feat(tests): add test_custom_component_get_function_entrypoint_args_no_args to test CustomComponent.get_function_entrypoint_args property with a build method with no arguments
 feat(tests): add test_custom_component_get_function_entrypoint_return_type_no_return_type to test CustomComponent.get_function_entrypoint_return_type property with a build method with no return type
 feat(tests): add test_custom_component_get_main_class_name_no_main_class to test CustomComponent.get_main_class_name property when there is no main class
 feat(tests): add test_custom_component_build_not_implemented to test CustomComponent.build method for raising NotImplementedError
 feat(tests): add fixtures for custom_chain, data_processing, filter_docs, and get_request

🔧 fix(tests): remove commented out code and unused imports to improve code readability and maintainability

🐛 fix(test_llms_template.py): set "dynamic" property to False for all template properties to ensure static values are used

🐛 fix(test_prompts_template.py): set "dynamic" property to False for all template properties to ensure consistency and improve readability
2023-07-18 01:59:19 +01:00
Gabriel Luiz Freitas Almeida
68bca25266 🐛 fix(test_agents_template.py): update assertions for template variables in test_zero_shot_agent
The assertions for the template variables in the `test_zero_shot_agent` function have been updated to reflect the changes in the template structure. This ensures that the tests accurately check the expected values of the template variables.
2023-07-07 18:45:01 -03:00
Cristhian Zanforlin Lousa
168a1b9e0f merging branch release into dev 2023-06-30 13:49:49 -03:00
Gabriel Luiz Freitas Almeida
d069ab5d6d 🚨 test(agents_template.py): add openai-multi-functions to the list of agents
🐛 fix(graph.py): change message variable to a dictionary to match the expected input of get_result_and_thought function and update the assertion to check if the result is a dictionary instead of a string
The test for agents_template.py was updated to include the openai-multi-functions agent in the list of agents. This was done to ensure that the test coverage for the agent is complete.

The test for graph.py was updated to change the message variable to a dictionary to match the expected input of the get_result_and_thought function. The assertion was also updated to check if the result is a dictionary instead of a string. This was done to ensure that the test coverage for the function is complete.
2023-06-22 22:31:13 -03:00
Gabriel Luiz Freitas Almeida
0dd16ee794 Merge remote-tracking branch 'origin/dev' into multipart_endpoint 2023-06-21 10:07:14 -03:00
gustavoschaedler
ceb6fda4c6 Tests fix 2023-06-16 19:47:35 +01:00
gustavoschaedler
92a285bb2e Adjusted the name of the agent AgentInitializer to initialize_agent temporarily to fix a bug in the frontendnode 2023-06-16 15:38:20 +01:00
Gabriel Luiz Freitas Almeida
81d231c632 🐛 fix(vertex/base.py): fix vertex_type assignment to handle uppercase template types
🐛 fix(interface/loading.py): fix custom_node instantiation to handle classes without initialize method
 feat(template/frontend_node/prompts.py): change type_name to match class name
 feat(template/frontend_node/tools.py): change type_name to match class name
🔥 chore(test_agents_template.py): remove test_agents_settings and update initialize_agent test
The vertex_type assignment in the Vertex class was not handling uppercase template types correctly. This has been fixed to handle both uppercase and lowercase types. The custom_node instantiation in the instantiate_class function was not handling classes without an initialize method correctly. This has been fixed to instantiate the class directly if the initialize method is not present. The type_name in the ZeroShotPromptNode and PythonFunctionToolNode classes have been changed to match the class name. The test_agents_settings test has been removed as it is no longer necessary and the initialize_agent test has been updated to match the new AgentInitializer class name.
2023-06-07 21:36:40 -03:00
Gabriel Luiz Freitas Almeida
6b5539232f 🚀 chore(server, tests): update API endpoint URLs to include version number
The API endpoint URLs have been updated to include the version number to improve the API's versioning and maintainability. The changes were made to the server.ts file and the tests that use the API endpoints.

🐛 fix(tests): update API endpoint paths in test files
The API endpoint paths in the test files were outdated and have been updated to reflect the current API version. This ensures that the tests are running against the correct endpoints and that the tests are up-to-date with the current API version.
2023-06-06 10:06:40 -03:00
Gabriel Almeida
c6e6a5685a 🔥 refactor(base.py): remove unused import statement
🔥 refactor(interface/base.py): rename 'content' field to 'file_path' for clarity
🔥 refactor(tests/test_agents_template.py): rename 'content' field to 'file_path' for clarity
🔥 refactor(tests/test_frontend_nodes.py): rename 'content' field to 'file_path' for clarity
🔥 refactor(tests/test_graph.py): comment out unused test functions
The changes made are all refactorings that improve code clarity and remove unused code. The import statement in base.py was removed as it was unused. The 'content' field in interface/base.py, tests/test_agents_template.py, tests/test_frontend_nodes.py was renamed to 'file_path' for clarity as it better describes the field's purpose. Two test functions in tests/test_graph.py were commented out as they were unused.
2023-05-30 23:48:49 -03:00
Gabriel Almeida
5dfaa9a81a 🎨 style(tests): add display_name field to LLM in test_agents_template.py and test_chains_template.py
The display_name field was added to the LLM object in the test_agents_template.py and test_chains_template.py files. This field is used to display the name of the LLM in the UI.
2023-05-23 11:51:31 -03:00
Gabriel Almeida
3b733ada01 refactor(tests): remove unused imports and variables, fix typos and update node types 2023-05-07 20:15:29 +00:00
Gabriel Almeida
1b10041730 refactor(base.py): simplify type of Union fields to the first type in the Union
fix(test_agents_template.py): set value of list field to an empty list
fix(test_llms_template.py): change type of 'request_timeout' field to float
2023-05-02 23:23:36 +00:00
Gabriel Almeida
13e58b55b3 refactor(tests): change 'advanced' field to False in all tests templates 2023-05-02 11:48:00 -03:00
Gabriel Almeida
2b6f70fdb4 fix tests to comply with updates 2023-04-29 19:48:59 -03:00
Gabriel Almeida
ffb2aad45d fixes to tests 2023-04-29 07:38:06 -03:00
Gabriel Almeida
f3d385b8e5 feat(tests): add "advanced" field to all template objects in test files
feat(tests): add 'advanced' field to template properties in test files
2023-04-28 19:18:17 -03:00
Gabriel Almeida
59baa407d2 feat: added agents tests 2023-04-06 15:11:12 -03:00