Commit graph

4,852 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
55f3ceb0ed refactor: Update PromptComponent post_code_processing method
Refactor the post_code_processing method in the PromptComponent class to improve code readability and maintainability. The changes include:

- Import the process_prompt_template function from langflow.base.prompts.api_utils.
- Import the update_template_values function from langflow.template.utils.
- Call the process_prompt_template function to update the template value.
- Update the frontend_node with any values set in the current_build_config.
- Remove unnecessary comments and whitespace.

These changes enhance the overall quality of the code and make it easier to understand and maintain.
2024-06-22 17:39:37 -07:00
Gabriel Luiz Freitas Almeida
a9040a4b4e refactor: Rename post_code_validation method to post_code_processing
The post_code_validation method in the Component class has been renamed to post_code_processing to better reflect its purpose. This change improves code clarity and maintainability.
2024-06-22 17:39:37 -07:00
Gabriel Luiz Freitas Almeida
69b756c35b refactor: Update build_custom_component_template return type
Update the return type of the build_custom_component_template function in utils.py to include the possibility of returning a Component object. This change ensures that the function can handle both CustomComponent and Component objects, improving flexibility and compatibility.
2024-06-22 17:39:37 -07:00
Gabriel Luiz Freitas Almeida
95d666636b refactor: Update post_code_validation method in Component class
Refactor the post_code_validation method in the Component class to improve code readability and maintainability. The changes include:

- Rename the parameters to better reflect their purpose.
- Update the function documentation to provide a clear explanation of the method's purpose.
- Remove unnecessary comments and whitespace.
- Improve variable naming for better clarity.

These changes enhance the overall quality of the code and make it easier to understand and maintain.
2024-06-22 17:39:37 -07:00
Gabriel Luiz Freitas Almeida
63cb3baca4 refactor: move prompt utils to template module 2024-06-22 17:39:37 -07:00
Gabriel Luiz Freitas Almeida
8f051d0c21 refactor: Update prompt validation process in validate.py
Refactor the prompt validation process in validate.py to improve code readability and maintainability. The changes include:

- Update the import statement for process_prompt_template in api_utils.py.
- Remove unused imports from api_utils.py.
- Simplify the post_validate_prompt function by removing unnecessary conditional statements.
- Replace the validate_prompt function call with process_prompt_template in post_validate_prompt.

These changes enhance the efficiency and organization of the prompt validation process.
2024-06-22 17:39:37 -07:00
joaoguilhermeS
55c6168bc7 fix: ruff checker on github format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
98497a376b chore: Updating Weaviate Vector Store parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
43a781b001 chore: Updating Vectara Vector Store parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
23eaccd339 chore: Updating Upstash Vector Store parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
02c8251727 chore: Updating Supabase Vector Store parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
9021974887 chore: Updating Redis Vector Store parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
be9539f420 chore: Updating PGVector Vector Store parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
a97b5eee75 chore: Updating Courchbase Vector Store parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
49ca6c5bf1 chore: Updating Cassandra Vector Store parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
9cc6b2f243 chore: Updating AstraDB parameters format 2024-06-22 16:37:56 -07:00
joaoguilhermeS
9b4cca5a8b fix: ruff checker on github format 2024-06-22 16:37:56 -07:00
Gabriel Luiz Freitas Almeida
c3d912fdab chore: Update import statement in types.py
The import statement in types.py has been updated to use the `typing` module instead of the deprecated `TYPE_CHECKING` constant. This change improves code maintainability and ensures compatibility with the latest Python standards.
2024-06-22 17:24:46 -03:00
Gabriel Luiz Freitas Almeida
15ce43ab93 chore: separated Variable services 2024-06-22 13:10:57 -07:00
Gabriel Luiz Freitas Almeida
74fe785289 fix: make optional import happen only if used 2024-06-22 12:58:07 -07:00
Gabriel Luiz Freitas Almeida
295f2c69db Refactor set_user_agent method in base.py to use proper capitalization
The set_user_agent method in base.py was updated to use proper capitalization for the user agent value. Instead of "langflow", it now uses "Langflow". This change improves consistency and readability in the code.
2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
6b7dcaaef6 refactor: remove model_specs 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
67802d7c4b chore: Remove unused import from MongoDBAtlasVector.py 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
7b93eb1385 chore: Update langflow template field base.py
Refactor langflow template field base.py to improve code readability and maintainability.

