Fixed issue 1520 - the collect_metrics options for the app is now taken into account for all actions (#1680)
This commit is contained in:
@@ -535,6 +535,7 @@ class EmbedChain(JSONSerializable):
|
||||
)
|
||||
|
||||
# Send anonymous telemetry
|
||||
if self.config.collect_metrics:
|
||||
self.telemetry.capture(event_name="query", properties=self._telemetry_props)
|
||||
|
||||
if citations:
|
||||
@@ -647,6 +648,7 @@ class EmbedChain(JSONSerializable):
|
||||
self.llm.add_history(self.config.id, input_query, answer, session_id=session_id)
|
||||
|
||||
# Send anonymous telemetry
|
||||
if self.config.collect_metrics:
|
||||
self.telemetry.capture(event_name="chat", properties=self._telemetry_props)
|
||||
|
||||
if citations:
|
||||
@@ -679,6 +681,7 @@ class EmbedChain(JSONSerializable):
|
||||
list[dict]: A list of dictionaries, each containing the 'context' and 'metadata' of a document.
|
||||
"""
|
||||
# Send anonymous telemetry
|
||||
if self.config.collect_metrics:
|
||||
self.telemetry.capture(event_name="search", properties=self._telemetry_props)
|
||||
|
||||
if raw_filter and where:
|
||||
@@ -729,6 +732,7 @@ class EmbedChain(JSONSerializable):
|
||||
self.db.reset()
|
||||
self.delete_all_chat_history(app_id=self.config.id)
|
||||
# Send anonymous telemetry
|
||||
if self.config.collect_metrics:
|
||||
self.telemetry.capture(event_name="reset", properties=self._telemetry_props)
|
||||
|
||||
def get_history(
|
||||
|
||||
Reference in New Issue
Block a user