mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-26 18:35:38 +08:00
refactor: remove beta diagnostics collection and reporting (#2616)
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from langbot.pkg.telemetry import diagnostics
|
||||
|
||||
import abc
|
||||
import typing
|
||||
import time
|
||||
@@ -100,7 +98,6 @@ class RuntimeProvider:
|
||||
raise WorkspaceInvariantError('LLM invocation requires an ExecutionContext when query is absent')
|
||||
return execution_context
|
||||
|
||||
@diagnostics.observe('api', 'model.invoke_llm', source='agent')
|
||||
async def invoke_llm(
|
||||
self,
|
||||
query: pipeline_query.Query | None,
|
||||
@@ -185,7 +182,6 @@ class RuntimeProvider:
|
||||
except Exception as monitor_err:
|
||||
self.requester.ap.logger.error(f'[Monitoring] Failed to record LLM call: {monitor_err}')
|
||||
|
||||
@diagnostics.observe('api', 'model.invoke_llm_stream', source='agent')
|
||||
async def invoke_llm_stream(
|
||||
self,
|
||||
query: pipeline_query.Query | None,
|
||||
@@ -268,7 +264,6 @@ class RuntimeProvider:
|
||||
except Exception as monitor_err:
|
||||
self.requester.ap.logger.error(f'[Monitoring] Failed to record LLM stream call: {monitor_err}')
|
||||
|
||||
@diagnostics.observe('api', 'model.invoke_embedding', source='agent')
|
||||
async def invoke_embedding(
|
||||
self,
|
||||
model: RuntimeEmbeddingModel,
|
||||
@@ -336,7 +331,6 @@ class RuntimeProvider:
|
||||
except Exception as monitor_err:
|
||||
self.requester.ap.logger.error(f'[Monitoring] Failed to record embedding call: {monitor_err}')
|
||||
|
||||
@diagnostics.observe('api', 'model.invoke_rerank', source='agent')
|
||||
async def invoke_rerank(
|
||||
self,
|
||||
model: RuntimeRerankModel,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from langbot.pkg.telemetry import diagnostics
|
||||
|
||||
import typing
|
||||
import time
|
||||
import inspect
|
||||
@@ -475,7 +473,6 @@ class ToolManager:
|
||||
)
|
||||
return result
|
||||
|
||||
@diagnostics.observe('api', 'tool.execute', source='agent', stage='execute')
|
||||
async def execute_func_call(
|
||||
self,
|
||||
name: str,
|
||||
|
||||
Reference in New Issue
Block a user