- Import additional types from langflow.helpers.custom and langflow.type_extraction.type_extraction modules.
- Add field_validator method to validate field_type.
- Convert type to string if it is a type instance.
- Raise ValueError if type is not a string or a type instance.
2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
7331cb1903 chore: Refactor TextComponent to remove unused code and improve readability 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
2cecfb009f chore: Update RecursiveCharacterTextSplitterComponent method name to split_data 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
cdd30238d9 chore: Refactor MergeDataComponent to remove unused code 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
789bdbb27e chore: Convert result to string in LLMCheckerChain, LLMMathChain, RetrievalQA, RetrievalQAWithSourcesChain, and SQLExecutor components 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
84d4772d5e chore: Adjust FAISS Vector Store parameters format 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
6e88eab7f5 chore: Remove unused vector search component and update vector store parameters format 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
4b495fc0a1 refactor: readds partition_file_to_data 2024-06-22 12:32:54 -07:00
Gabriel Luiz Freitas Almeida
0999ce5ae5 chore: Remove deprecated vector search components 2024-06-22 12:32:54 -07:00
Fendi
ef6ae81c8c fix: upload files error 2024-06-22 11:44:52 -07:00
Cezar Vasconcelos
fb8269c8fc fix: missing uuid import 2024-06-22 18:35:32 +00:00
joaoguilhermeS
e6e0649264 chore: Adjust Faiss Vector Store parameters format 2024-06-22 08:56:54 -07:00
joaoguilhermeS
9eccd0c43b chore: Adjust MongoDB Atlas Vector Store parameters format 2024-06-22 08:56:54 -07:00
joaoguilhermeS
5ba076cd71 chore: Adjust MongoDB Atlas Vector Store serialization 2024-06-22 08:56:54 -07:00
berrytern
8674f5d9a2 <chore>: adjustments on mongo atlas vector store 2024-06-22 08:56:54 -07:00
berrytern
75cb932e7b <chore>: adjustments on redis vector store 2024-06-22 08:56:54 -07:00
berrytern
ab78d0aec6 <feat>: update vectorstores to new format:
- CassandraVectorStoreComponent;
  - CouchbaseVectorStoreComponent;
  - FaissVectorStoreComponent;
  - MongoVectorStoreComponent;
  - PGVectorStoreComponent;
  - PineconeVectorStoreComponent;
  - QdrantVectorStoreComponent;
  - SupabaseVectorStoreComponent;
  - UpstashVectorStoreComponent;
  - VectaraVectorStoreComponent;
  - WeaviateVectorStoreComponent;

Fixes:
  - set token of CassandraVectorStoreComponent as secret;
  - set couchbase_password of CouchbaseVectorStoreComponent
as secret;
  - set mongodb_atlas_cluster_uri of MongoVectorStoreCompon
ent as secret;
  - set pg_server_url of PGVectorStoreComponent as secret;
  - set pinecone_api_key of PineconeVectorStoreComponent as
secret;
  - set api_key of QdrantVectorStoreComponent as secret;
  - set supabase_service_key of SupabaseVectorStoreComponen
t as secret;
  - set index_token of UpstashVectorStoreComponent as secre
t;
  - set vectara_api_key of VectaraVectorStoreComponent as s
ecret;
  - set api_key of WeaviateVectorStoreComponent as secret;
2024-06-22 08:56:54 -07:00
italojohnny
270d8595bd remove debug log line 2024-06-22 08:23:30 -07:00
italojohnny
91f4513723 try a new approach to resolve request cancellation
https://github.com/tiangolo/fastapi/discussions/11360
2024-06-22 08:23:30 -07:00
italojohnny
55806ed293 discard old approach 2024-06-22 08:23:30 -07:00
italojohnny
2a88176a8e Discard old approach and implement a simple solution 2024-06-22 08:23:30 -07:00
italojohnny
95e7f3882c decorate functions with decorator 2024-06-22 08:23:30 -07:00
italojohnny
90f456b2a9 add decorator to cancel disconnected requests
https://github.com/RedRoserade/fastapi-disconnect-example/blob/main/app.py
2024-06-22 08:23:30 -07:00
italojohnny
da5eec8fc7 fix: add trace_name parameter to method call 2024-06-22 07:55:13 -07:00
Gabriel Luiz Freitas Almeida
78fbbaed1f refactor: Remove unused socketio code from main.py 2024-06-21 21:49:22 -07:00
Gabriel Luiz Freitas Almeida
4175fc13f6 🔧 (Makefile): add 'update' target to run 'poetry update' command for updating dependencies
🔧 (pyproject.toml): update version to "1.0.0rc0" for the 'langflow' package
🔧 (pyproject.toml): update version to "0.0.73" for the 'langflow-base' package
🔧 (pyproject.toml): remove 'python-socketio' dependency and update other dependencies to specific versions
2024-06-21 21:49:22 -07:00
Gabriel Luiz Freitas Almeida
2fa4ebd036 📝 (service.py): Add Optional import from typing to allow for Optional type hint
♻️ (service.py): Refactor variable declarations and type annotations for better code readability and maintainability
📝 (service.py): Update method signatures and type annotations for better clarity and consistency
2024-06-21 21:49:22 -07:00