Commit graph

4,906 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
c7fc8444ea 🐛 fix(endpoints.py): handle ImportError when importing langflow.worker.process_graph_cached_task to prevent crash when Celery is not installed
🔥 chore(endpoints.py): remove unused import of langflow.worker.process_graph_cached_task
🔀 chore(endpoints.py): refactor process_flow function to handle different result types from task_service.launch_task
2023-09-17 19:35:59 -03:00
Gabriel Luiz Freitas Almeida
9c6cfc07ab 🐛 fix(process.py): set langchain_object.return_intermediate_steps to False to improve performance and reduce memory usage 2023-09-17 19:35:40 -03:00
Gabriel Luiz Freitas Almeida
d5623cb713 🐛 fix(manager.py): fix typo in comment, change "ached" to "cached" for better readability
 feat(manager.py): add error handling for non-picklable values in RedisCache's set method to prevent errors
2023-09-17 19:35:25 -03:00
Gabriel Luiz Freitas Almeida
8a545d4dcc 🐛 fix(frontend): update format script in package.json to only format files in the root directory 2023-09-17 19:35:10 -03:00
Gabriel Luiz Freitas Almeida
6871cc5ab6 adds vector store tests 2023-09-17 19:34:46 -03:00
Gabriel Luiz Freitas Almeida
946719eb72 ⬆️ chore(pyproject.toml): update pandas dependency to version 2.0.3 for compatibility and bug fixes 2023-09-17 19:28:33 -03:00
Gabriel Luiz Freitas Almeida
254d9e946d 🐛 fix(ci.yml): remove unnecessary -d flag from docker compose up command to prevent services from running in detached mode 2023-09-16 11:21:27 -03:00
Gabriel Luiz Freitas Almeida
ce3127d6f7 📦 chore(ci.yml): rename CI/CD Pipeline workflow to "Async API tests" for better clarity and specificity 2023-09-16 11:17:59 -03:00
Gabriel Luiz Freitas Almeida
7ef80c8e78 🔀 chore(ci.yml): update branch configuration for CI/CD pipeline to include 'dev' branch 2023-09-16 11:16:35 -03:00
Gabriel Luiz Freitas Almeida
c367328727 📦 chore(base.Dockerfile): add tests directory to Docker image to include tests in the build process 2023-09-16 11:15:23 -03:00
Gabriel Luiz Freitas Almeida
43fc6add04 🐛 fix(conftest.py): fix typo in file name BasicChatWithPromptAndHistory.json to improve consistency and readability 2023-09-16 11:15:07 -03:00
Gabriel Luiz Freitas Almeida
05a6f4d067 🔧 fix(process.py): remove unused import and add missing import for BaseModel from pydantic
🔧 fix(manager.py): change return type annotation of launch_task method to handle both Coroutine and Any types
🔧 fix(worker.py): add missing import for Result class from process module and update return statement to return Result object as dictionary
2023-09-16 11:13:53 -03:00
Gabriel Luiz Freitas Almeida
b8d8eccbff 🐛 fix(anyio.py): add error handling when launching a task to prevent crashes and log the error
🐛 fix(celery.py): add type hinting to the launch_task method and return the AsyncResult object for better task tracking
2023-09-16 11:13:08 -03:00
Gabriel Luiz Freitas Almeida
abc4e8a3e0 🔧 chore(ci.yml): remove unnecessary comments and reorganize steps for clarity and readability 2023-09-16 00:11:00 -03:00
Gabriel Luiz Freitas Almeida
cc8cd8bef0 🔧 chore(ci.yml): update Docker commands to use 'docker compose' instead of 'docker-compose' for consistency and future compatibility 2023-09-16 00:09:32 -03:00
Gabriel Luiz Freitas Almeida
986b4696cd 🔧 chore(ci.yml): add CI/CD pipeline configuration file to automate build and test process
🔧 chore(pyproject.toml): add 'async_test' marker for pytest to identify asynchronous tests
2023-09-16 00:05:39 -03:00
Gabriel Luiz Freitas Almeida
e9fd9b097f 🐳 chore(docker-compose.yml): refactor backend service to use YAML anchors and aliases for code reuse
🚀 feat(docker-compose.yml): add tests service to run pytest with coverage and generate reports
2023-09-16 00:05:26 -03:00
Gabriel Luiz Freitas Almeida
f5f89eb8b8 🐛 fix(util.py): rename callback_service to callback_manager for consistency and clarity in codebase 2023-09-16 00:05:19 -03:00
Gabriel Luiz Freitas Almeida
8987c6d969 🐛 fix(test_agents_template.py): fix incorrect variable name in test_zero_shot_agent function
🐛 fix(test_endpoints.py): add missing pytest.mark.async_test decorator to test_async_task_processing function
2023-09-16 00:05:03 -03:00
Gabriel Luiz Freitas Almeida
507d6a756d 🐛 fix(manager.py): handle None key in __contains__ method to prevent Redis client error when checking if key exists in cache 2023-09-15 23:24:26 -03:00
Gabriel Luiz Freitas Almeida
fa1ebea378 🐛 fix(process.py): remove unnecessary session_id parameter in build_sorted_vertices function calls
🐛 fix(endpoints.py): remove unused import and type hinting to improve code readability and maintainability
🐛 fix(endpoints.py): fix incorrect import statement for TaskService
🐛 fix(endpoints.py): fix incorrect return value for get_task_status function
 feat(endpoints.py): add test case for async task processing to validate task completion and result
