mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 20:14:16 +00:00
Trace scheduled, webhook, search, MCP and graph-extraction runs
run_agent_headless records each unattended run under its endpoint; the scheduler passes its run id and the webhook worker its task id so Logs rows can find their trace, while the LLM's own request id stays untouched for quota counts. /api/search and MCP search_docs record their retrieval, and a graph build records every extraction call under one step.
This commit is contained in:
1 parent
bae842d151
commit
5d0992eef8
9 files changed
+344
-15
No files matched your search
@@ -23,6 +23,7 @@ import logging
|
||||
import re
|
||||
from typing import Any, Callable, Dict, List, Optional
|
||||
|
||||
from docsgpt import tracing
|
||||
from docsgpt.core.model_utils import (
|
||||
get_api_key_for_provider,
|
||||
get_provider_from_model_id,
|
||||
@@ -353,7 +354,9 @@ def extract_graph_for_source(
|
||||
if pool is not None:
|
||||
# ``map`` yields in submission order, so chunks are still applied in
|
||||
# the order they were given and a run stays reproducible.
|
||||
prepared = pool.map(_prepare, items)
|
||||
# Pool threads don't inherit context; carry the trace in so each
|
||||
# chunk's extraction LLM call is recorded.
|
||||
prepared = pool.map(tracing.wrap(_prepare), items)
|
||||
else:
|
||||
prepared = (_prepare(item) for item in items)
|
||||
missed = []
|
||||
|
||||
Reference in new issue
Block a user