Commit graph

7,066 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
7002abe939 Bump version to 0.6.1 in pyproject.toml 2023-12-13 18:22:22 -03:00
Gabriel Luiz Freitas Almeida
d243cfd98f Add time_elapsed variable to track the elapsed time during stream_build() 2023-12-13 18:10:48 -03:00
Gabriel Luiz Freitas Almeida
a2336aa7c8 Refactor vertex class selection in Graph class 2023-12-13 10:38:25 -03:00
Gabriel Luiz Freitas Almeida
f109a4097e Refactor code and fix imports 2023-12-12 17:57:56 -03:00
Gabriel Luiz Freitas Almeida
155e441406 Fix various bugs and make improvements 2023-12-12 17:02:37 -03:00
Gabriel Luiz Freitas Almeida
5f237313b9 Remove "code" parameter from VectorStoreVertex and ChainVertex 2023-12-12 16:58:56 -03:00
Gabriel Luiz Freitas Almeida
08db9e0586 Update version to 0.6.0 2023-12-12 16:54:57 -03:00
Gabriel Luiz Freitas Almeida
eb660ce26f New lock 2023-12-12 16:53:53 -03:00
Gabriel Luiz Freitas Almeida
e36b929aa7 Fix import formatting and add dynamic field flag 2023-12-12 16:52:58 -03:00
Gabriel Luiz Freitas Almeida
18b4e33062 🐛 fix(flows.py): remove unused import statement to improve code cleanliness and maintainability
🐛 fix(flows.py): change Flow.from_orm() to Flow.model_validate() to ensure data integrity and validation
🐛 fix(users.py): remove unused import statements to improve code cleanliness and maintainability
🐛 fix(users.py): change User.from_orm() to User.model_validate() to ensure data integrity and validation
🐛 fix(LLMChain.py): remove unused import statements to improve code cleanliness and maintainability
🐛 fix(LLMChain.py): remove unnecessary line breaks to improve code readability
🐛 fix(base.py): remove unused import statements to improve code cleanliness and maintainability
🐛 fix(base.py): remove unnecessary line breaks to improve code readability
🐛 fix(base.py): fix condition to append vertex_id to top_level_vertices to avoid appending non-string values
🐛 fix(vertex/base.py): add parent_node_id attribute to Vertex class to support hierarchical graph structures
🐛 fix(base.py): remove unused import statements to improve code cleanliness and maintainability

🚀 feat(GroupTest): add a new node for a simple chat with a custom prompt template and conversational memory buffer

ℹ️ This commit adds a new node to the GroupTest project. The node is a genericNode with the following properties:
- Width: 384
- Height: 621
- ID: ChatOpenAI-rUJ1b
- Type: genericNode
- Position: x: 170.87326389541306, y: 465.8628482073749
- Data:
  - Type: ChatOpenAI
  - Node:
    - Template:
      - Callbacks:
        - Required: false
        - Placeholder: ""
        - Show: false
        - Multiline: false
        - Password: false
        - Name: callbacks
        - Advanced: false
        - Dynamic: false
        - Info: ""
        - Type: langchain.callbacks.base.BaseCallbackHandler
        - List: true
      - Cache:
        - Required: false
        - Placeholder: ""
        - Show: false
        - Multiline: false
        - Password: false
        - Name: cache
        - Advanced: false
        - Dynamic: false
        - Info: ""
        - Type: bool
        - List: false
      - Client:
        - Required: false
        - Placeholder: ""
        - Show: false
        - Multiline: false
        - Password: false
        - Name: client
        - Advanced: false
        - Dynamic: false
        - Info: ""
        - Type: Any
        - List: false
      - Max Retries:
        - Required: false
        - Placeholder: ""
        - Show: false
        - Multiline: false
        - Value: 6
        - Password: false
        - Name: max_retries
        - Advanced: false
        - Dynamic: false
        - Info: ""
        - Type: int
        - List: false
      - Max Tokens:
        - Required: false
        - Placeholder: ""
        - Show: true
        - Multiline: false
        - Password: true
        - Name: max_tokens
        - Advanced: false
        - Dynamic: false
        - Info: ""
        - Type: int
        - List: false

🔧 chore: fix formatting issue in code
📝 docs: update documentation link for `OpenAI` Chat large language models API

