docent-python 0.1.24a0__tar.gz → 0.1.25a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of docent-python might be problematic. Click here for more details.
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/PKG-INFO +1 -1
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/openai.py +6 -1
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/trace.py +29 -6
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/pyproject.toml +1 -1
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/.gitignore +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/LICENSE.md +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/README.md +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/data_models/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/data_models/exceptions.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/data_models/llm_output.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/llm_cache.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/llm_svc.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/model_registry.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/anthropic.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/common.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/google.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/openrouter.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/preference_types.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/provider_registry.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_log_util/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_log_util/logger.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/_tiktoken_util.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/agent_run.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/chat/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/chat/content.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/chat/message.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/chat/tool.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/citation.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/judge.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/metadata_util.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/regex.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/remove_invalid_citation_ranges.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/shared_types.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/transcript.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/data_models/util.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/analysis.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/impl.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/runner.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/stats.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/types.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/util/forgiving_json.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/util/meta_schema.json +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/util/meta_schema.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/util/parse_output.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/judges/util/voting.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/loaders/load_inspect.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/py.typed +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/samples/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/samples/load.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/samples/log.eval +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/samples/tb_airline.json +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/sdk/__init__.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/sdk/agent_run_writer.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/sdk/client.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/trace_temp.py +0 -0
- {docent_python-0.1.24a0 → docent_python-0.1.25a0}/uv.lock +0 -0
|
@@ -18,8 +18,13 @@ from openai import (
|
|
|
18
18
|
PermissionDeniedError,
|
|
19
19
|
RateLimitError,
|
|
20
20
|
UnprocessableEntityError,
|
|
21
|
-
omit,
|
|
22
21
|
)
|
|
22
|
+
try:
|
|
23
|
+
from openai import omit
|
|
24
|
+
except ImportError:
|
|
25
|
+
from openai import Omit as _OpenAIOmit
|
|
26
|
+
|
|
27
|
+
omit = _OpenAIOmit()
|
|
23
28
|
from openai.types.chat import (
|
|
24
29
|
ChatCompletion,
|
|
25
30
|
ChatCompletionAssistantMessageParam,
|
|
@@ -129,6 +129,8 @@ class DocentTracer:
|
|
|
129
129
|
lambda: itertools.count(0)
|
|
130
130
|
)
|
|
131
131
|
self._transcript_counter_lock = threading.Lock()
|
|
132
|
+
self._transcript_group_states: dict[str, dict[str, Optional[str]]] = {}
|
|
133
|
+
self._transcript_group_state_lock = threading.Lock()
|
|
132
134
|
self._flush_lock = threading.Lock()
|
|
133
135
|
|
|
134
136
|
def get_current_agent_run_id(self) -> Optional[str]:
|
|
@@ -888,6 +890,27 @@ class DocentTracer:
|
|
|
888
890
|
)
|
|
889
891
|
return
|
|
890
892
|
|
|
893
|
+
with self._transcript_group_state_lock:
|
|
894
|
+
state: dict[str, Optional[str]] = self._transcript_group_states.setdefault(
|
|
895
|
+
transcript_group_id, {}
|
|
896
|
+
)
|
|
897
|
+
final_name: Optional[str] = name if name is not None else state.get("name")
|
|
898
|
+
final_description: Optional[str] = (
|
|
899
|
+
description if description is not None else state.get("description")
|
|
900
|
+
)
|
|
901
|
+
final_parent_transcript_group_id: Optional[str] = (
|
|
902
|
+
parent_transcript_group_id
|
|
903
|
+
if parent_transcript_group_id is not None
|
|
904
|
+
else state.get("parent_transcript_group_id")
|
|
905
|
+
)
|
|
906
|
+
|
|
907
|
+
if final_name is not None:
|
|
908
|
+
state["name"] = final_name
|
|
909
|
+
if final_description is not None:
|
|
910
|
+
state["description"] = final_description
|
|
911
|
+
if final_parent_transcript_group_id is not None:
|
|
912
|
+
state["parent_transcript_group_id"] = final_parent_transcript_group_id
|
|
913
|
+
|
|
891
914
|
payload: Dict[str, Any] = {
|
|
892
915
|
"collection_id": collection_id,
|
|
893
916
|
"transcript_group_id": transcript_group_id,
|
|
@@ -895,12 +918,12 @@ class DocentTracer:
|
|
|
895
918
|
"timestamp": datetime.now(timezone.utc).isoformat(),
|
|
896
919
|
}
|
|
897
920
|
|
|
898
|
-
if
|
|
899
|
-
payload["name"] =
|
|
900
|
-
if
|
|
901
|
-
payload["description"] =
|
|
902
|
-
if
|
|
903
|
-
payload["parent_transcript_group_id"] =
|
|
921
|
+
if final_name is not None:
|
|
922
|
+
payload["name"] = final_name
|
|
923
|
+
if final_description is not None:
|
|
924
|
+
payload["description"] = final_description
|
|
925
|
+
if final_parent_transcript_group_id is not None:
|
|
926
|
+
payload["parent_transcript_group_id"] = final_parent_transcript_group_id
|
|
904
927
|
if metadata is not None:
|
|
905
928
|
payload["metadata"] = metadata
|
|
906
929
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/data_models/exceptions.py
RENAMED
|
File without changes
|
{docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/data_models/llm_output.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/preference_types.py
RENAMED
|
File without changes
|
{docent_python-0.1.24a0 → docent_python-0.1.25a0}/docent/_llm_util/providers/provider_registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|