Commit graph

1,170 commits

Author SHA1 Message Date
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
Gabriel Luiz Freitas Almeida
60642faf71 refactor: Update Component class to include dynamic inputs in get_trace_as_inputs method 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
3cba1380de 🐛 (chat.py): fix issue where end_all_traces method was not being called correctly with the required arguments
💡 (chat.py): improve error handling by passing error message to end_all_traces method and ensure it is called with the correct arguments
2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
44a23ebef4 refactor: Add error handling to TracingService methods 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
277baff204 📝 (starter_projects): Update trace_type attribute to "prompt" for consistency and clarity in starter projects JSON files.
 (VectorStore-RAG-Flows.json): Update class inheritance to LCEmbeddingsModel for OpenAIEmbeddingsComponent to align with changes in the codebase
📝 (VectorStore-RAG-Flows.json): Add trace_type attribute to PromptComponent class for better tracking and identification of components

📝 (VectorStore-RAG-Flows.json): update import path for LCEmbeddingsModel in OpenAIEmbeddingsComponent to match new file structure and improve code organization.
2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
e1a0de8133 chore: Add trace_type attribute to FlowToolComponent 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
e124ac1a75 chore: Add trace_type attribute to PromptComponent 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
83795a8c7a chore: Add trace_type attribute to LCVectorStoreComponent 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
25b4f94b33 chore: Add trace_type attribute to LCModelComponent 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
2f04ac3e44 chore: Add LCEmbeddingsModel class for handling embeddings in langflow 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
935aefcdea chore: Refactor Component class to include tracing functionality 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
a6e9972f4b (utils.py): Add functionality to trace runs
🔧 (chat.py): Remove redundant setting of run_id in retrieve_vertices_order function
🔧 (chat.py): Remove setting of run_id in build_vertex function and add end_all_traces method call when no next_runnable_vertices
🔧 (base.py): Add logic to set run_name based on flow name and flow id, and end all traces with metadata in Graph class
2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
1909acca52 Refactor input classes to include traceability and metadata support 2024-06-21 20:04:20 -07:00
Gabriel Luiz Freitas Almeida
9e4a414682 chore: Refactor loading.py to improve component instantiation and build process 2024-06-21 20:04:20 -07:00