🔧 chore: update prompt template configuration in LLMChain node
📝 docs: add documentation link for PromptTemplate in the description

📝 chore(grouped_chat.json): add grouped_chat.json test data file

This commit adds the `grouped_chat.json` file to the `tests/data` directory. The file contains a JSON object representing grouped chat data. This file is necessary for testing and will be used in the test suite.

📝 chore(one_group_chat.json): add one_group_chat.json test data file

This commit adds the one_group_chat.json file, which contains a simple chat with a custom prompt template and conversational memory buffer. This file is used for testing purposes.

🔧 chore: update node configuration for ConversationBufferMemory, ChatOpenAI, and LLMChain
📝 docs: update documentation links for ConversationBufferMemory and LLMChain

🔧 fix: update prompt template in LLMChain to include conversation history and text input variables
🔧 fix: update ConversationBufferMemory node to include description and documentation link

🎨 style: format and organize code for better readability and maintainability

🆕 feat(Vector Store): add Vector Store agent and Vector Store Info node

The Vector Store agent allows querying a Vector Store. It can be used to construct an agent from a Vector Store. The Vector Store Info node provides information about a Vector Store.

The Vector Store agent and Vector Store Info node are added to support the functionality of querying a Vector Store.

🔧 chore: update configuration options in the OpenAI API client

The configuration options in the OpenAI API client have been updated. This commit includes changes to the following options:

- `max_tokens`: Removed the `required` flag and set `show` to `true`
- `metadata`: Set `show` to `false`
- `model_kwargs`: Set `show` to `true` and `advanced` to `true`
- `model_name`: Added options `gpt-3.5-turbo-0613`, `gpt-3.5-turbo`, `gpt-3.5-turbo-16k-0613`, `gpt-3.5-turbo-16k`, `gpt-4-0613`, `gpt-4-32k-0613`, `gpt-4`, `gpt-4-32k`
- `n`: Removed the `show` flag
- `openai_api_base`: Added `display_name` as "OpenAI API Base" and updated `info` with additional details
- `openai_api_key`: Removed the `required` flag and set `show` to `true`
- `openai_organization`: Removed the `show` flag
- `openai_proxy`: Removed the `show` flag
- `request_timeout`: Removed the `show` flag
- `streaming`: Removed the `show` flag
- `tags`: Removed the `show` flag
- `temperature`: Removed the `show` flag
- `tiktoken_model_name`: Removed the `show` flag
- `verbose`: Removed the `show` flag

🔧 chore: update configuration for ChatOpenAI and Chroma nodes

The configuration for the ChatOpenAI and Chroma nodes has been updated. This includes changes to the allowed_special, disallowed_special, chunk_size, client, deployment, embedding_ctx_length, and max_retries properties. These changes were made to improve the functionality and performance of the nodes.

🔧 chore(config): update OpenAIEmbeddings-YwSvx configuration options

The OpenAIEmbeddings-YwSvx configuration options have been updated to include new fields and values. This commit updates the configuration file to reflect these changes.

🔧 chore(config): update configuration options for OpenAIEmbeddings and Chroma

🔧 chore(config): update configuration options for OpenAIEmbeddings and Chroma to improve flexibility and customization

🔧 chore: update configuration options for RecursiveCharacterTextSplitter and WebBaseLoader in flow

The configuration options for RecursiveCharacterTextSplitter and WebBaseLoader in the flow have been updated. The changes include:

- Persist Directory - Chroma: The persist directory option for Chroma has been modified.
- Search Kwargs - Chroma: The search kwargs option for Chroma has been modified.
- Chunk Overlap - RecursiveCharacterTextSplitter: The chunk overlap option for RecursiveCharacterTextSplitter has been modified.
- Chunk Size - RecursiveCharacterTextSplitter: The chunk size option for RecursiveCharacterTextSplitter has been modified.
- Separator Type - RecursiveCharacterTextSplitter: The separator type option for RecursiveCharacterTextSplitter has been modified.
- Separator - RecursiveCharacterTextSplitter: The separator option for RecursiveCharacterTextSplitter has been modified.
- Metadata - WebBaseLoader: The metadata option for WebBaseLoader has been modified.
- Web Page - WebBaseLoader: The web page option for WebBaseLoader has been modified.

🔧 chore(OpenAIEmbeddings): update OpenAIEmbeddings configuration options

