baml-py 0.201.0__cp38-abi3-musllinux_1_1_aarch64.whl → 0.202.0__cp38-abi3-musllinux_1_1_aarch64.whl
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.
- baml_py/__init__.py +4 -0
- baml_py/baml_py.abi3.so +0 -0
- baml_py/baml_py.pyi +96 -18
- baml_py/safe_import.py +1 -1
- {baml_py-0.201.0.dist-info → baml_py-0.202.0.dist-info}/METADATA +1 -1
- {baml_py-0.201.0.dist-info → baml_py-0.202.0.dist-info}/RECORD +9 -9
- {baml_py-0.201.0.dist-info → baml_py-0.202.0.dist-info}/WHEEL +1 -1
- {baml_py-0.201.0.dist-info → baml_py-0.202.0.dist-info}/entry_points.txt +0 -0
- {baml_py-0.201.0.dist-info → baml_py-0.202.0.dist-info}/licenses/LICENSE +0 -0
baml_py/__init__.py
CHANGED
@@ -9,6 +9,8 @@ from .baml_py import (
|
|
9
9
|
BamlImagePy as Image,
|
10
10
|
BamlAudioPy as Audio,
|
11
11
|
invoke_runtime_cli,
|
12
|
+
BamlPdfPy as Pdf,
|
13
|
+
BamlVideoPy as Video,
|
12
14
|
ClientRegistry,
|
13
15
|
# Collector utilities
|
14
16
|
Collector,
|
@@ -31,6 +33,8 @@ __all__ = [
|
|
31
33
|
"FunctionResultStream",
|
32
34
|
"Image",
|
33
35
|
"Audio",
|
36
|
+
"Pdf",
|
37
|
+
"Video",
|
34
38
|
"invoke_runtime_cli",
|
35
39
|
# Collector types
|
36
40
|
"Collector",
|
baml_py/baml_py.abi3.so
CHANGED
Binary file
|
baml_py/baml_py.pyi
CHANGED
@@ -6,7 +6,9 @@ def get_version() -> str:
|
|
6
6
|
"""Get the version of the BAML Python client."""
|
7
7
|
...
|
8
8
|
|
9
|
-
def set_log_level(
|
9
|
+
def set_log_level(
|
10
|
+
level: Literal["DEBUG", "INFO", "WARN", "ERROR", "OFF"] | str,
|
11
|
+
) -> None:
|
10
12
|
"""Set the log level for the BAML Python client."""
|
11
13
|
...
|
12
14
|
|
@@ -39,7 +41,13 @@ class FunctionResult:
|
|
39
41
|
def __str__(self) -> str: ...
|
40
42
|
# Returns True if the function call was successful, False otherwise
|
41
43
|
def is_ok(self) -> bool: ...
|
42
|
-
def cast_to(
|
44
|
+
def cast_to(
|
45
|
+
self,
|
46
|
+
enum_module: Any,
|
47
|
+
class_module: Any,
|
48
|
+
partial_class_module: Any,
|
49
|
+
allow_partials: bool,
|
50
|
+
) -> Any: ...
|
43
51
|
|
44
52
|
# This is a debug function that returns the internal representation of the response
|
45
53
|
# This is not to be relied upon and is subject to change
|
@@ -97,6 +105,26 @@ class BamlAudioPy:
|
|
97
105
|
def as_url(self) -> str: ...
|
98
106
|
def as_base64(self) -> Tuple[str, str]: ...
|
99
107
|
|
108
|
+
class BamlPdfPy:
|
109
|
+
@staticmethod
|
110
|
+
def from_url(url: str) -> BamlPdfPy: ...
|
111
|
+
@staticmethod
|
112
|
+
def from_base64(media_type: str, base64: str) -> BamlPdfPy: ...
|
113
|
+
def is_url(self) -> bool: ...
|
114
|
+
def is_base64(self) -> bool: ...
|
115
|
+
def as_url(self) -> str: ...
|
116
|
+
def as_base64(self) -> Tuple[str, str]: ...
|
117
|
+
|
118
|
+
class BamlVideoPy:
|
119
|
+
@staticmethod
|
120
|
+
def from_url(url: str) -> BamlVideoPy: ...
|
121
|
+
@staticmethod
|
122
|
+
def from_base64(media_type: str, base64: str) -> BamlVideoPy: ...
|
123
|
+
def is_url(self) -> bool: ...
|
124
|
+
def is_base64(self) -> bool: ...
|
125
|
+
def as_url(self) -> str: ...
|
126
|
+
def as_base64(self) -> Tuple[str, str]: ...
|
127
|
+
|
100
128
|
class RuntimeContextManager:
|
101
129
|
def upsert_tags(self, tags: Dict[str, Any]) -> None: ...
|
102
130
|
def deep_clone(self) -> RuntimeContextManager: ...
|
@@ -196,7 +224,6 @@ class BamlRuntime:
|
|
196
224
|
env_vars: Dict[str, str],
|
197
225
|
) -> Any: ...
|
198
226
|
|
199
|
-
|
200
227
|
class LogEventMetadata:
|
201
228
|
event_id: str
|
202
229
|
parent_id: Optional[str]
|
@@ -280,7 +307,9 @@ class Collector:
|
|
280
307
|
def __print_storage() -> None: ...
|
281
308
|
|
282
309
|
class FunctionLog:
|
283
|
-
def __init__(
|
310
|
+
def __init__(
|
311
|
+
self, name: str, args: Dict[str, Any], result: FunctionResult
|
312
|
+
) -> None: ...
|
284
313
|
def __str__(self) -> str: ...
|
285
314
|
@property
|
286
315
|
def id(self) -> str: ...
|
@@ -301,9 +330,16 @@ class FunctionLog:
|
|
301
330
|
@property
|
302
331
|
def selected_call(self) -> Optional[Union[LLMCall, LLMStreamCall]]: ...
|
303
332
|
|
304
|
-
|
305
333
|
class LLMCall:
|
306
|
-
def __init__(
|
334
|
+
def __init__(
|
335
|
+
self,
|
336
|
+
client_name: str,
|
337
|
+
provider: str,
|
338
|
+
timing: Timing,
|
339
|
+
request: Dict[str, Any],
|
340
|
+
response: Dict[str, Any],
|
341
|
+
usage: Usage,
|
342
|
+
) -> None: ...
|
307
343
|
@property
|
308
344
|
def selected(self) -> bool: ...
|
309
345
|
@property
|
@@ -320,38 +356,80 @@ class LLMCall:
|
|
320
356
|
@property
|
321
357
|
def client_name(self) -> str: ...
|
322
358
|
|
359
|
+
class LLMStreamCall:
|
360
|
+
def __init__(
|
361
|
+
self,
|
362
|
+
client_name: str,
|
363
|
+
provider: str,
|
364
|
+
timing: StreamTiming,
|
365
|
+
request: Dict[str, Any],
|
366
|
+
response: Dict[str, Any],
|
367
|
+
usage: Usage,
|
368
|
+
) -> None: ...
|
369
|
+
@property
|
370
|
+
def selected(self) -> bool: ...
|
371
|
+
@property
|
372
|
+
def http_request(self) -> Optional[HTTPRequest]: ...
|
373
|
+
@property
|
374
|
+
def http_response(self) -> Optional[HTTPResponse]: ...
|
375
|
+
@property
|
376
|
+
def usage(self) -> Usage: ...
|
377
|
+
@property
|
378
|
+
def timing(self) -> Timing: ...
|
379
|
+
@property
|
380
|
+
def provider(self) -> str: ...
|
323
381
|
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
# TODO: add chunks
|
328
|
-
# def chunks(self) -> List[str]: ...
|
382
|
+
# The baml client name / clientregistry name
|
383
|
+
@property
|
384
|
+
def client_name(self) -> str: ...
|
329
385
|
@property
|
330
386
|
def timing(self) -> StreamTiming: ...
|
387
|
+
def sse_responses(self) -> Optional[List[SSEResponse]]: ...
|
388
|
+
|
389
|
+
class SSEResponse:
|
390
|
+
@property
|
391
|
+
def text(self) -> str: ...
|
392
|
+
def json(self) -> Optional[Any]: ...
|
331
393
|
|
332
394
|
class Usage:
|
333
|
-
def __init__(
|
395
|
+
def __init__(
|
396
|
+
self, input_tokens: Optional[int], output_tokens: Optional[int]
|
397
|
+
) -> None: ...
|
334
398
|
@property
|
335
399
|
def input_tokens(self) -> Optional[int]: ...
|
336
400
|
@property
|
337
401
|
def output_tokens(self) -> Optional[int]: ...
|
338
402
|
|
339
403
|
class Timing:
|
340
|
-
def __init__(
|
404
|
+
def __init__(
|
405
|
+
self,
|
406
|
+
start_time: str,
|
407
|
+
end_time: str,
|
408
|
+
duration: Optional[int],
|
409
|
+
time_to_first_parsed_ms: Optional[int],
|
410
|
+
) -> None: ...
|
341
411
|
@property
|
342
412
|
def start_time_utc_ms(self) -> int: ...
|
343
413
|
@property
|
344
414
|
def duration_ms(self) -> Optional[int]: ...
|
345
|
-
@property
|
346
|
-
def time_to_first_parsed_ms(self) -> Optional[int]: ...
|
347
415
|
|
348
416
|
class StreamTiming(Timing):
|
349
|
-
def __init__(
|
417
|
+
def __init__(
|
418
|
+
self,
|
419
|
+
start_time_utc_ms: int,
|
420
|
+
duration_ms: int,
|
421
|
+
time_to_first_parsed_ms: int,
|
422
|
+
time_to_first_token_ms: int,
|
423
|
+
) -> None: ...
|
424
|
+
@property
|
425
|
+
def start_time_utc_ms(self) -> int: ...
|
350
426
|
@property
|
351
|
-
def
|
427
|
+
def duration_ms(self) -> Optional[int]: ...
|
352
428
|
|
353
429
|
class HTTPRequest:
|
354
|
-
def __init__(
|
430
|
+
def __init__(
|
431
|
+
self, url: str, method: str, headers: Dict[str, Any], body: str
|
432
|
+
) -> None: ...
|
355
433
|
@property
|
356
434
|
def id(self) -> str: ...
|
357
435
|
@property
|
baml_py/safe_import.py
CHANGED
@@ -66,7 +66,7 @@ https://boundaryml.com/discord
|
|
66
66
|
raise ImportError(f"""
|
67
67
|
{msg}
|
68
68
|
|
69
|
-
Please
|
69
|
+
Please set baml-py to version "{target_version}".
|
70
70
|
|
71
71
|
$ pip install {self._target_package_name()}
|
72
72
|
$ uv add {self._target_package_name()}
|
@@ -1,17 +1,17 @@
|
|
1
|
-
baml_py-0.
|
2
|
-
baml_py-0.
|
3
|
-
baml_py-0.
|
4
|
-
baml_py-0.
|
1
|
+
baml_py-0.202.0.dist-info/METADATA,sha256=bzzA3IH8sHtXSgD-iHMwzqwDZ6m5syywfhDTu083PkA,335
|
2
|
+
baml_py-0.202.0.dist-info/WHEEL,sha256=VBqZ7yWNVuAHzgY5FGTKps0uNrM9AISwCCgWYYUr00M,106
|
3
|
+
baml_py-0.202.0.dist-info/entry_points.txt,sha256=9Uu_VcUjoI2qQMjVb0PRjEgI6pQ55WqBbzNparAPJyA,54
|
4
|
+
baml_py-0.202.0.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
5
5
|
baml_py.libs/libgcc_s-e52197c3.so.1,sha256=vkPW1Auw6CH9Bjk7frmX3hry_1H9c0tRI0Ncyg71WUI,724137
|
6
|
-
baml_py/__init__.py,sha256=
|
7
|
-
baml_py/baml_py.abi3.so,sha256=
|
8
|
-
baml_py/baml_py.pyi,sha256=
|
6
|
+
baml_py/__init__.py,sha256=wBCtTkuBrwFdfo7AVI5Bxu81lh1wQgcfOU9bkkYAHAk,899
|
7
|
+
baml_py/baml_py.abi3.so,sha256=ub6Y-WE3dQMh78BMJlpKrkpbAs6u99buOhTPKObzn80,51057929
|
8
|
+
baml_py/baml_py.pyi,sha256=WWXAiJE737ENYUxjeJWXYs67ktUVhZP-bDwdcNEHTuo,15461
|
9
9
|
baml_py/ctx_manager.py,sha256=JwWLvxFT05BnYiguzB-k-g47r7mft74L3mYt8e3qtus,6081
|
10
10
|
baml_py/errors.py,sha256=wqv7xT_-pVXQNxD5JbOrrr_CABCFuNrLrEhmEX8RVJ8,389
|
11
11
|
baml_py/internal_monkeypatch.py,sha256=JDwBPw4S8veD3nvJ13lFw8P5p29UOmDvvkgOy8eKA58,2106
|
12
12
|
baml_py/logging.py,sha256=zM-yKPJ3LF4qpIptYQVr5zw_Gjimy3deWlTt4dOzVp0,190
|
13
13
|
baml_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
-
baml_py/safe_import.py,sha256=
|
14
|
+
baml_py/safe_import.py,sha256=ELnT9Jp1Z9ZqLZkbfmqYZ0vJpF-5dc2yshpryqn1UXE,2884
|
15
15
|
baml_py/stream.py,sha256=pNfXDOa-6u4cjANaq071I6AevUx9N7DhDORc18Vh03k,6881
|
16
16
|
baml_py/type_builder.py,sha256=HIAlses70C5DWNWgx3ZwsLeGt5-tviWXCXZiyyWedSg,6374
|
17
|
-
baml_py-0.
|
17
|
+
baml_py-0.202.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|