Commit graph

10,572 commits

Author SHA1 Message Date
ogabrielluiz
8902b6d09e chore(create-release.yml): rename job name to 'Create Release Job' for clarity
chore(create-release.yml): rename step name to 'Download Artifact' for better readability
chore(create-release.yml): rename step name to 'Create Release Notes' for better understanding of the action's purpose
2024-05-28 19:24:52 -03:00
ogabrielluiz
6e9e67d5c6 chore(pre-release.yml): remove unnecessary dependency on 'call_docker_build' job for 'create_release' job when release_type is 'main' to simplify workflow logic 2024-05-28 19:00:26 -03:00
ogabrielluiz
8d1295b5a1 fix(pre-release.yml): update artifact path based on release type to correctly upload artifacts for different release types 2024-05-28 18:53:19 -03:00
ogabrielluiz
25767de60d refactor: Update version numbers in pyproject.toml files 2024-05-28 18:46:31 -03:00
ogabrielluiz
9965f9a31a feat: Add release_type input to create-release workflow 2024-05-28 18:44:01 -03:00
ogabrielluiz
6070bbb8fc feat(create-release.yml): add GitHub Actions workflow to create a release with version input and release notes generation 2024-05-28 18:38:58 -03:00
Gabriel Luiz Freitas Almeida
482ac3fbfc
Refactor base.py and Dockerfile, and folder column migration (#2002)
* refactor(base.py): handle ImportError when importing is_pre_release function from langflow.version module to prevent crashing the application
feat(base.py): dynamically determine if the version is a pre-release version by checking for 'a', 'b', or 'rc' in the version number

* fix(Dockerfile): add missing backslash to ensure proper chaining of commands

* refactor: Update get_lifespan function to handle ImportError and dynamically determine the version number

The get_lifespan function in main.py has been updated to handle ImportError when importing the __version__ attribute from the langflow.version module. If the import fails, the version number is dynamically determined using the importlib.metadata.version function. This change ensures that the application does not crash when the langflow.version module is not available.

Note: This commit message follows the convention used in the recent user commits.

* chore: Add langflow-pre.db and langflow.db to .dockerignore

* chore: Update .dockerignore to include langflow-pre.db and langflow.db

* refactor: Add folder_id column to flow table and handle folder column migration

This commit adds the folder_id column to the flow table in the database. It also handles the migration of the folder column to the new folder_id column. This change allows for better organization and management of flows within folders.

Note: This commit message follows the convention used in the recent user commits.

* refactor: Update Dockerfiles to include user creation and environment variable

This commit updates the Dockerfiles to include the creation of a user with UID 1000 and the necessary permissions for the /app/langflow directory. It also adds the user's local bin directory to the PATH environment variable. This change improves the security and isolation of the application within the container.

Note: This commit message follows the convention used in the recent user commits.
2024-05-28 14:27:02 -07:00
Gabriel Luiz Freitas Almeida
6d849b449e
update call_docker_build job (#2001)
* refactor: Update SplitTextComponent to store parent and text data in Record object

* chore(pre-release.yml): update call_docker_build job to use langflow-ai/langflow/.github/workflows/docker-build.yml@dev for better workflow organization and consistency

* merge dev
2024-05-28 13:24:12 -07:00
Gabriel Luiz Freitas Almeida
f694f0716f
Fixed freeze implementation (#1983)
* chore: Update utils imports and add cn to nodeToolbarComponent

* fix(utils.py): change key parameter name from 'flow_id' to 'key' for consistency
fix(chat.py): remove unused import 'functools.partial' to improve code readability
refactor(chat.py): remove 'set_cache_coro' partial function and pass 'chat_service' directly to 'build_vertex' method for better code organization
feat(schemas.py): add 'used_frozen_result' field to ResultDataResponse and ResultData classes with default value of False for better tracking of frozen result usage
feat(base.py): add 'chat_service' parameter to 'build_vertex' method in Graph class to allow passing ChatService instance for cache operations
feat(base.py): update 'build_vertex' method in Graph class to handle caching of frozen vertices and set 'used_frozen_result' flag in ResultData class
feat(cache/service.py): change parameter name from 'flow_id' to 'key' in 'set_cache' and 'get_cache' methods for consistency
feat(cache/utils.py): add 'CacheMiss' class to represent cache miss situations for better error handling

* feat: Add check for None before setting 'used_frozen_result' flag in Graph class

* feat: Add frozen effect to buttons and improve code organization

The code changes introduce a frozen effect to buttons by adding new CSS classes and styles. This effect is achieved by applying borders, shadows, and background colors. Additionally, the code is refactored to improve code organization and remove unused imports.

Note: This commit message follows the convention used in the recent user commits.

* feat: Add frozen effect to buttons and improve code organization

* style(applies.css): Update border styles for frozen state to improve visual appearance and consistency
style(applies.css): Adjust opacity of frosted background for better readability
style(tailwind.config.js): Increase opacity of frozen-ring shadow for better visual effect
style(tailwind.config.js): Increase opacity of frosted-ring shadow for better visual effect

* feat(parameterComponent): add snowflake icon to ParameterComponent when node is frozen and not aligned left

* style(applies.css): Update border styles for frozen state and add border to improve visual appearance and consistency
2024-05-28 12:43:14 -07:00
anovazzi1
ee62bd38b7
Update parent disclosure title in ExtraSidebar component (#1987)
chore: Update parent disclosure title in ExtraSidebar component
2024-05-28 12:41:58 -07:00
Gabriel Luiz Freitas Almeida
0c32bbe182
Refactor SplitTextComponent to store parent and text data in Record object (#1998)
refactor: Update SplitTextComponent to store parent and text data in Record object
2024-05-28 12:41:32 -07:00
Gabriel Luiz Freitas Almeida
8250c2a2eb
Fix column name check in folder_id column (#1999)
* bug: fix column name check in folder_id column
2024-05-28 12:40:11 -07:00
Gabriel Luiz Freitas Almeida
8f6b9d6443
Added API key access to AUTO_LOGIN=True and fixed SecretKeyModal (#1994)
* chore: Add type attribute to button in SecretKeyModal

* chore: Refactor Header component to fix autoLogin button visibility

* docs(api.mdx): update admonition message to remove reference to LANGFLOW_AUTO_LOGIN environment variable
docs(cli.mdx): update CLI command example to use 'run' subcommand instead of no arguments
feat(cli.mdx): add 'api-key' command to create API key for default superuser when LANGFLOW_AUTO_LOGIN is True

* docs(api.mdx): update admonition message to remove reference to LANGFLOW_AUTO_LOGIN environment variable

* chore: Fix typo in get-curl-code.tsx

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-05-28 12:02:40 -07:00
Gabriel Luiz Freitas Almeida
3f5769dd79
Update Dockerfiles to create langflow directory and grant write permissions (#1996)
This pull request updates the Dockerfiles to create a "langflow" directory and grant write permissions to it. This change ensures that the user inside the Docker container has the necessary permissions to write to the "langflow" directory.
2024-05-28 12:01:20 -07:00
ogabrielluiz
4bcc060f75 chore: Update Dockerfiles to create langflow directory and grant write permissions 2024-05-28 16:01:02 -03:00
ogabrielluiz
5dce2cddef chore: Update Python API code to use optional typing and fix formatting 2024-05-28 15:45:16 -03:00
Mendon Kissling
273df44963
[Docs] - Leftnav and syntax items (#1993)
Some docs syntax items @rodrigosnader requested - 
1. Merge canvas and flows/components/projects doc into 1 doc
2. Move HF Spaces to install, remove page and nav item
3. Remove install from starter projects and link to install page
4. All title case nav
2024-05-28 13:01:45 -04:00
Mendon Kissling
43bea36155 remove-install-from-starter-projects 2024-05-28 11:48:31 -04:00
Mendon Kissling
8a6dfae8d7 title-case 2024-05-28 11:26:43 -04:00
ogabrielluiz
701d6e6995 chore: Update package versions in pyproject.toml files 2024-05-28 12:24:43 -03:00
Mendon Kissling
e38123c951 combine-flows-doc-into-canvas 2024-05-28 11:22:49 -04:00
yamonbt
72f09d65b6
A better implementation of the Ollama component (#1701)
* Update OllamaModel.py

A draft to synchronize the model using the latest Langflow architecture and to improve it according to the latest Langchain specifications.

* Update OllamaModel.py

Checkout Models from api

* Update OllamaModel.py

* Update OllamaModel.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-05-28 08:20:58 -07:00
Lucas Oliveira
7d67f36000
Fix Building timeout and macbook shortcuts (#1964)
* Fixed shortcuts not working on mac

* fixed top level vertices and added timeout

* revert flowStore changes

* chore: Update worker timeout setting

* feat: Add endpoint to retrieve config settings

The commit adds a new endpoint `/config` to retrieve the configuration settings. This endpoint returns the `ConfigResponse` model, which includes the `timeout` value. The implementation handles any exceptions and logs them appropriately.

* feat: Add fetchConfig function to retrieve configuration settings

This commit adds a new function fetchConfig to the API utils module. The function makes an HTTP GET request to the /config endpoint and returns the configuration data. Any errors that occur during the request are logged and rethrown. This function will be used to initialize the application with the fetched configuration.

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* revert changes

* feat: Add setupAxiosDefaults function to initialize Axios configurations

This commit adds a new function setupAxiosDefaults to the API utils module. The function fetches the configuration data using the fetchConfig function and sets up default configurations for Axios. It sets the base URL and timeout for Axios requests based on the fetched configuration. This function will be used to initialize Axios with the correct configurations.

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix(langflow): rename 'timeout' setting to 'worker_timeout' for clarity and consistency
feat(langflow): add 'frontend_timeout' setting to control frontend API call timeout
chore(langflow): reorganize imports and constants in settings module for better readability

* Set frontend_timeout to 0

---------

Co-authored-by: ogabrielluiz <gabriel@langflow.org>
2024-05-28 08:18:36 -07:00
Gabriel Luiz Freitas Almeida
56fc11a99c
feat: Update ChromaSearch and ChromaComponent to use chromadb library (#1992)
The code changes in `ChromaSearch.py` and `Chroma.py` import the `chromadb` library and use it to create a `HttpClient` object. This change enables the components to interact with a Chroma server for vector search functionality.

This commit message follows the established convention of starting with a type (feat for feature) and providing a concise summary of the changes.
2024-05-28 08:16:37 -07:00
Mendon Kissling
b916ef0ebc remove-hf-space-page 2024-05-28 11:12:11 -04:00
Mendon Kissling
2d9719946a hf-spaces-and-subfolder 2024-05-28 11:11:11 -04:00
ogabrielluiz
1a4b895509 feat: Enable loading data from database in VectorStore-RAG-Flows.json 2024-05-28 11:39:41 -03:00
ogabrielluiz
1965aa9acf feat: Enable loading data from database in VectorStore-RAG-Flows.json 2024-05-28 11:39:31 -03:00
Mendon Kissling
d8fcdb8d7d
docs integrations notion (#1951)
- docs: add Notion Setup instructions
- docs: Notion Add Content to Page instructions
- docs: Notion List Database Properties instructions
- docs: Notion List Pages instructions
- docs: Notion Page Viewer instructions
- docs: Notion Page Create instructions
- docs: Notion User Lists instructions
- docs: Notion Page Update instructions
2024-05-28 10:23:20 -04:00
Gabriel Luiz Freitas Almeida
b912a71e02
Fixed Sub Flow, Run Flow and Flow as Tool components (#1986)
* feat(langflow): add utility functions to build records from run outputs and result data for better code organization and reusability

* chore: Generate dynamic flow function with user ID parameter for better flow customization and tracking

* chore: Refactor build_records_from_run_outputs and build_records_from_result_data for better code organization and reusability

* chore: Update FlowToolComponent to include user ID parameter in build_function_and_schema method call

* chore: Add conditional check for result_data in build_records_from_run_outputs

* chore: Generate dynamic flow function with optional user ID parameter for better flow customization and tracking

* feat: Add user ID parameter to Graph.from_payload method

* chore: Add FlowTool class for flow processing and customization

* chore: Update FlowToolComponent to use get_flow_inputs instead of build_function_and_schema

* chore: Update FlowTool to handle optional user ID parameter
2024-05-28 07:18:32 -07:00
Mendon Kissling
ccecdbcc98 cleanup 2024-05-28 10:18:01 -04:00
Mendon Kissling
7ff581e90a intro 2024-05-28 09:20:03 -04:00
ogabrielluiz
8abab3a930 chore: Set Dockerfile and Tags dynamically in Docker Build and Push workflow 2024-05-28 08:40:40 -03:00
ogabrielluiz
26c85f191e chore: Set Dockerfile and Tags dynamically in Docker Build and Push workflow 2024-05-28 08:02:01 -03:00
ogabrielluiz
11c874cd96 chore: Update pre-release workflow to include actions/checkout step 2024-05-27 18:27:10 -03:00
ogabrielluiz
02b7491f2c chore: Update Langflow Pre-release workflow to include release type in run name 2024-05-27 17:10:25 -03:00
Gabriel Luiz Freitas Almeida
9b2fe24abe
Update pyproject.toml versions and add Docker Build and Push workflow (#1985)
* chore: Update pyproject.toml versions for langflow and langflow-base

* feat(workflows): add Docker Build and Push workflow to automate building and pushing Docker images based on release type and version
feat(workflows): add Pre-release workflow to automate releasing Langflow packages based on release type and version
feat(workflows): create workflow to call Docker Build workflow and handle release creation based on release type
2024-05-27 13:08:28 -07:00
Gabriel Luiz Freitas Almeida
ae44092139
Update chromadb import in ChromaSearch.py and Chroma.py (#1984)
* chore: Update chromadb import in ChromaSearch.py and Chroma.py

* chore: Update ChromaSearch.py and Chroma.py to use chroma_server_http_port
2024-05-27 12:41:52 -07:00
Gabriel Luiz Freitas Almeida
6491496fc0
Update max_tokens attribute to allow unlimited tokens (#1982)
* chore: Update max_tokens attribute to allow unlimited tokens

* update examples
2024-05-27 12:29:28 -07:00
Gabriel Luiz Freitas Almeida
bcec4916d6
Change namespace advanced attribute to False in PineconeSearch (#1981)
chore(PineconeSearch.py): changed namespace advanced attribute to False
2024-05-27 07:23:22 -07:00
Gabriel Luiz Freitas Almeida
56f13c918b
Reorganize repo (#1971)
* chore: Update dockerfile paths and branch name in render.yaml and release.yml

* chore(readthedocs.yaml): remove .readthedocs.yaml file as it is no longer needed
chore(base.Dockerfile): remove base.Dockerfile as it is no longer used in the project
feat(cdk-docker-compose.yml): add cdk-docker-compose.yml file to set up docker-compose for backend and frontend services

* move dockerignore

* chore: Remove test-results/.last-run.json file

* chore: Cache Node.js dependencies during workflow execution

* chore: Remove npm cache from workflow and cache Node.js dependencies

* chore: Update shardIndex and shardTotal values in typescript_test.yml workflow

* chore: Update Playwright test command with shard and worker options
2024-05-27 06:55:32 -07:00
Gabriel Luiz Freitas Almeida
011915d3e8
Ensure flows always have a folder (#1980)
* chore: update settings attributes and remove config.yaml references

* Remove config.yaml references and update settings attributes

* chore: Ensure flows always have a folder

* chore: Update store attribute in check_if_store_is_enabled function
2024-05-27 06:53:29 -07:00
Gabriel Luiz Freitas Almeida
9d5d40f6a6
Fix ownership issue with /app directory in Dockerfile (#1979)
chore: Update Dockerfile to fix ownership issue with /app directory
2024-05-27 06:53:19 -07:00
Mendon Kissling
bd7d8f4e49
[Docs] - Administration folder (#1969)
* video-content

* consolidate-pages

* api

* remove-langfuse-integration

* playground-svg

* update-component-png

* consolidate-items

* status-svgs

* factor-flows-components-collections-docs

* cleanup-page

* component-content

* api-calls

* move-docs

* migration-issues

---------

Co-authored-by: ogabrielluiz <gabriel@langflow.org>
2024-05-27 05:24:30 -07:00
Gabriel Luiz Freitas Almeida
e23544a1b2
Update settings attributes and remove config.yaml references (#1975)
* chore: update settings attributes and remove config.yaml references

* Remove config.yaml references and update settings attributes
2024-05-26 07:24:21 -07:00
chyok
9f2a0d1552
Update deprecated pydantic validator (#1960)
update deprecated pydantic validator
2024-05-26 07:17:58 -07:00
Eliot Zubkoff
98b011f46d
Update CLI command in docs (#1970)
change cli command from  to
2024-05-24 14:00:17 -07:00
Gabriel Luiz Freitas Almeida
4ebfd59b1b
chore: remove unused files and update imports (#1967)
* chore(pyproject.toml): update vulture dependency to version 2.11

* chore: Remove unused files and imports

* Refactor legacy_custom/customs.py by removing unused nodes and chains

* Refactor langflow.interface.custom.base.py by removing unused code

* Refactor test_custom_component.py to import CustomComponent from langflow.custom

* refactor(agents): remove AgentInitializer and OpenAIConversationalAgent components as they are no longer needed
refactor(embeddings): remove client parameter from OpenAIEmbeddingsComponent as it is not used
refactor(memories): change search_scope and search_type parameters in ZepMessageReaderComponent to be of type str
refactor(model_specs): remove examples parameter from ChatVertexAIComponent as it is not used
refactor(models): change metadata parameter type in OllamaModel to Dict for consistency

refactor(VertexAiModel.py): remove examples parameter from ChatVertexAIComponent constructor to simplify the class structure
refactor(MultiQueryRetriever.py): change prompt parameter type to Text for better consistency and readability
refactor(JsonToolkit.py): update build method to handle both json and yaml file types for JsonToolkit creation
refactor(OpenAPIToolkit.py): update build method to handle both json and yaml file types for JsonSpec creation and improve parameter naming for clarity

* Format json

* refactor(langflow.custom): update imports in code files to use the new langflow.custom module

* chore(settings.py): remove unused settings file and related imports and classes from the project.

* refactor(langflow): optimize imports in graph/__init__.py and graph/graph/base.py
refactor(langflow): remove unused code and simplify logic in vertex/base.py

refactor(types.py): remove unused imports and classes, clean up commented out code, and improve code readability by removing unnecessary methods and attributes

refactor(utils.py): remove unused functions is_basic_type, invoke_lc_runnable, generate_result
feat(load): add new functionality to load flow from JSON file or object and run flow from JSON file or object
feat(load): add new modules load.py and __init__.py for loading and running flow from JSON
feat(processing): remove unused functions get_result_and_steps, flush_langfuse_callback_if_present

refactor(process.py): remove unused functions and imports to clean up the codebase
feat(utils.py): remove unused file utils.py to declutter the project and improve maintainability
test(test_loading.py): update import paths after restructuring the project folders
2024-05-24 13:13:38 -07:00
Gabriel Luiz Freitas Almeida
8230434e19
Add CLI command to create API key for default superuser with AUTO_LOGIN enabled (#1965)
* chore: Add CLI command to create API key for default superuser with AUTO_LOGIN enabled

* chore: Add pyperclip dependency for cross-platform clipboard functionality

* chore: Update API key banner to copy the key to clipboard

* chore: Update langchainhub package version to 0.1.16 and openai package version to 1.30.3

* chore: Update pre-commit hooks to fix mixed line endings and trailing whitespace in Python, JavaScript, and TypeScript files

* style(__main__.py): add type ignore comment for import of pyperclip to suppress type checking error
2024-05-24 13:05:15 -07:00
ogabrielluiz
d5d6f2b4fb feat(pyproject.toml): update package versions to 1.0.0a37 for langflow and 0.0.48 for langflow-base
feat(pyproject.toml): add '-n auto' option to pytest addopts to run tests in parallel for faster execution
2024-05-23 22:12:58 -03:00