Commit graph

395 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
6854c25dae Merge remote-tracking branch 'origin/dev' into zustand/io/migration 2024-02-06 14:21:50 -03:00
Gabriel Luiz Freitas Almeida
392b81b519 Reapply "Refactor state management to use Zustand, migrate components to CustomComponent and other fixes"
This reverts commit f3b3d2cf68.
2024-02-05 19:02:34 -03:00
Gabriel Luiz Freitas Almeida
f3b3d2cf68
Revert "Refactor state management to use Zustand, migrate components to CustomComponent and other fixes" 2024-02-05 18:29:03 -03:00
Gabriel Luiz Freitas Almeida
1b867586c2 Update OpenAI models and options 2024-02-05 18:17:23 -03:00
Gabriel Luiz Freitas Almeida
c0c64c99c9 Update imports to use langchain_core.documents 2024-02-01 09:37:37 -03:00
Gabriel Luiz Freitas Almeida
c08b277f15 Merge remote-tracking branch 'origin/dev' into zustand/io/migration 2024-01-31 17:54:51 -03:00
Gabriel Luiz Freitas Almeida
44696a9eb4 Refactor locustfile.py: Import modules and reorder code 2024-01-30 16:16:38 -03:00
Gabriel Luiz Freitas Almeida
4b697fc0df Remove vectorstore_creator import and test_vectorstore_template.py 2024-01-30 14:03:33 -03:00
Gabriel Luiz Freitas Almeida
4918f03032 Remove test_agents_template.py and update test_zero_shot_agent, test_json_agent, and test_csv_agent 2024-01-30 11:53:21 -03:00
Gabriel Luiz Freitas Almeida
9968a6b134 Add file upload, download, list, and delete operations 2024-01-28 12:01:08 -03:00
Gabriel Luiz Freitas Almeida
bcd0151e7b Add mime type validation for file download 2024-01-27 00:11:00 -03:00
Gabriel Luiz Freitas Almeida
6fd4ac1bb9 Refactor file deletion test in test_files.py 2024-01-26 23:03:55 -03:00
Gabriel Luiz Freitas Almeida
11c9a84cbe Refactor file operations tests 2024-01-26 22:50:52 -03:00
Gabriel Luiz Freitas Almeida
2e6ea1808d Add unit tests for file upload, download, list, and delete operations 2024-01-26 22:41:21 -03:00
Gabriel Luiz Freitas Almeida
dbf0a2a920 Refactor code and fix minor issues 2024-01-26 09:45:33 -03:00
Gabriel Luiz Freitas Almeida
fccf3eeb25 Fix session loading issues in test cases 2024-01-25 19:44:33 -03:00
Gabriel Luiz Freitas Almeida
103df34d0e Fix test_custom_component.py to call the correct method 2024-01-25 19:44:23 -03:00
Gabriel Luiz Freitas Almeida
abe4925cc3 Refactor imports and update function names 2024-01-25 16:17:40 -03:00
Gabriel Luiz Freitas Almeida
a41ada87ee Fix import and function name in test_loading.py 2024-01-25 16:17:20 -03:00
Gabriel Luiz Freitas Almeida
a76f90157e Refactor login tests and import statements 2024-01-25 16:17:13 -03:00
Gabriel Luiz Freitas Almeida
f527e0a3f1 Update import statement in test_process.py 2024-01-25 16:16:58 -03:00
Gabriel Luiz Freitas Almeida
033bd44412 Refactor imports in test_prompts_template.py 2024-01-25 16:16:40 -03:00
Gabriel Luiz Freitas Almeida
97fa69e535 Fix test_template.py: Update build_template_from_function and test_format_dict 2024-01-25 16:16:35 -03:00
Gabriel Luiz Freitas Almeida
8502898032 Refactor test_setup_superuser.py 2024-01-25 16:16:28 -03:00
Gabriel Luiz Freitas Almeida
b19b317e6b Refactor user tests and fix error handling 2024-01-25 16:16:15 -03:00
Gabriel Luiz Freitas Almeida
a0f7e63f77 Refactor code formatting in locustfile.py 2024-01-25 16:16:03 -03:00
Gabriel Luiz Freitas Almeida
517529ca40 Refactor imports and fix formatting in conftest.py 2024-01-25 16:15:54 -03:00
Gabriel Luiz Freitas Almeida
a6a69a0f3a Fix import statements and formatting issues 2024-01-25 13:03:42 -03:00
anovazzi1
c32a7f9f11 Fix formatting and remove unused imports 2024-01-04 15:58:29 -03:00
abhatt
5ad13e0475 Added Elasticsearch Vector Store 2024-01-03 12:39:17 -08:00
Gabriel Luiz Freitas Almeida
a27c7221bb
Vectara Component Update - feature enhancement (#1219)
### Pull Request for Issue #1217 
[feature
request](https://github.com/logspace-ai/langflow/labels/feature%20request)
[python](https://github.com/logspace-ai/langflow/labels/python)

**Description**
This pull request addresses issue #1217 , which concerns the ability to
add files directly to the Vectara vector store using the indexing API's
file upload feature.

**Changes Made**
I have implemented the ability to add files directly to the Vectara
vector store by providing URLs of documents online. The add_files()
method (as well as from_files()) has been added to facilitate this
functionality.

**Files Modified/Added**
Modified: vectara.py
2023-12-24 20:04:38 -03:00
Gabriel Luiz Freitas Almeida
692a078e29 Remove unused import and test case 2023-12-22 11:21:55 -03:00
Gabriel Luiz Freitas Almeida
113861eb59 Refactor test_custom_component.py 2023-12-22 10:39:59 -03:00
Gabriel Luiz Freitas Almeida
60a55784af Refactor flow loading and processing 2023-12-17 21:27:07 -03:00
Atharva J
df4f158eac test_endpoint.py from main branch 2023-12-18 04:50:10 +05:30
Atharva J
83e9c089a7 yes 2023-12-18 04:50:10 +05:30
Atharva J
8fcf54bcb8 minor - test check trial 2023-12-18 04:50:10 +05:30
Gabriel Luiz Freitas Almeida
7ec8a6c2a8 Refactor code_parser.py and test_custom_component.py 2023-12-14 10:00:43 -03:00
Gabriel Luiz Freitas Almeida
7fdc9bfbd8 Add new code parser and directory reader modules 2023-12-14 09:27:38 -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
094a80b50a Fix test_superuser assertion 2023-12-11 14:46:37 -03:00
Gabriel Luiz Freitas Almeida
a0377c0ac7 🐛 fix(custom_component.py): rename build_template_config method to template_config for better naming consistency
🔧 chore(test_custom_component.py): update test_custom_component_build_template_config to use the renamed template_config property
2023-12-11 12:32:02 -03:00
Gabriel Luiz Freitas Almeida
00f5772d17
Merge branch 'dev' into float_range 2023-12-10 16:52:52 -03:00
Gabriel Luiz Freitas Almeida
cebae56507
Merge branch 'dev' into build_config_with_templatefield 2023-12-10 16:52:21 -03:00
Gabriel Luiz Freitas Almeida
1a348bb220 Fix range_spec key in test_llms_template.py 2023-12-10 16:51:00 -03:00
Gabriel Luiz Freitas Almeida
47b006c2b0 Merge remote-tracking branch 'origin/dev' into float_range 2023-12-10 16:11:08 -03:00
Gabriel Luiz Freitas Almeida
d82b98c58b Update import statement for TemplateField 2023-12-10 15:54:33 -03:00
Gabriel Luiz Freitas Almeida
d670d0fd93 Add test for custom component with TemplateField 2023-12-10 15:48:51 -03:00
Gabriel Luiz Freitas Almeida
6ea7454fe3 Add range_spec to llms_template.py 2023-12-10 11:41:01 -03:00