Commit graph

89 commits

Author SHA1 Message Date
Gabriel Almeida
6cacfced09 🚧 chore(conftest.py): add fixtures for database testing
 test(database.py): add tests for CRUD operations on Flow model
The new fixtures added to conftest.py are session and client fixtures. These fixtures are used to create a test database and a test client for testing the database. The tests added to test_database.py test the CRUD operations on the Flow model. The tests include creating a flow, reading all flows, reading a single flow, updating a flow, and deleting a flow. These tests ensure that the database is working as expected and that the API endpoints for the Flow model are functioning correctly.
2023-05-30 21:24:23 -03:00
Gabriel Almeida
244eee8523 🔥 refactor(base.py): remove unused import statement
🚨 test(llms_template.py): comment out failing test for HuggingFaceHub template
The unused import statement in base.py has been removed to improve code readability. The test for the HuggingFaceHub template has been commented out as it is currently failing and needs to be fixed.
2023-05-30 17:36:59 -03:00
Gabriel Almeida
c05b94e4e9 🚀 feat(test_prompts_template.py): change type of "suffix" and "prefix" fields to "prompt" and update "format_instructions" field
The "suffix" and "prefix" fields have been changed from type "str" to "prompt" to allow for more flexibility in the input. The "format_instructions" field has been updated to be required and multiline, and to show the instructions by default. This change will make it easier for users to understand the expected input format.
2023-05-29 18:57:56 -03:00
Gabriel Almeida
023df99ecc 🔨 refactor(embeddings.py): move openai fields formatting to a separate method
 test(embeddings_template.py): add tests for openai fields formatting