The OpenAIEmbeddings node configuration options have been updated to include the following changes:
- `allowed_special` and `disallowed_special` now accept a list of values instead of a single value
- `chunk_size` now accepts an integer value
- `deployment` now accepts a string value
- `embedding_ctx_length` now accepts an integer value
- `headers` now supports multiline values
- `max_retries` now accepts an integer value
- `model` now accepts a string value
- `model_kwargs` now accepts code input
- `openai_api_base` now accepts a password input
- `openai_api_key` now accepts a password input
- `openai_api_type` now accepts a password input
- `openai_api_version` now accepts a password input
- `openai_organization` has been removed from the configuration options

🔧 chore: update OpenAIEmbeddings configuration options in the UI

The OpenAIEmbeddings configuration options in the UI have been updated to include the following changes:
- Added the `openai_organization` option to specify the OpenAI organization.
- Added the `openai_proxy` option to configure the OpenAI proxy.
- Added the `request_timeout` option to set the request timeout.
- Added the `show_progress_bar` option to control the visibility of the progress bar.
- Changed the `tiktoken_model_name` option to be a password field.
- Updated the documentation link for OpenAIEmbeddings.

This commit updates the configuration options to improve the usability and functionality of the OpenAIEmbeddings module in the UI.

🔧 chore: clean up unused code and remove unnecessary fields in the configuration file
📝 docs: update documentation link for the Chroma vectorstore module

🔧 chore: update configuration options for RecursiveCharacterTextSplitter in flow

The configuration options for the RecursiveCharacterTextSplitter node in the flow have been updated. The following changes were made:

- `chunk_size` option: The default value has been changed to 1000.
- `separator_type` option: The available options have been updated to include "Text", "cpp", "go", "html", "java", "js", "latex", "markdown", "php", "proto", "python", "rst", "ruby", "rust", "scala", "sol", and "swift".
- `separators` option: The default value has been changed to ".".

These changes were made to improve the usability and flexibility of the RecursiveCharacterTextSplitter node in the flow.

📝 chore(vector_store_grouped.json): add vector_store_grouped.json test data file

🔀 chore(vector_store_grouped.json): add vector_store_grouped.json test data file

🔨 refactor(test_graph.py): reformat import statements and improve code readability
🔨 refactor(test_prompts_template.py): change dynamic attribute to True for input variables, output parser, partial variables, template, and validate template
🔨 refactor(test_template.py): reformat import statements and remove duplicate import of BaseModel
🔨 refactor(test_template.py): update value for options in format_dict test
2023-12-12 16:46:41 -03:00
Gabriel Luiz Freitas Almeida
e3a2abacae Merge remote-tracking branch 'origin/dev' into merge 2023-12-12 15:45:53 -03:00
Gabriel Luiz Freitas Almeida
6084825cbe Refactor code to improve performance and readability 2023-12-12 15:33:35 -03:00
Gabriel Luiz Freitas Almeida
2f8cb0d776 Add new files and update existing files 2023-12-12 15:33:10 -03:00
Gabriel Luiz Freitas Almeida
bcc58cfe6a 📝 docs(README.md): update documentation to include new parameters for completeness and clarity
The README.md file has been updated to include information about two new parameters: `--backend-only` and `store`. These parameters allow users to customize the behavior of Langflow, especially in development or specialized deployment scenarios. The `--backend-only` parameter allows running only the backend server without the frontend, and it can also be set using the `LANGFLOW_BACKEND_ONLY` environment variable. The `store` parameter enables the store features by default, and it can be deactivated using the `--no-store` option or the `LANGFLOW_STORE` environment variable.
2023-12-12 13:50:47 -03:00
Gabriel Luiz Freitas Almeida
9770f67227 🐛 fix(types/components/index.ts): add duration field to validationStatusType to match the changes in chat.py
🐛 fix(chat.py): fix typo in variable name, change time_elapded to time_elapsed for consistency and readability
🐛 fix(chat.py): remove redundant duration information from params field in response object
 feat(chat.py): add duration field to response object to provide information about the time taken for the build process