2023-09-15 18:16:25 -03:00
Gabriel Luiz Freitas Almeida
8d1bff38fe 🔥 chore(ChatOutput.py): remove unused ChatOutput component
The ChatOutput component was removed as it was no longer being used in the project. This commit removes the file and its associated code.
2023-09-15 17:42:14 -03:00
Gabriel Luiz Freitas Almeida
651595932c Change all Services names from Manager to Service 2023-09-15 17:41:39 -03:00
Matheus Jacques
4f6aeefd96 🔧 chore(main.tf): add label to a random worker node to ensure data volume is created
🔧 chore(main.tf): deploy the langflow_stack using docker stack
2023-09-12 11:42:58 +02:00
Matheus Jacques
1ca839899a 🔧 chore(main.tf): use variable for AWS region to improve flexibility and reusability
🔧 chore(main.tf): use variables for instance type, manager count, and worker count to improve configurability and scalability
2023-09-12 11:40:33 +02:00
Matheus Jacques
c2520554b2 🐛 fix(docker-compose.yml): remove unnecessary variable check in node placement constraints to fix deployment issue 2023-09-12 11:40:03 +02:00
Gabriel Luiz Freitas Almeida
e557c0d234 🔧 chore(.env.example): add POSTGRES_PORT variable to specify the port for PostgreSQL connection
🔧 chore(startup-backend.sh): modify startup script to start the backend in development or production mode based on the ENVIRONMENT variable
2023-09-11 14:01:48 -03:00
Gabriel Luiz Freitas Almeida
6e52990322 🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for all services
🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the proxy service

🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the backend service

🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the pgadmin service

🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the queue service

🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the celeryworker service

🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the flower service

🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the frontend service

🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the prometheus service

🔧 chore(docker-compose.yml): add support for loading environment variables from .env file for the grafana service
2023-09-11 12:16:29 -03:00
Gabriel Luiz Freitas Almeida
6546e2f543 🔧 chore(docker-compose.yml): update flower service image to "ogabrielluiz/langflow:latest" for consistency and reliability
🔧 chore(docker-compose.yml): add build configuration to flower service to use base.Dockerfile for building the image
🔧 chore(docker-compose.yml): update command for flower service to use the correct broker URL and set the port to 5555
🔧 chore(docker-compose.yml): remove unnecessary comment at the end of the file
2023-09-11 11:50:12 -03:00
Matheus Jacques
87339b9442 Fix images and remove depends_on 2023-09-07 16:47:08 +02:00
Gabriel Luiz Freitas Almeida
5a6a052b2d ⬆️ chore(pyproject.toml): upgrade types-redis to version 4.6.0.5 for better compatibility and type checking 2023-09-05 15:35:30 -03:00
Gabriel Luiz Freitas Almeida
0d9d4856fb 🐛 fix(celery_app.py): ignore type error for Celery import to avoid linting issues
🐛 fix(base.py): ignore type error for AsyncResult import to avoid linting issues

🐛 fix(worker.py): ignore type error for SoftTimeLimitExceeded import to avoid linting issues
 feat(worker.py): add conditional clearing of session cache based on clear_cache flag to improve performance
2023-09-05 15:35:14 -03:00
Gabriel Luiz Freitas Almeida
44bd6e4787 🔥 refactor(process.py): remove unused clear_caches_if_needed function
🔀 refactor(process.py): refactor process_graph_cached function to use Result dataclass for return type and remove unused code
2023-09-05 15:34:56 -03:00
Gabriel Luiz Freitas Almeida
d13f0e77df 🔧 chore(utils.py): remove unused imports and classes
🔥 refactor(utils.py): remove unused Memoize class and its methods
2023-09-05 15:34:45 -03:00
Gabriel Luiz Freitas Almeida
ba9d57fa78 🔥 refactor(chat/manager.py): remove unused imports and code
🚀 feat(chat/manager.py): add import for pil_to_base64 function to support image encoding in chat messages
2023-09-05 15:34:35 -03:00
Gabriel Luiz Freitas Almeida
e74fc00442 🔧 chore(base.py): add Redis configuration options to base settings for better flexibility and customization 2023-09-05 15:34:20 -03:00
Gabriel Luiz Freitas Almeida
a6322461c0 🐛 fix(api_key/crud.py): fix variable name conflict in update_total_uses function to prevent overwriting the api_key parameter
🔒 chore(api_key/crud.py): add error handling to update_total_uses function to raise ValueError if API Key is not found
2023-09-05 15:34:08 -03:00
Gabriel Luiz Freitas Almeida
9721e9d6cf 🐛 fix(manager.py): add validation to check if task function has an apply method before calling it
 feat(manager.py): change return type of launch_task method to Any to allow for more flexibility in return values
