braintrust 0.3.8__tar.gz → 0.3.10__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.
- {braintrust-0.3.8 → braintrust-0.3.10}/PKG-INFO +4 -1
- {braintrust-0.3.8 → braintrust-0.3.10}/setup.py +1 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/_generated_types.py +52 -9
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/install/api.py +0 -24
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/push.py +2 -1
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/conftest.py +9 -0
- braintrust-0.3.10/src/braintrust/contrib/__init__.py +5 -0
- braintrust-0.3.10/src/braintrust/contrib/temporal/__init__.py +438 -0
- braintrust-0.3.10/src/braintrust/contrib/temporal/test_temporal.py +502 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/framework2.py +19 -1
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/generated_types.py +5 -1
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/logger.py +20 -9
- braintrust-0.3.10/src/braintrust/test_framework2.py +233 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_logger.py +43 -1
- braintrust-0.3.10/src/braintrust/version.py +4 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust.egg-info/PKG-INFO +4 -1
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust.egg-info/SOURCES.txt +4 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust.egg-info/requires.txt +8 -0
- braintrust-0.3.8/src/braintrust/version.py +0 -4
- {braintrust-0.3.8 → braintrust-0.3.10}/README.md +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/setup.cfg +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/audit.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/aws.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/bt_json.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/__main__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/eval.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/install/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/install/bump_versions.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/install/logs.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/install/redshift.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/cli/install/run_migrations.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/context.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/db_fields.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/auth.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/cache.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/cors.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/dataset.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/eval_hooks.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/schemas.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/server.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/test_cached_login.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/test_lru_cache.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/devserver/test_server_integration.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/framework.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/functions/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/functions/constants.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/functions/invoke.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/functions/stream.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/git_fields.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/gitutil.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/graph_util.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/http_headers.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/id_gen.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/merge_row_batch.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/oai.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/object.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/otel/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/otel/context.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/otel/test_distributed_tracing.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/otel/test_otel_bt_integration.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/parameters.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/prompt.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/prompt_cache/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/prompt_cache/disk_cache.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/prompt_cache/lru_cache.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/prompt_cache/prompt_cache.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/prompt_cache/test_disk_cache.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/prompt_cache/test_lru_cache.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/prompt_cache/test_prompt_cache.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/py.typed +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/queue.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/resource_manager.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/score.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/serializable_data_class.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/span_identifier_v1.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/span_identifier_v2.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/span_identifier_v3.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/span_identifier_v4.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/span_types.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_framework.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_helpers.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_id_gen.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_otel.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_queue.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_serializable_data_class.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_span_components.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_util.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/test_version.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/util.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/_anthropic_utils.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/agno/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/agno/agent.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/agno/function_call.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/agno/model.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/agno/team.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/agno/utils.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/anthropic.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/claude_agent_sdk/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/claude_agent_sdk/_wrapper.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/claude_agent_sdk/test_wrapper.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/dspy.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/google_genai/__init__.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/langchain.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/litellm.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/openai.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/test_agno.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/test_anthropic.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/test_dspy.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/test_google_genai.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/test_litellm.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/test_openai.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/test_pydantic_ai.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/wrappers/test_utils.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust/xact_ids.py +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust.egg-info/dependency_links.txt +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust.egg-info/entry_points.txt +0 -0
- {braintrust-0.3.8 → braintrust-0.3.10}/src/braintrust.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: braintrust
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.10
|
|
4
4
|
Summary: SDK for integrating Braintrust
|
|
5
5
|
Home-page: https://www.braintrust.dev
|
|
6
6
|
Author: Braintrust
|
|
@@ -35,6 +35,8 @@ Provides-Extra: otel
|
|
|
35
35
|
Requires-Dist: opentelemetry-api; extra == "otel"
|
|
36
36
|
Requires-Dist: opentelemetry-sdk; extra == "otel"
|
|
37
37
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http; extra == "otel"
|
|
38
|
+
Provides-Extra: temporal
|
|
39
|
+
Requires-Dist: temporalio>=1.19.0; python_version >= "3.10" and extra == "temporal"
|
|
38
40
|
Provides-Extra: all
|
|
39
41
|
Requires-Dist: boto3; extra == "all"
|
|
40
42
|
Requires-Dist: openai-agents; extra == "all"
|
|
@@ -44,6 +46,7 @@ Requires-Dist: opentelemetry-sdk; extra == "all"
|
|
|
44
46
|
Requires-Dist: psycopg2-binary; extra == "all"
|
|
45
47
|
Requires-Dist: pydoc-markdown; extra == "all"
|
|
46
48
|
Requires-Dist: starlette; extra == "all"
|
|
49
|
+
Requires-Dist: temporalio>=1.19.0; python_version >= "3.10" and extra == "all"
|
|
47
50
|
Requires-Dist: uv; extra == "all"
|
|
48
51
|
Requires-Dist: uvicorn; extra == "all"
|
|
49
52
|
Dynamic: author
|
|
@@ -29,6 +29,7 @@ extras_require = {
|
|
|
29
29
|
"doc": ["pydoc-markdown"],
|
|
30
30
|
"openai-agents": ["openai-agents"],
|
|
31
31
|
"otel": ["opentelemetry-api", "opentelemetry-sdk", "opentelemetry-exporter-otlp-proto-http"],
|
|
32
|
+
"temporal": ["temporalio>=1.19.0; python_version>='3.10'"],
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
extras_require["all"] = sorted({package for packages in extras_require.values() for package in packages})
|
|
@@ -212,6 +212,17 @@ CallEvent = Union[
|
|
|
212
212
|
]
|
|
213
213
|
|
|
214
214
|
|
|
215
|
+
class ChatCompletionContentPartFileFile(TypedDict):
|
|
216
|
+
file_data: NotRequired[Optional[str]]
|
|
217
|
+
filename: NotRequired[Optional[str]]
|
|
218
|
+
file_id: NotRequired[Optional[str]]
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class ChatCompletionContentPartFileWithTitle(TypedDict):
|
|
222
|
+
file: ChatCompletionContentPartFileFile
|
|
223
|
+
type: Literal['file']
|
|
224
|
+
|
|
225
|
+
|
|
215
226
|
class ChatCompletionContentPartImageWithTitleImageUrl(TypedDict):
|
|
216
227
|
url: str
|
|
217
228
|
detail: NotRequired[Optional[Union[Literal['auto'], Literal['low'], Literal['high']]]]
|
|
@@ -342,7 +353,7 @@ class ChatCompletionTool(TypedDict):
|
|
|
342
353
|
|
|
343
354
|
|
|
344
355
|
class CodeBundleRuntimeContext(TypedDict):
|
|
345
|
-
runtime: Literal['node', 'python']
|
|
356
|
+
runtime: Literal['node', 'python', 'browser']
|
|
346
357
|
version: str
|
|
347
358
|
|
|
348
359
|
|
|
@@ -570,7 +581,7 @@ class Data(CodeBundle):
|
|
|
570
581
|
|
|
571
582
|
|
|
572
583
|
class FunctionDataFunctionData1DataRuntimeContext(TypedDict):
|
|
573
|
-
runtime: Literal['node', 'python']
|
|
584
|
+
runtime: Literal['node', 'python', 'browser']
|
|
574
585
|
version: str
|
|
575
586
|
|
|
576
587
|
|
|
@@ -649,7 +660,7 @@ class FunctionIdFunctionId3(TypedDict):
|
|
|
649
660
|
|
|
650
661
|
|
|
651
662
|
class FunctionIdFunctionId4InlineContext(TypedDict):
|
|
652
|
-
runtime: Literal['node', 'python']
|
|
663
|
+
runtime: Literal['node', 'python', 'browser']
|
|
653
664
|
version: str
|
|
654
665
|
|
|
655
666
|
|
|
@@ -668,16 +679,16 @@ class FunctionIdFunctionId4(TypedDict):
|
|
|
668
679
|
FunctionIdRef = Mapping[str, Any]
|
|
669
680
|
|
|
670
681
|
|
|
671
|
-
FunctionObjectType = Literal['prompt', 'tool', 'scorer', 'task', 'agent']
|
|
682
|
+
FunctionObjectType = Literal['prompt', 'tool', 'scorer', 'task', 'agent', 'custom_view']
|
|
672
683
|
|
|
673
684
|
|
|
674
685
|
FunctionOutputType = Literal['completion', 'score', 'any']
|
|
675
686
|
|
|
676
687
|
|
|
677
|
-
FunctionTypeEnum = Literal['llm', 'scorer', 'task', 'tool']
|
|
688
|
+
FunctionTypeEnum = Literal['llm', 'scorer', 'task', 'tool', 'custom_view']
|
|
678
689
|
|
|
679
690
|
|
|
680
|
-
FunctionTypeEnumNullish = Literal['llm', 'scorer', 'task', 'tool']
|
|
691
|
+
FunctionTypeEnumNullish = Literal['llm', 'scorer', 'task', 'tool', 'custom_view']
|
|
681
692
|
|
|
682
693
|
|
|
683
694
|
class GitMetadataSettings(TypedDict):
|
|
@@ -1854,7 +1865,7 @@ class AnyModelParams(TypedDict):
|
|
|
1854
1865
|
function_call: NotRequired[Optional[Union[Literal['auto'], Literal['none'], AnyModelParamsFunctionCall]]]
|
|
1855
1866
|
n: NotRequired[Optional[float]]
|
|
1856
1867
|
stop: NotRequired[Optional[Sequence[str]]]
|
|
1857
|
-
reasoning_effort: NotRequired[Optional[Literal['minimal', 'low', 'medium', 'high']]]
|
|
1868
|
+
reasoning_effort: NotRequired[Optional[Literal['none', 'minimal', 'low', 'medium', 'high']]]
|
|
1858
1869
|
verbosity: NotRequired[Optional[Literal['low', 'medium', 'high']]]
|
|
1859
1870
|
top_k: NotRequired[Optional[float]]
|
|
1860
1871
|
stop_sequences: NotRequired[Optional[Sequence[str]]]
|
|
@@ -1894,7 +1905,11 @@ class AttachmentStatus(TypedDict):
|
|
|
1894
1905
|
"""
|
|
1895
1906
|
|
|
1896
1907
|
|
|
1897
|
-
ChatCompletionContentPart = Union[
|
|
1908
|
+
ChatCompletionContentPart = Union[
|
|
1909
|
+
ChatCompletionContentPartTextWithTitle,
|
|
1910
|
+
ChatCompletionContentPartImageWithTitle,
|
|
1911
|
+
ChatCompletionContentPartFileWithTitle,
|
|
1912
|
+
]
|
|
1898
1913
|
|
|
1899
1914
|
|
|
1900
1915
|
class ChatCompletionMessageParamChatCompletionMessageParam1(TypedDict):
|
|
@@ -1993,6 +2008,14 @@ class DatasetEvent(TypedDict):
|
|
|
1993
2008
|
Whether this span is a root span
|
|
1994
2009
|
"""
|
|
1995
2010
|
origin: NotRequired[Optional[ObjectReferenceNullish]]
|
|
2011
|
+
comments: NotRequired[Optional[Sequence[Any]]]
|
|
2012
|
+
"""
|
|
2013
|
+
Optional list of comments attached to this event
|
|
2014
|
+
"""
|
|
2015
|
+
audit_data: NotRequired[Optional[Sequence[Any]]]
|
|
2016
|
+
"""
|
|
2017
|
+
Optional list of audit entries attached to this event
|
|
2018
|
+
"""
|
|
1996
2019
|
|
|
1997
2020
|
|
|
1998
2021
|
class Experiment(TypedDict):
|
|
@@ -2075,7 +2098,7 @@ class ModelParamsModelParams(TypedDict):
|
|
|
2075
2098
|
function_call: NotRequired[Optional[Union[Literal['auto'], Literal['none'], ModelParamsModelParamsFunctionCall]]]
|
|
2076
2099
|
n: NotRequired[Optional[float]]
|
|
2077
2100
|
stop: NotRequired[Optional[Sequence[str]]]
|
|
2078
|
-
reasoning_effort: NotRequired[Optional[Literal['minimal', 'low', 'medium', 'high']]]
|
|
2101
|
+
reasoning_effort: NotRequired[Optional[Literal['none', 'minimal', 'low', 'medium', 'high']]]
|
|
2079
2102
|
verbosity: NotRequired[Optional[Literal['low', 'medium', 'high']]]
|
|
2080
2103
|
|
|
2081
2104
|
|
|
@@ -2327,6 +2350,14 @@ class ExperimentEvent(TypedDict):
|
|
|
2327
2350
|
Whether this span is a root span
|
|
2328
2351
|
"""
|
|
2329
2352
|
origin: NotRequired[Optional[ObjectReferenceNullish]]
|
|
2353
|
+
comments: NotRequired[Optional[Sequence[Any]]]
|
|
2354
|
+
"""
|
|
2355
|
+
Optional list of comments attached to this event
|
|
2356
|
+
"""
|
|
2357
|
+
audit_data: NotRequired[Optional[Sequence[Any]]]
|
|
2358
|
+
"""
|
|
2359
|
+
Optional list of audit entries attached to this event
|
|
2360
|
+
"""
|
|
2330
2361
|
|
|
2331
2362
|
|
|
2332
2363
|
class GraphNodeGraphNode7(TypedDict):
|
|
@@ -2437,6 +2468,18 @@ class ProjectLogsEvent(TypedDict):
|
|
|
2437
2468
|
"""
|
|
2438
2469
|
span_attributes: NotRequired[Optional[SpanAttributes]]
|
|
2439
2470
|
origin: NotRequired[Optional[ObjectReferenceNullish]]
|
|
2471
|
+
comments: NotRequired[Optional[Sequence[Any]]]
|
|
2472
|
+
"""
|
|
2473
|
+
Optional list of comments attached to this event
|
|
2474
|
+
"""
|
|
2475
|
+
audit_data: NotRequired[Optional[Sequence[Any]]]
|
|
2476
|
+
"""
|
|
2477
|
+
Optional list of audit entries attached to this event
|
|
2478
|
+
"""
|
|
2479
|
+
_async_scoring_state: NotRequired[Optional[Any]]
|
|
2480
|
+
"""
|
|
2481
|
+
The async scoring state for this event
|
|
2482
|
+
"""
|
|
2440
2483
|
|
|
2441
2484
|
|
|
2442
2485
|
class ProjectScore(TypedDict):
|
|
@@ -4,7 +4,6 @@ import textwrap
|
|
|
4
4
|
import time
|
|
5
5
|
|
|
6
6
|
from botocore.exceptions import ClientError
|
|
7
|
-
|
|
8
7
|
from braintrust.logger import app_conn, login
|
|
9
8
|
|
|
10
9
|
# pylint: disable=no-name-in-module
|
|
@@ -30,8 +29,6 @@ PARAMS = {
|
|
|
30
29
|
"PrivateSubnet2CIDR": "private_subnet_2_cidr",
|
|
31
30
|
"PrivateSubnet3CIDR": "private_subnet_3_cidr",
|
|
32
31
|
"ManagedPostgres": "managed_postgres",
|
|
33
|
-
"ManagedClickhouse": "managed_clickhouse",
|
|
34
|
-
"ClickhouseInstanceType": "clickhouse_instance_type",
|
|
35
32
|
"PostgresVersion": "postgres_version",
|
|
36
33
|
"OutboundRateLimitWindowMinutes": "outbound_rate_limit_window_minutes",
|
|
37
34
|
"OutboundRateLimitMaxRequests": "outbound_rate_limit_max_requests",
|
|
@@ -179,19 +176,6 @@ def build_parser(subparsers, parents):
|
|
|
179
176
|
default=None,
|
|
180
177
|
)
|
|
181
178
|
|
|
182
|
-
# Clickhouse
|
|
183
|
-
parser.add_argument(
|
|
184
|
-
"--managed-clickhouse",
|
|
185
|
-
help="Spin up a Clickhouse Instance for faster analytics",
|
|
186
|
-
default=None,
|
|
187
|
-
choices=[None, "true", "false"],
|
|
188
|
-
)
|
|
189
|
-
parser.add_argument(
|
|
190
|
-
"--clickhouse-instance-type",
|
|
191
|
-
help="The instance type for the Clickhouse instance",
|
|
192
|
-
default=None,
|
|
193
|
-
)
|
|
194
|
-
|
|
195
179
|
# ElastiCacheClusterId
|
|
196
180
|
parser.add_argument("--elasticache-cluster-host", help="The ElastiCacheCluster host to use", default=None)
|
|
197
181
|
parser.add_argument(
|
|
@@ -236,11 +220,6 @@ def build_parser(subparsers, parents):
|
|
|
236
220
|
help="[Advanced] The postgres URL to use (if you are connecting to another VPC)",
|
|
237
221
|
default=None,
|
|
238
222
|
)
|
|
239
|
-
parser.add_argument("--clickhouse-pg-url", help="[Advanced] The clickhouse PG URL to use", default=None)
|
|
240
|
-
parser.add_argument("--clickhouse-connect-url", help="[Advanced] The clickhouse connect URL to use", default=None)
|
|
241
|
-
parser.add_argument(
|
|
242
|
-
"--clickhouse-catchup-etl-arn", help="[Advanced] The clickhouse catchup ETL ARN to use", default=None
|
|
243
|
-
)
|
|
244
223
|
|
|
245
224
|
# To configure your org
|
|
246
225
|
parser.add_argument(
|
|
@@ -321,9 +300,6 @@ def main(args):
|
|
|
321
300
|
PARAMS["ElastiCacheClusterHost"] = "elasticache_cluster_host"
|
|
322
301
|
PARAMS["ElastiCacheClusterPort"] = "elasticache_cluster_port"
|
|
323
302
|
PARAMS["PostgresUrl"] = "postgres_url"
|
|
324
|
-
PARAMS["ClickhouseCatchupEtlArn"] = "clickhouse_catchup_etl_arn"
|
|
325
|
-
PARAMS["ClickhouseConnectUrl"] = "clickhouse_connect_url"
|
|
326
|
-
PARAMS["ClickhousePGUrl"] = "clickhouse_pg_url"
|
|
327
303
|
PARAMS["EnableBrainstore"] = "enable_brainstore"
|
|
328
304
|
PARAMS["BrainstoreInstanceKeyPairName"] = "brainstore_instance_key_pair_name"
|
|
329
305
|
PARAMS["BrainstoreLicenseKey"] = "brainstore_license_key"
|
|
@@ -16,7 +16,6 @@ import zipfile
|
|
|
16
16
|
from typing import Any, Dict, List, Optional
|
|
17
17
|
|
|
18
18
|
import requests
|
|
19
|
-
|
|
20
19
|
from braintrust.framework import _set_lazy_load
|
|
21
20
|
|
|
22
21
|
from .. import api_conn, login, org_id, proxy_conn
|
|
@@ -250,6 +249,8 @@ def _collect_function_function_defs(
|
|
|
250
249
|
},
|
|
251
250
|
"if_exists": f.if_exists if f.if_exists else if_exists,
|
|
252
251
|
}
|
|
252
|
+
if f.metadata is not None:
|
|
253
|
+
j["metadata"] = f.metadata
|
|
253
254
|
if f.parameters is None:
|
|
254
255
|
raise ValueError(f"Function {f.name} has no supplied parameters")
|
|
255
256
|
j["function_schema"] = {
|
|
@@ -36,3 +36,12 @@ def override_app_url_for_tests():
|
|
|
36
36
|
@pytest.fixture(autouse=True)
|
|
37
37
|
def setup_braintrust():
|
|
38
38
|
os.environ.setdefault("GOOGLE_API_KEY", os.getenv("GEMINI_API_KEY", "your_google_api_key_here"))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@pytest.fixture(autouse=True)
|
|
42
|
+
def reset_braintrust_state():
|
|
43
|
+
"""Reset all Braintrust global state after each test."""
|
|
44
|
+
yield
|
|
45
|
+
from braintrust import logger
|
|
46
|
+
|
|
47
|
+
logger._state = logger.BraintrustState()
|