🐛 fix(GenericNode/index.tsx): fix formatting issue in displaying duration and params in GenericNode component
🐛 fix(GenericNode/index.tsx): fix type annotation for line variable in map function
2023-12-12 13:28:49 -03:00
Gabriel Luiz Freitas Almeida
e3dcd9b926 Update dependencies in pyproject.toml 2023-12-12 10:01:44 -03:00
Gabriel Luiz Freitas Almeida
ccc457dbdb Add format_elapsed_time function to utils.py and display build duration in stream_build 2023-12-12 10:01:13 -03:00
Gabriel Luiz Freitas Almeida
9c58bfc584 🔧 chore(utils.py): refactor import statement to improve code readability and maintainability
🔧 chore(utils.py): refactor assignment of langchain.llm_cache to use a setter function for better encapsulation
2023-12-11 22:12:59 -03:00
Gabriel Luiz Freitas Almeida
05df751132 🐛 fix(utils.py): check if value_dict["value"] and value_dict["file_path"] are truthy before updating template field value and file path value respectively 2023-12-11 21:46:01 -03:00
Gabriel Luiz Freitas Almeida
debf495cf9 Refactor format_template field in FrontendNode 2023-12-11 21:45:32 -03:00
cristhianzl
cb39d77667 fix(EditFlowSettingsComponent): add handleFocus function to fix double-click text selection issue in input fields 2023-12-11 21:32:09 -03:00
Lucas Oliveira
c5eb7d9e62 Changed icon 2023-12-11 19:50:37 -03:00
Gabriel Luiz Freitas Almeida
55d10b35b1 Refactor loading.py: Import modules and handle
retriever in instantiate_custom_component()
2023-12-11 19:11:34 -03:00
Lucas Oliveira
e8dca57e60 Fixed alert naming when sharing 2023-12-11 18:49:07 -03:00
Lucas Oliveira
6ca00b35d1 Fixed Share icon and disposition 2023-12-11 18:45:48 -03:00
anovazzi1
6b2f432327 fix(flowsContext.tsx): add a setTimeout to prevent updating state with wrong data
The setTimeout function is added to delay the execution of the addFlowToLocalState function by 200 milliseconds. This is done to prevent updating the state with incorrect data.
2023-12-11 17:57:49 -03:00
Gabriel Luiz Freitas Almeida
617acef214 Fix ValueError in ChromaComponent 2023-12-11 17:27:16 -03:00
Gabriel Luiz Freitas Almeida
8432d15482
Remove console.log statements, fix embedding parameter order, and improve formatting (#1199) 2023-12-11 17:06:50 -03:00
Gabriel Luiz Freitas Almeida
0e7a1e75e4 🐛 fix(base.py): exclude format_template field from serialization to prevent it from being included in the serialized output
 feat(base.py): add format_template field to FrontendNode class to control whether the template should be formatted or not during serialization
🐛 fix(custom_components.py): exclude format_template field from serialization to prevent it from being included in the serialized output
 feat(custom_components.py): add format_template field to CustomComponentFrontendNode class to control whether the template should be formatted or not during serialization
2023-12-11 17:05:24 -03:00
Gabriel Luiz Freitas Almeida
2ae11c335c Fix formatting in types.py 2023-12-11 17:04:41 -03:00
Gabriel Luiz Freitas Almeida
6b996e2843 Fix embedding parameter order in ChromaComponent
constructor
2023-12-11 17:03:28 -03:00
cristhianzl
e7530a4ca5 Merge branch 'dev' of github.com:logspace-ai/langflow into dev 2023-12-11 16:54:02 -03:00
cristhianzl
e7affbd34e fixing tests 2023-12-11 16:53:52 -03:00
Gabriel Luiz Freitas Almeida
a8a5cb35e3 Remove console.log statements from FloatComponent 2023-12-11 16:49:19 -03:00
anovazzi1
002b8667a8 fix(PageComponent): add flow and flow.data as dependencies to useEffect to ensure proper cleanup and prevent memory leaks 2023-12-11 16:48:14 -03:00
Gabriel Luiz Freitas Almeida
aec93df799 Fix handling of empty string values in Vertex
class
2023-12-11 16:14:18 -03:00
Gabriel Luiz Freitas Almeida
e91b14373a Fix ChromaComponent document validation 2023-12-11 16:09:15 -03:00
Gabriel Luiz Freitas Almeida
a0cf3c3a02
Update frontend dependencies (#1198) 2023-12-11 15:10:34 -03:00
Gabriel Luiz Freitas Almeida
c59f87c420 🔒 chore(frontend): update @adobe/css-tools to version 4.3.2 for security and bug fixes
🔒 chore(frontend): update @babel/code-frame to version 7.23.5 for bug fixes
🔒 chore(frontend): update @babel/generator to version 7.23.6 for bug fixes
🔒 chore(frontend): update @babel/helper-string-parser to version 7.23.4 for bug fixes
🔒 chore(frontend): update @babel/highlight to version 7.23.4 for bug fixes
🔒 chore(frontend): update @babel/parser to version 7.23.6 for bug fixes
🔒 chore(frontend): update @babel/traverse to version 7.23.6 for bug fixes
🔒 chore(frontend): update @babel/types to version 7.23.6 for bug fixes
🔒 chore(frontend): update vite to version 4.5.1 for bug fixes

⬆️ chore(frontend): update dependencies

- Update `@babel/code-frame` from version 7.22.13 to 7.23.5
- Update `@babel/generator` from version 7.23.3 to 7.23.6
- Update `@babel/helper-string-parser` from version 7.22.5 to 7.23.4
- Update `@babel/highlight` from version 7.22.20 to 7.23.4
- Update `@babel/parser` from version 7.23.3 to 7.23.6
- Update `@babel/traverse` from version 7.23.3 to 7.23.6
- Update `@babel/types` from version 7.23.3 to 7.23.6
- Update `vite` from version 4.5.0 to 4.5.1

These updates include bug fixes, performance improvements, and new features.
2023-12-11 15:09:07 -03:00
Gabriel Luiz Freitas Almeida
6011cd5693
chore(deps-dev): bump vite from 4.5.0 to 4.5.1 in /src/frontend (#1181) 2023-12-11 15:04:09 -03:00
Gabriel Luiz Freitas Almeida
3ef418a630
chore(deps-dev): bump browserify-sign from 4.2.1 to 4.2.2 in /docs (#1090) 2023-12-11 15:03:37 -03:00
Gabriel Luiz Freitas Almeida
5bb6231279
Bump axios, @docusaurus/core, @docusaurus/plugin-ideal-image, @docusaurus/preset-classic, @docusaurus/theme-classic and @docusaurus/theme-search-algolia in /docs (#1197) 2023-12-11 15:03:09 -03:00
dependabot[bot]
4a4ceb6caf
Bump axios, @docusaurus/core, @docusaurus/plugin-ideal-image, @docusaurus/preset-classic, @docusaurus/theme-classic and @docusaurus/theme-search-algolia
Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus), [@docusaurus/plugin-ideal-image](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-plugin-ideal-image), [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic), [@docusaurus/theme-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-theme-classic) and [@docusaurus/theme-search-algolia](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-theme-search-algolia). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus)

Updates `@docusaurus/plugin-ideal-image` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus-plugin-ideal-image)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus-preset-classic)

Updates `@docusaurus/theme-classic` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus-theme-classic)

