Commit graph

1,183 commits

Author SHA1 Message Date
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
Gabriel Luiz Freitas Almeida
e59966bff8 refactor: Update set_run_id method to accept only uuid.UUID or None as run_id parameter 2024-06-21 21:49:22 -07:00
Gabriel Luiz Freitas Almeida
cada4e8570 refactor: Add optional type hint for extra parameter in add_result_pair method 2024-06-21 21:49:22 -07:00
Gabriel Luiz Freitas Almeida
5405809e90 🐛 (custom_component.py): fix an issue where the code was trying to access model_dump method on message object without checking if it is an instance of BaseModel class 2024-06-21 21:49:22 -07:00
Gabriel Luiz Freitas Almeida
88a8294d90 ♻️ (chat.py): remove unnecessary type hint for graph variable to improve code readability and consistency 2024-06-21 21:49:22 -07:00
ming luo
17adc8b5a5 fix unit test 2024-06-21 20:55:42 -07:00
ming luo
1bf668a941 kubernetes secret manager 2024-06-21 20:55:42 -07:00
ming luo
c2b9f22172 poetry run ruff format . 2024-06-21 20:55:42 -07:00
ming luo
e416c7a0c6 fix test and ruff 2024-06-21 20:55:42 -07:00
ming luo
59f96c2ea3 add varaible service base 2024-06-21 20:55:42 -07:00
Gabriel Luiz Freitas Almeida
977181fd22 refactor: Update TracingService to use defaultdict for inputs and outputs 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
1e7b92a44c Update build_component_and_get_results function to use the private _tracing_service variable for improved encapsulation and code organization. 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
bf57cb8e43 refactor: Add child link dictionary to LangSmithTracer class 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
cdcd70464a refactor: Update logging functionality to support asynchronous processing 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
c11c18d719 📝 (service.py): add async tracing
📝 (log.py): add LoggableType to define the type of log messages in the schema
📝 (schema.py): import LoggableType from log.py to use in defining the type of log messages in the Log class
📝 (service.py): add asyncio functionality to log_worker method for processing logs asynchronously
📝 (service.py): add start, flush, and stop methods to manage the logging worker task asynchronously
📝 (service.py): change initialize_tracers method to be asynchronous and start the logging worker
📝 (service.py): add async functionality to end method to stop the logging worker
📝 (service.py): change add_log method to be asynchronous and use asyncio to start the logging worker if not running
📝 (service.py): change contextmanager to asynccontextmanager for trace_context method to handle asynchronous operations
2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
2cac7b472f 🐛 (chat.py): Call 'initialize_run()' method on the 'graph' object after retrieving it from cache to ensure proper initialization 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
d20efe4bba (utils.py): add initialization of run and cache setting for the graph to improve performance and functionality 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
9991c6ea4c refactor: Update Component class to use private _tracing_service variable 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
2affde4dbf refactor: Update build_component_and_get_results function to handle custom components and base components separately 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
6e7a5fa7bd refactor: Update CustomComponent to use private _tracing_service variable 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
94df7be2dd refactor: Update logs to outputs in CustomComponent and TracingService classes 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
36681d2d34 refactor: Update logs to outputs in ComponentVertex and ResultDataResponse classes 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
1c6047b269 refactor: Set run ID to a random UUID if not provided in set_run_id method 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
ebb7f545ad refactor: Update end_all_traces method to accept error parameter 2024-06-21 20:04:20 -07:00