langflow/src/backend/base
Gabriel Luiz Freitas Almeida 5f0e74e5d2
fix(tracing_service): use correct trace name and attribute name (#2484)
* fix(tracing_service): use correct trace name and attribute name

* fix: update tracing_service attribute name in LCModelComponent

* feat: add trace_name property in CustomComponent

* fix: update trace_name usage in Component build method

* feat: update log method in CustomComponent to use trace_name

* fix: update trace_name usage in Component build method

* feat(custom_component): add logs to CustomComponent

The `CustomComponent` class now includes a `_logs` attribute to store log messages. This attribute is initialized as an empty list in the constructor. The `log` method has been updated to accept an optional `name` parameter, which allows specifying a custom name for the log message. If no name is provided, a default name is generated based on the number of logs already stored.

This change enhances the logging functionality of the `CustomComponent` and provides more flexibility in managing log messages.

* feat(tracing_service): add logs to TracingService

This commit adds a `_logs` attribute to the `TracingService` class to store log messages. The attribute is initialized as a defaultdict of lists in the constructor. The `add_log` method has been updated to append logs to the corresponding trace name in the `_logs` dictionary. This change enhances the logging functionality of the `TracingService` and allows for better management of log messages.

* chore(tracing_service): improve error handling in stop method

* refactor(tracing/service.py): update _logs data structure to support both Log objects and generic dictionaries for flexibility in handling different types of data

refactor(tracing/service.py): add conditional check to only add metadata if it is provided for better control over the information being added

* refactor: update build_model method return type annotation

* refactor(CohereModel.py): update return type of build_model method to only LanguageModel for clarity and consistency

* chore(GroqModel.py): add stop_sequences parameter to GroqModel query method

* refactor(AstraDB.py): reorganize imports and update cached_vectorstore type

* refactor: update cached_vectorstore type and input order in CassandraVectorStoreComponent

* chore(GroqModel.py): remove unused stop_sequences parameter in GroqModel query method
2024-07-02 11:49:27 -07:00
..
langflow fix(tracing_service): use correct trace name and attribute name (#2484) 2024-07-02 11:49:27 -07:00
poetry.lock fix(security): require langchain-experimental>=0.0.61 (#2476) 2024-07-02 18:09:21 +02:00
pyproject.toml fix(security): require langchain-experimental>=0.0.61 (#2476) 2024-07-02 18:09:21 +02:00
README.md 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00