Updates `@docusaurus/theme-search-algolia` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus-theme-search-algolia)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/plugin-ideal-image"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
- dependency-name: "@docusaurus/theme-classic"
  dependency-type: direct:production
- dependency-name: "@docusaurus/theme-search-algolia"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 18:01:08 +00:00
Gabriel Luiz Freitas Almeida
bf114172b9
Fix various issues and refactor codebase (#1196) 2023-12-11 14:59:20 -03:00
Gabriel Luiz Freitas Almeida
65cf389bff Refactor BaiduQianfanChatEndpoints.py to use
SecretStr for sensitive keys
2023-12-11 14:53:53 -03:00
Gabriel Luiz Freitas Almeida
094a80b50a Fix test_superuser assertion 2023-12-11 14:46:37 -03:00
Gabriel Luiz Freitas Almeida
9e0d115161 Remove textmon because it breaks tests 2023-12-11 14:45:53 -03:00
Gabriel Luiz Freitas Almeida
c8f2469c9f Refactor field handling in frontend nodes 2023-12-11 12:58:31 -03:00
Gabriel Luiz Freitas Almeida
a651d680ee Refactor custom component template creation to use FrontendNode 2023-12-11 12:39:29 -03:00
Gabriel Luiz Freitas Almeida
d6ad55ca4a Fix default value for name field 2023-12-11 12:35:08 -03:00