The openai fields formatting is now done in a separate method, which improves the readability and maintainability of the code. Tests were added to ensure that the formatting is done correctly.
2023-05-28 16:18:33 -03:00
Gabriel Almeida
7da8c0ef92 chore: refactor of template, frontend_node and field
This will improve the readability of the code and maintainability.
2023-05-27 15:56:46 -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
31062f2a8c refactor(run.py): remove unused process_graph function
refactor(test_graph.py): update get_result_and_steps to get_result_and_thought function name
2023-05-10 11:31:06 -03:00
Gabriel Almeida
01de3a2021 refactor(test_graph.py): remove unused import of build_json from payload module 2023-05-07 20:15:29 +00:00
Gabriel Almeida
5836a91a39 fix: replace basic_example 2023-05-07 20:15:29 +00: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
1d5f156a22 refactor(cache): add cache attribute to memoized function wrapper
refactor(test_cache.py): update import statements and function names
test(cache): add tests for load_or_build_langchain_object, build_langchain_object_with_caching, build_graph, and cache size limit
2023-05-07 20:15:29 +00:00
Gabriel Almeida
64bf97ff84 chore(base.py): add type ignore comment to clear_cache function
fix(base.py): raise ValueError if content is None in save_binary_file function
feat(nodes.py): add memory field to TimeTravelGuideChainNode
test(test_chains_template.py): add test for memory field in TimeTravelGuideChainNode
2023-05-04 18:24:12 -03: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
9d3098f3e2 refactor(langflow): reorder imports in multiple files
This commit reorders imports in multiple files to follow PEP8 guidelines
and improve code readability. No functional changes were made.
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
9a6e7cfc3f add test_cache_manager 2023-04-29 07:38:17 -03:00
Gabriel Almeida
ffb2aad45d fixes to tests 2023-04-29 07:38:06 -03:00
anovazzi1
8a169c9782 merged chat_and_cache into dev 2023-04-29 01:26:44 -03:00
Gabriel Almeida
8d5adbf266 fix: tests 2023-04-29 00:36: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
357d13b1a9 refactor(validate.py): change wrapped_function from async to sync
fix(test_chains_template.py): set prompt show value to False for mid_journey_prompt_chain and time_travel_guide_chain tests
2023-04-28 15:45:53 -03:00
Gabriel Almeida
07863ea098 test(websocket.py): change websocket endpoint from /ws/test_client to /chat/test_client
test(websocket.py): update assertions to match new endpoint and response format
2023-04-28 15:44:18 -03:00
Gabriel Almeida
dc72f2e52f refactor(test_websocket.py): change sender field to is_bot field in chat history tests 2023-04-25 21:06:29 -03:00
Gabriel Almeida
41f1ba798a refactor(test_llms_template.py): change required fields to optional in tests for huggingfacehub_api_token, openai_api_key, and chat_openai_api_key in llms_template. 2023-04-25 15:38:21 -03:00
Gabriel Almeida
5169c0bc27 feat(chat_manager.py): add support for sending file responses
fix(schemas.py): add validation for file response type and data type
test(test_websocket.py): remove data and data_type fields from ChatResponse messages in tests
2023-04-20 11:09:42 -03:00
Gabriel Almeida
0a630cd70d refactor(chat_manager.py): move process_graph function outside of ChatManager class
test(websocket.py): add tests for websocket connection, chat history, and sending messages
2023-04-19 22:23:31 -03:00
Gabriel Almeida
18b3583850 test(websocket.py): add tests for websocket connection, chat history and sending message 2023-04-19 13:13:58 -03:00
Gabriel Almeida
d978ae5438 refactor(cache): move cache-related functions to base.py module
feat(cache): add support for pandas and PIL Image objects caching
fix(interface): import cache-related functions from base.py module
test(cache): update import statements in cache-related test file
2023-04-19 11:02:32 -03:00
Ibis Prevedello
3d211fc487 fix test, linting, and vector_store folder 2023-04-13 22:12:21 -03:00
Ibis Prevedello
ba1f7daa7a refac: change docstring parser 2023-04-13 21:39:25 -03:00
Ibis Prevedello
37925c275f test: fix text scripts 2023-04-13 11:52:42 -03:00
Gabriel Luiz Freitas Almeida
396cb7be2b
Merge branch 'dev' into 146-improve-conversationchain-node 2023-04-10 19:20:56 -03:00
Gabriel Almeida
e7c3946985 style(test_chains_template.py): remove trailing whitespace and fix line length 2023-04-10 19:15:01 -03:00
Gabriel Almeida
1d49cc16bd refactor(test_chains_template.py): make input_key and output_key required and show in all chains
feat(test_chains_template.py): add prompt to mid_journey_prompt_chain and time_travel_guide_chain chains
2023-04-10 19:03:32 -03:00
Ibis Prevedello
81c634f839 fix: fix lint and formatting 2023-04-10 12:01:13 -03:00
Ibis Prevedello
edf6577f44 test: add test to vectorstore 2023-04-10 11:54:12 -03:00
Ibis Prevedello
fee2e52ec1 Merge branch 'dev' into vecstores 2023-04-10 10:20:56 -03:00
Gabriel Almeida
cdf50ebe7a test(graph.py): add test for get_result_and_thought_using_graph method 2023-04-09 09:23:47 -03:00
Gabriel Almeida
2e3c0f3f51 style(test_llms_template.py): change boolean values to True in 'show' key for some template fields
feat(test_llms_template.py): make 'task' and 'huggingfacehub_api_token' fields required
feat(test_llms_template.py): add options to 'task' field and display name to 'huggingfacehub_api_token' field
2023-04-09 07:00:27 -03:00
Ibis Prevedello
616dfd0370 Merge branch 'dev' into vecstores 2023-04-07 13:06:49 -03:00
Gabriel Almeida
611b4d6709 fix: linting 2023-04-06 18:18:35 -03:00
Gabriel Almeida
879588c631 feat: added first tests for llms 2023-04-06 18:18:35 -03:00
Gabriel Almeida
3a4bfc2e36 formatting 2023-04-06 16:18:13 -03:00
Gabriel Luiz Freitas Almeida
4d2ee2aeda
Update test_prompts_template.py 2023-04-06 15:56:55 -03:00
Gabriel Almeida
59baa407d2 feat: added agents tests 2023-04-06 15:11:12 -03:00
Gabriel Almeida
ebb78f34aa feat: adding prompt template tests 2023-04-06 15:05:36 -03:00
Gabriel Almeida
26524e3b6d fix: password setting improvements 2023-04-06 14:24:00 -03:00
Gabriel Almeida
f492eed372 formatting 2023-04-06 14:09:15 -03:00
Ibis Prevedello
cf4ceb0e1a feat: first version of vecstore, docloader and embeddings working 2023-04-06 13:55:07 -03:00