Skip to content

Commit 38aa5a1

Browse files
committed
chore: add save tracing file option
1 parent b93cfd1 commit 38aa5a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

veadk/runner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ async def run(
145145
messages: RunnerMessage,
146146
session_id: str,
147147
stream: bool = False,
148+
save_tracing_file: bool = False,
148149
):
149150
converted_messages: list = self._convert_messages(messages)
150151

@@ -159,7 +160,8 @@ async def run(
159160
final_output = await self._run(session_id, converted_message, stream)
160161

161162
# try to save tracing file
162-
self.save_tracing_file(session_id)
163+
if save_tracing_file:
164+
self.save_tracing_file(session_id)
163165

164166
return final_output
165167

@@ -173,6 +175,7 @@ def save_tracing_file(self, session_id: str) -> str:
173175
return ""
174176

175177
if not self.agent.tracers:
178+
logger.warning(("No tracer found in your agent. Skip dump tracing file."))
176179
return ""
177180

178181
try:

0 commit comments

Comments
 (0)