2023-09-05 15:33:43 -03:00
Gabriel Luiz Freitas Almeida
779c021d78 🐛 fix(anyio.py): change return type annotation of result() method from 'any' to 'Any' for better type hinting
🐛 fix(anyio.py): change parameter type annotation of get_task() method from 'int' to 'str' to match the actual type of task_id
2023-09-05 15:33:31 -03:00
Gabriel Luiz Freitas Almeida
8a47fb75cb 🔨 refactor(base.py): remove unnecessary type hinting for task_id parameter in get_task method
🔨 refactor(base.py): remove unnecessary return type hinting for launch_task method
2023-09-05 15:33:11 -03:00
Gabriel Luiz Freitas Almeida
e50704a49f 🐛 fix(celery.py): fix type hinting error for AsyncResult import
🔒 chore(celery.py): add check for delay method existence in launch_task to prevent errors
🔒 chore(celery.py): change get_task return type hint to Any to match actual return type
2023-09-05 15:32:54 -03:00
Gabriel Luiz Freitas Almeida
18af716290 🐛 fix(chat.py): update variable name from in_memory_cache to cache_manager for better clarity and consistency 2023-09-05 14:54:03 -03:00
Gabriel Luiz Freitas Almeida
7a63b5635d 🔥 refactor(run.py): remove unused imports and commented out code in run.py
🔥 refactor(test_cache.py): remove unused imports and commented out code in test_cache.py
2023-09-05 14:53:38 -03:00
Gabriel Luiz Freitas Almeida
00290d0f9e 🔧 fix(test_endpoints.py): remove unused imports and refactor test_basic_chat_with_two_session_ids_and_names to use a loop for better readability and maintainability
 feat(test_endpoints.py): add test_basic_chat_with_two_session_ids_and_names to test the functionality of handling multiple session IDs and names in the chat endpoint
2023-09-05 14:49:20 -03:00
Gabriel Luiz Freitas Almeida
9615523a8d 🔧 refactor(manager.py): simplify update_session and clear_session methods by removing unnecessary data_graph parameter 2023-09-05 14:49:10 -03:00
Gabriel Luiz Freitas Almeida
5903378503 🐛 fix(process.py): remove unnecessary else statement to improve code readability and semantics
🐛 fix(process.py): update session_manager.update_session() method signature to match the new implementation
🐛 fix(worker.py): update session_manager.update_session() method signature to match the new implementation
🐛 fix(test_process.py): update session_manager.build_key() and session_manager.clear_session() method calls to match the new implementation
2023-09-05 14:46:55 -03:00
Gabriel Luiz Freitas Almeida
141f57958b feat(tests): add __init__.py and utils.py files to tests directory for test setup and utility functions 2023-09-05 12:24:43 -03:00
Gabriel Luiz Freitas Almeida
5b6c732213 🔧 chore(manager.py): refactor load_session method to use a more descriptive variable name 'key' instead of 'session_id' for better readability
🔧 chore(manager.py): refactor generate_key method to use a separate build_key method for better separation of concerns
🔧 chore(manager.py): refactor update_session method to use the build_key method for better separation of concerns
🔧 chore(manager.py): refactor clear_session method to use the build_key method for better separation of concerns
🔧 chore(manager.py): add type hinting for cache_manager parameter in the __init__ method for better code clarity
2023-09-05 12:24:07 -03:00
Gabriel Luiz Freitas Almeida
8c8e26472d 🐛 fix(process.py): add missing else statement to properly assign session_id when not generating a new key 2023-09-05 12:23:33 -03:00
Gabriel Luiz Freitas Almeida
6309de1654 🚀 feat: add Basic Chat with Prompt and History (2) node
ℹ️ This commit adds a new node called "Basic Chat with Prompt and History (2)" to the chat application. This node is responsible for creating a simple chat interface with a custom prompt template and a conversational memory buffer.

The node configuration includes various properties such as callbacks, cache, client, max_retries, max_tokens, metadata, model_kwargs, model_name, n, openai_api_base, openai_api_key, openai_organization, openai_proxy, and more.

This new node enhances the chat functionality by providing a more interactive and dynamic chat experience for users.

📝 chore(tests): add BasicChatwithPromptandHistory.json test data file for testing purposes

🔧 fix(test_endpoints.py): remove unused imports and trailing whitespace
 test(test_endpoints.py): add test for basic chat in process endpoint to verify correct response and session_id generation
 test(test_endpoints.py): add test for basic chat with different session_ids to verify correct response
 test(test_endpoints.py): add test for basic chat with two session_ids and names to verify correct response
2023-09-05 11:55:53 -03:00