Skip to content

Commit 1b84cf3

Browse files
committed
Return workflow result from basic starter's main
@Traceable captures the decorated function's return value as the LangSmith trace output, so implicitly returning None left the trace's output field empty. Return `result` (and annotate the return type) so the trace shows the workflow response.
1 parent 66ec144 commit 1b84cf3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

langsmith_tracing/basic/starter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
project_name=PROJECT_NAME,
2323
tags=["client-side"],
2424
)
25-
async def main():
25+
async def main() -> str:
2626
add_temporal_runs = "--add-temporal-runs" in sys.argv
2727

2828
config = ClientConfig.load_client_connect_config()
@@ -45,6 +45,7 @@ async def main():
4545
task_queue="langsmith-basic-task-queue",
4646
)
4747
print(f"Workflow result: {result}")
48+
return result
4849

4950

5051
if __name__ == "__main__":

0 commit comments

Comments
 (0)