fix: validation now properly checks for null values (#454)
Gabriel Luiz Freitas Almeida
2023-06-07 06:39:20 -03:00
1435d2de83🔖 chore(pyproject.toml): bump up version to 0.0.84 This commit only updates the version number of the package in the pyproject.toml file. The version number is updated to 0.0.84. This is a chore commit as it does not add any new features or fix any bugs, but it is necessary to keep track of the package version.
Gabriel Luiz Freitas Almeida
2023-06-07 06:29:17 -03:00
7bba3fd087🐛 fix(chatModal): fix conditional statement to check for undefined and null values The conditional statement in line 292 was not properly checking for undefined and null values, which could lead to unexpected behavior. The fix ensures that the statement checks for all falsy values, including undefined and null.
Gabriel Luiz Freitas Almeida
2023-06-07 06:25:08 -03:00
4ee9b044bd🚀 feat(Makefile): add build_and_run target to build and run the application The new build_and_run target removes the dist folder, builds the application, installs it, and runs it. This target is useful for quickly building and running the application in a development environment.
Gabriel Luiz Freitas Almeida
2023-06-06 23:32:05 -03:00
e7e510a218fix: this commit tries to fix issue of blank UI
Gabriel Luiz Freitas Almeida
2023-06-06 23:31:06 -03:00
7b40e8bafa📦 chore(pyproject.toml): add multiprocess dependency to dev dependencies The multiprocess library is added to the dev dependencies to support parallel processing in the development environment.
Gabriel Luiz Freitas Almeida
2023-06-06 23:30:21 -03:00
72afbb834c🐛 fix(__main__.py): fix typo in sendAll function URL ✨ feat(__main__.py): add banner with title and info text to be displayed on server start 🐛 fix(App.tsx): fix API endpoint URL The sendAll function URL had an extra forward slash. The API endpoint URL in App.tsx was incorrect and has been fixed. A banner with a title and info text has been added to be displayed on server start to provide users with more information about the application.
Gabriel Luiz Freitas Almeida
2023-06-06 23:29:42 -03:00
🚀 feat(customs.py): re-add PythonFunction to CUSTOM_NODES (#450)
Gabriel Luiz Freitas Almeida
2023-06-06 17:47:24 -03:00
683b7ab4d0🚀 feat(config.yaml): add PythonFunction to the list of available tools The PythonFunction tool has been added to the list of available tools in the config.yaml file. This allows the backend to use Python functions as part of the language processing pipeline.
Gabriel Luiz Freitas Almeida
2023-06-06 17:41:17 -03:00
2feeeb9ecd🐛 fix(flow.py): make flow field optional to allow creation of flows without a flow 🧪 test(test_database.py): add test case for creating flows without a flow The flow field is now optional to allow creation of flows without a flow. This is useful when creating a flow that will be populated later. A test case was added to ensure that flows can be created without a flow.
Gabriel Luiz Freitas Almeida
2023-06-06 17:37:05 -03:00
1d33933d64🐛 fix(__main__.py): make database_url parameter optional in update_settings function 🐛 fix(llms.py): add name check before checking if "azure" is in name.lower() 🔨 refactor(test_database.py): rename updated_flow_style variable to to_update_flow_style for clarity The update_settings function now has an optional database_url parameter to allow for more flexibility in updating settings. The llms.py file now checks if the name variable is not None before checking if "azure" is in name.lower(). In test_database.py, the updated_flow_style variable is renamed to to_update_flow_style for clarity.
Gabriel Luiz Freitas Almeida
2023-06-06 16:30:34 -03:00
b1276028f9🚨 fix(test_database.py): fix API endpoint URLs to include version number ✨ feat(test_database.py): add tests for creating, reading, updating, and deleting FlowStyle objects 🚨 fix(test_database.py): fix flow_id type in test_read_flow to be UUID instead of string 🚨 fix(test_database.py): fix HTTP method in test_update_flow from PUT to PATCH 🚨 fix(test_database.py): fix API endpoint URLs in test_update_flow and test_update_nonexistent_flow 🚨 fix(test_database.py): fix HTTP method in test_update_flow_idempotency from PUT to PATCH 🚨 fix(test_database.py): fix API endpoint URLs in test_update_flow_idempotency 🚨 fix(test_database.py): fix HTTP method in test_delete_flow from DELETE to PATCH 🚨 fix(test_database.py): fix API endpoint URLs in test_delete_flow and test_delete_nonexistent_flow 🚨 fix(test_database.py): fix API endpoint URLs in test_read_flows and test_read_empty_flows The changes in this commit fix the API endpoint URLs to include the version number and fix various HTTP methods. Additionally, tests were added for creating, reading, updating, and deleting FlowStyle objects. The test_read_flow was fixed to use UUID instead of string for the flow_id.
Gabriel Luiz Freitas Almeida
2023-06-06 16:26:00 -03:00
ce9b3bfbd3🎨 refactor(schemas.py): add FlowListRead schema and SQLModelSerializable base model The FlowListRead schema is added to support reading a list of flows with their styles. The SQLModelSerializable base model is added to support serialization of SQLModel objects to JSON using orjson. This improves performance and reduces memory usage.
Gabriel Luiz Freitas Almeida
2023-06-06 16:24:56 -03:00
32ae6fe0ef🎉 feat(flow_style.py): add FlowStyle model and its CRUD classes The FlowStyle model is added to the project, which represents the style of a flow. It has a color and an emoji field, and a foreign key to the Flow model. The CRUD classes are also added to the file, which are FlowStyleCreate, FlowStyleRead, and FlowStyleUpdate. These classes are used to create, read, and update FlowStyle instances respectively.
Gabriel Luiz Freitas Almeida
2023-06-06 16:24:20 -03:00
cac0cbc374🔥 chore(flow_styles.py): remove unused imports and update comments The imports for the deleted FlowStyle model are removed from flow_styles.py. The comments for the FlowStyleCreate class are updated to reflect the fields it contains.
Gabriel Luiz Freitas Almeida
2023-06-06 16:24:01 -03:00
183f80b1fc🔥 chore(database.py): remove unused code and endpoints related to flows ✨ feat(router.py): add new routers for flows and flow styles 🔧 refactor(__init__.py): add new routers to __all__ list 🔧 refactor(conftest.py): update import statement for get_session function The unused code and endpoints related to flows have been removed from the database.py file. New routers for flows and flow styles have been added to the router.py file. The __all__ list in the __init__.py file has been updated to include the new routers. The import statement for the get_session function in the conftest.py file has been updated to reflect the new location of the function.
Gabriel Luiz Freitas Almeida
2023-06-06 16:23:37 -03:00
9102d8468f📦 chore(pyproject.toml): add orjson dependency to improve JSON serialization performance The orjson library is added as a dependency to improve the performance of JSON serialization. This will help to reduce the time taken to serialize and deserialize JSON data, which is especially important in high-performance applications.
Gabriel Luiz Freitas Almeida
2023-06-06 16:21:46 -03:00
f5f0983116Merge remote-tracking branch 'origin/dev' into db
Gabriel Luiz Freitas Almeida
2023-06-06 12:57:46 -03:00
998d1bf5ed🚀 chore(Makefile): add install_backend command to backend target The Makefile has been updated to include the install_backend command as a dependency of the backend target. This ensures that the backend dependencies are installed before running the backend server.
Gabriel Luiz Freitas Almeida
2023-06-06 12:55:12 -03:00
API Refactor and structure changes (#449)
Gabriel Luiz Freitas Almeida
2023-06-06 12:52:41 -03:00
73bad871f2🐛 fix(llms.py): add null check for name variable in azure field formatting The code was updated to add a null check for the name variable before checking if it contains the string "azure". This prevents a potential runtime error if the name variable is null.
Gabriel Luiz Freitas Almeida
2023-06-06 11:44:57 -03:00
3de23e345f🚀 feat(customs.py): add PythonFunction to CUSTOM_NODES 🚀 feat(loading.py): add support for PythonFunction node type 🚀 feat(constants.py): add PythonFunction to CUSTOM_TOOLS 🚀 feat(custom.py): add PythonFunction class 🚀 feat(frontend_node/tools.py): add PythonFunctionNode class 🧪 test(test_custom_types.py): add test for PythonFunction class 🧪 test(test_llms_template.py): comment out tests for AzureOpenAI and AzureChatOpenAI The changes add support for a new node type, PythonFunction, which allows users to define a Python function to be executed. The node type is added to CUSTOM_NODES in customs.py, and support for the node type is added to loading.py. The node type is also added to CUSTOM_TOOLS in constants.py, and the PythonFunction class is added to custom.py. The PythonFunctionNode class is added to frontend_node/tools.py. Tests for the new PythonFunction class are added to test_custom_types.py. Tests for AzureOpenAI and AzureChatOpenAI are commented out in test_llms_template.py.
Gabriel Luiz Freitas Almeida
2023-06-06 11:40:39 -03:00
Initial support for Azure LLM nodes. (#443)
Gabriel Luiz Freitas Almeida
2023-06-06 10:14:31 -03:00
1e854fc469update endpoint
Gabriel Luiz Freitas Almeida
2023-06-06 10:06:51 -03:00
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.
Gabriel Luiz Freitas Almeida
2023-06-06 10:06:40 -03:00
478bb446c3🐛 fix(frontend): add missing api/v1 prefix to API routes 🐛 fix(frontend): add missing api/v1 prefix to WebSocket URL 🐛 fix(frontend): add missing api/v1 prefix to Vite proxy target The API routes, WebSocket URL, and Vite proxy target were missing the "api/v1" prefix, causing the frontend to not be able to communicate with the backend. This commit adds the missing prefix to all three locations to fix the issue.
Gabriel Luiz Freitas Almeida
2023-06-06 10:06:14 -03:00
228f938cd8🔨 refactor(types.py): move extract_input_variables_from_prompt import to interface.utils module 🔨 refactor(custom.py, loading.py, prompts/custom.py, run.py): update import statements to use extract_input_variables_from_prompt from interface.utils module 🔨 refactor(run.py): remove unused imports and functions 🔨 refactor(utils.py): add type hinting to extract_input_variables_from_prompt function and remove unused imports The extract_input_variables_from_prompt function has been moved to the interface.utils module to improve code organization. The import statements in the affected modules have been updated to reflect this change. Unused imports and functions have been removed from the run.py module. Type hinting has been added to the extract_input_variables_from_prompt function in the interface.utils module.
Gabriel Luiz Freitas Almeida
2023-06-06 10:05:46 -03:00
3bfee4d445🚀 feat(graph): add from_payload class method to Graph class 🚀 feat(utils.py): import extract_input_variables_from_prompt from langflow.interface.utils The from_payload class method is added to the Graph class to create a graph from a payload. This method takes a dictionary as input and returns a Graph object. The extract_input_variables_from_prompt function is imported from langflow.interface.utils to extract input variables from a prompt. This function is used in other parts of the codebase to extract input variables from prompts.
Gabriel Luiz Freitas Almeida
2023-06-06 10:05:01 -03:00
7f4eea1e59🚀 feat(chat): add ChatManager and ChatHistory classes to manage chat history and active connections ✨ feat(utils.py): add process_graph function to process graph data and generate result and thought The ChatManager class manages active connections and chat history. The ChatHistory class manages the chat history for a client. The process_graph function processes graph data and generates a result and thought. This function is used in the ChatManager class to generate a response back to the frontend.
Gabriel Luiz Freitas Almeida
2023-06-06 10:02:21 -03:00
2bfe93e0b8🚀 feat(langflow): add new API endpoints for chat, validation, and version This commit adds new API endpoints for chat, validation, and version. The chat endpoint is a websocket endpoint for chat. The validation endpoint has three sub-endpoints for validating code, prompt, and node. The version endpoint returns the version of LangFlow.
Gabriel Luiz Freitas Almeida
2023-06-06 10:01:44 -03:00
3e5878ddc2🎉 feat(langflow): add new files base.py and callback.py The base.py file contains the following classes and functions: - CacheResponse: a pydantic BaseModel that represents a response containing a dictionary of data - Code: a pydantic BaseModel that represents a code string - Prompt: a pydantic BaseModel that represents a prompt template string - CodeValidationResponse: a pydantic BaseModel that represents a response containing the validation results of code - PromptValidationResponse: a pydantic BaseModel that represents a response containing the validation results of a prompt - validate_prompt: a function that validates a prompt template string and returns a PromptValidationResponse object - check_input_variables: a function that checks if input variables contain invalid characters and returns a list of fixed input variables
Gabriel Luiz Freitas Almeida
2023-06-06 10:01:18 -03:00
bdbb4a8127🚀 feat(api): add versioning to the API and restructure the router The API now has versioning, with the prefix "/api/v1". The router has been restructured to include the chat, endpoints, and validate routers. This improves the organization of the code and makes it easier to add new routers in the future.
Gabriel Luiz Freitas Almeida
2023-06-06 10:00:38 -03:00
3342e03a2c🔀 refactor(langflow): move routers to a single file and add health check endpoint The routers for the langflow API have been moved to a single file for better organization and maintainability. The routers have been imported and included in the main.py file using the new file. A new health check endpoint has been added to the API to check the status of the application.
Gabriel Luiz Freitas Almeida
2023-06-06 09:59:37 -03:00
79c677fb09🚀 feat(pyproject.toml): add pytest configuration options Added pytest configuration options to the pyproject.toml file. The minimum version of pytest is set to 6.0, the '-ra' option is added to addopts to show all test results, testpaths are set to include both 'tests' and 'integration' directories, console output style is set to 'progress', and DeprecationWarning is ignored. log_cli is set to true to enable logging of pytest output to the console.
Gabriel Luiz Freitas Almeida
2023-06-06 09:58:30 -03:00
Merge branch 'main' into release
Gabriel Luiz Freitas Almeida
2023-06-06 07:55:17 -03:00
d3e2f225f0🔖 chore(pyproject.toml): bump up version to 0.0.83 The version number in the pyproject.toml file has been updated from 0.0.82 to 0.0.83. This is a chore commit as it does not introduce any new features or fix any bugs, but rather updates the version number to reflect the changes made in the package.
Gabriel Luiz Freitas Almeida
2023-06-06 07:53:25 -03:00
Dark mode after refreshing page (#430)
anovazzi1
2023-06-05 18:02:56 -03:00
5a103f0f6f🔨 refactor(base.py): extract methods to handle model-specific and API key-specific field values This commit refactors the FrontendNode class by extracting two methods to handle specific field values related to models and API keys. The _handle_model_specific_field_values method handles the options and is_list properties for fields related to models, while the _handle_api_key_specific_field_values method handles the display_name and required properties for fields related to API keys. This improves the readability and maintainability of the code.
Gabriel Luiz Freitas Almeida
2023-06-05 13:48:17 -03:00
ec585b8acc🐛 fix(flow.py): change flow field type from str to Dict to allow for JSON data ✨ feat(flow.py): add validator to ensure flow field is a valid JSON object with required fields The flow field in the FlowBase model has been changed from a string to a dictionary to allow for JSON data. A validator has been added to ensure that the flow field is a valid JSON object with the required fields. The tests have been updated to reflect these changes.
Gabriel Luiz Freitas Almeida
2023-06-05 13:40:14 -03:00
5b28bbb795Initial support for Azure LLM nodes.
Jacob Lee
2023-06-05 08:56:44 -05:00
521cecf2c1Fixed visual things at the meeting
Lucas Oliveira
2023-06-05 11:39:20 -03:00
886a938b98Rename component added and set
Lucas Oliveira
2023-06-05 10:11:56 -03:00
2a6c8ae92eFixed header to display options only on flow name
Lucas Oliveira
2023-06-05 08:02:35 -03:00
56d0898861Merge branch 'dev' into mainPage
Lucas Oliveira
2023-06-05 07:43:31 -03:00
24e205287aAdded header
Lucas Oliveira
2023-06-05 07:42:07 -03:00
5a46c1e1a0🐛 fix(database.py): handle case where data does not contain "flows" key ✨ feat(database.py): add default argument to json.dumps to handle datetime objects 🚨 test(database.py): add tests for batch flow creation, file upload, and file download The fix in database.py handles the case where the data dictionary does not contain the "flows" key. This is important because the code assumes that the "flows" key is present and will raise an exception if it is not. The fix adds a check to see if the "flows" key is present and if not, it creates a new FlowListCreate object with the data as a list of FlowCreate objects.
Gabriel Luiz Freitas Almeida
2023-06-04 22:58:43 -03:00
ce2f0ebf48update poetry lock
Gabriel Luiz Freitas Almeida
2023-06-04 22:15:49 -03:00
af0d9456b5Merge branch 'dev' into db
Gabriel Luiz Freitas Almeida
2023-06-04 22:14:25 -03:00
eeee895f6a🔒 chore(pyproject.toml): update fastapi dependency to version 0.96.0 FastAPI dependency has been updated to version 0.96.0 to ensure that the application is using the latest version of the framework.
Gabriel Luiz Freitas Almeida
2023-06-04 21:42:14 -03:00
42c7e1c331🚀 feat(flow.py): add relationship to FlowStyle model 🚀 feat(flowstyle.py): add FlowStyle model 🚀 feat(flowstyle.py): add FlowStyleCreate and FlowStyleRead models 🐛 fix(settings.py): correct typo in database_url variable name The Flow model now has a relationship to the FlowStyle model, which allows for the creation of a FlowStyle object that is associated with a Flow object. The FlowStyle model is a new model that contains the color and emoji fields, which are used to style the Flow object. The FlowStyleCreate and FlowStyleRead models are used to create and read FlowStyle objects respectively. The typo in the database_url variable name has been corrected to ensure that the application connects to the correct database.
Gabriel Luiz Freitas Almeida
2023-06-04 21:36:03 -03:00
Added HuggingFaceHub and fixed the stream parameter + added summariza… (#435)
Gabriel Luiz Freitas Almeida
2023-06-02 19:23:57 -03:00
00100ff9f1🔖 chore(pyproject.toml): bump up version to 0.0.81 The version number in the pyproject.toml file has been updated from 0.0.80 to 0.0.81. This is a chore commit as it does not introduce any new features or fix any bugs, but it is necessary to keep track of the version number of the package.
Gabriel Luiz Freitas Almeida
2023-06-02 19:16:09 -03:00
858b88240eSet text-generation as a default task value
GMS
2023-06-02 22:16:43 +01:00
1bd3303c52Change the delay to open to instant
Cristhian Zanforlin Lousa
2023-06-02 17:49:53 -03:00
b754c8b490Merge branch 'jimwhite-anthropic' into dev
Gabriel Luiz Freitas Almeida
2023-06-02 17:43:19 -03:00
02cb94709dAdding shad tooltip and grouping by class on edges
Cristhian Zanforlin Lousa
2023-06-02 17:15:59 -03:00
cce41189e9Trim too long comments about Anthropic models.
Jim White
2023-06-02 12:18:38 -07:00
07afc08129Add model names for Anthropic and add ChatAnthropic (preferred over the deprecated Anthropic LLM).
Jim White
2023-06-02 12:08:57 -07:00
df3cdb90b7🔨 refactor(types.py): reorder class definitions to match the order of their usage in the code The order of the class definitions in the file has been changed to match the order of their usage in the code. This improves the readability of the code and makes it easier to understand the relationships between the classes. No functionality has been changed.
Gabriel Luiz Freitas Almeida
2023-06-02 14:21:38 -03:00
430043098dfix dropdown value with wrong color
anovazzi1
2023-06-02 14:15:06 -03:00
534f47f153🔨 refactor(types.py): import flatten_list function from graph.utils module This commit simply imports the flatten_list function from the graph.utils module to be used in the AgentVertex class. This improves the readability of the code and reduces the number of lines of code.
Gabriel Luiz Freitas Almeida
2023-06-02 14:14:47 -03:00
9517ffe3b3Merge remote-tracking branch 'origin/dev' into fix_toolkits
Gabriel Luiz Freitas Almeida
2023-06-02 12:56:02 -03:00
refactor: change Node to Vertex (#426)
Gabriel Luiz Freitas Almeida
2023-06-02 12:16:55 -03:00
b7286afd32🎨 style(types.py): improve readability of return statement in TextSplitterVertex The return statement in TextSplitterVertex was improved to be more readable by adding a new line before the Documents field. This makes it easier to read and understand the output of the function.
Gabriel Luiz Freitas Almeida
2023-06-02 12:14:03 -03:00