gllm-inference-binary 0.5.3__cp312-cp312-manylinux_2_31_x86_64.whl → 0.5.5__cp312-cp312-manylinux_2_31_x86_64.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.
Potentially problematic release.
This version of gllm-inference-binary might be problematic. Click here for more details.
- gllm_inference/prompt_builder/prompt_builder.pyi +8 -5
- gllm_inference/schema/attachment.pyi +12 -0
- gllm_inference.cpython-312-x86_64-linux-gnu.so +0 -0
- {gllm_inference_binary-0.5.3.dist-info → gllm_inference_binary-0.5.5.dist-info}/METADATA +1 -1
- {gllm_inference_binary-0.5.3.dist-info → gllm_inference_binary-0.5.5.dist-info}/RECORD +6 -6
- {gllm_inference_binary-0.5.3.dist-info → gllm_inference_binary-0.5.5.dist-info}/WHEEL +0 -0
|
@@ -11,13 +11,13 @@ class PromptBuilder:
|
|
|
11
11
|
system_template (str): The system prompt template. May contain placeholders enclosed in curly braces `{}`.
|
|
12
12
|
user_template (str): The user prompt template. May contain placeholders enclosed in curly braces `{}`.
|
|
13
13
|
prompt_key_set (set[str]): A set of expected keys that must be present in the prompt templates.
|
|
14
|
-
|
|
14
|
+
key_defaults (dict[str, str]): Default values for the keys in the prompt templates.
|
|
15
15
|
"""
|
|
16
16
|
system_template: Incomplete
|
|
17
17
|
user_template: Incomplete
|
|
18
18
|
prompt_key_set: Incomplete
|
|
19
|
-
|
|
20
|
-
def __init__(self, system_template: str = '', user_template: str = '', ignore_extra_keys: bool =
|
|
19
|
+
key_defaults: Incomplete
|
|
20
|
+
def __init__(self, system_template: str = '', user_template: str = '', key_defaults: dict[str, str] | None = None, ignore_extra_keys: bool | None = None) -> None:
|
|
21
21
|
"""Initializes a new instance of the PromptBuilder class.
|
|
22
22
|
|
|
23
23
|
Args:
|
|
@@ -25,8 +25,11 @@ class PromptBuilder:
|
|
|
25
25
|
braces `{}`. Defaults to an empty string.
|
|
26
26
|
user_template (str, optional): The user prompt template. May contain placeholders enclosed in curly
|
|
27
27
|
braces `{}`. Defaults to an empty string.
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
key_defaults (dict[str, str] | None, optional): Default values for the keys in the prompt templates.
|
|
29
|
+
Applied when the corresponding keys are not provided in the runtime input.
|
|
30
|
+
Defaults to None, in which case no default values will be assigned to the keys.
|
|
31
|
+
ignore_extra_keys (bool | None, optional): Deprecated parameter. Will be removed in v0.6. Extra keys
|
|
32
|
+
will always raise a warning only instead of raising an error.
|
|
30
33
|
|
|
31
34
|
Raises:
|
|
32
35
|
ValueError: If both `system_template` and `user_template` are empty.
|
|
@@ -32,6 +32,18 @@ class Attachment(BaseModel):
|
|
|
32
32
|
Attachment: The instantiated Attachment.
|
|
33
33
|
"""
|
|
34
34
|
@classmethod
|
|
35
|
+
def from_base64(cls, base64_data: str, filename: str | None = None) -> Attachment:
|
|
36
|
+
"""Creates an Attachment from a base64 string.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
base64_data (str): The base64 string of the file.
|
|
40
|
+
filename (str | None, optional): The filename of the file. Defaults to None,
|
|
41
|
+
in which case the filename will be derived from the mime type.
|
|
42
|
+
|
|
43
|
+
Returns:
|
|
44
|
+
Attachment: The instantiated Attachment.
|
|
45
|
+
"""
|
|
46
|
+
@classmethod
|
|
35
47
|
def from_data_url(cls, data_url: str, filename: str | None = None) -> Attachment:
|
|
36
48
|
"""Creates an Attachment from a data URL (data:[mime/type];base64,[bytes]).
|
|
37
49
|
|
|
Binary file
|
|
@@ -59,7 +59,7 @@ gllm_inference/output_parser/__init__.pyi,sha256=WQOOgsYnPk8vd-SOhFMMaVTzy4gkYrO
|
|
|
59
59
|
gllm_inference/output_parser/json_output_parser.pyi,sha256=uulh91uQLMSb4ZXZhHYi9W9w7zGnmrOweEkL6wdDJN8,2933
|
|
60
60
|
gllm_inference/output_parser/output_parser.pyi,sha256=Yzk7F26pH8Uc7FQZo4G6l67YkfppefUvaV9cNK-HyDs,948
|
|
61
61
|
gllm_inference/prompt_builder/__init__.pyi,sha256=kshfBMvwIwiIvjxiGG5BrJZNvpPa8rhtkbHo5FPifBg,117
|
|
62
|
-
gllm_inference/prompt_builder/prompt_builder.pyi,sha256=
|
|
62
|
+
gllm_inference/prompt_builder/prompt_builder.pyi,sha256=zDKN0JWn23DPM73sCe-qpXT4d32Izis94K5aNpzLaoM,3278
|
|
63
63
|
gllm_inference/prompt_formatter/__init__.pyi,sha256=rTsjfRsT-y00qH67fPewMNPMN1fAO2y7DM9scR1ccm0,740
|
|
64
64
|
gllm_inference/prompt_formatter/agnostic_prompt_formatter.pyi,sha256=c9mN4t8LXn79h8wq8DAeWYwMgmZGzXjP7EcjLpwfNZg,2018
|
|
65
65
|
gllm_inference/prompt_formatter/huggingface_prompt_formatter.pyi,sha256=AJ-D11HBhTKBA1B5s0km_K1R6o5HD1yvdbGoL7SpGhI,2729
|
|
@@ -71,7 +71,7 @@ gllm_inference/request_processor/__init__.pyi,sha256=hVnfdNZnkTBJHnmLtN3Na4ANP0y
|
|
|
71
71
|
gllm_inference/request_processor/lm_request_processor.pyi,sha256=7pVNb2GwITb1jTflZP498qZ321G15b16jayZuuhuO1o,5424
|
|
72
72
|
gllm_inference/request_processor/uses_lm_mixin.pyi,sha256=He-ytjwv2H5Hn312WFBAlBK96ALKTtDO3AT_80hCGTg,2321
|
|
73
73
|
gllm_inference/schema/__init__.pyi,sha256=bJeO_4fCFPmYrVZ-4RQw0eQn62X228pB0w2tYDM-oek,1238
|
|
74
|
-
gllm_inference/schema/attachment.pyi,sha256=
|
|
74
|
+
gllm_inference/schema/attachment.pyi,sha256=jApuzjOHJDCz4lr4MlHzBgIndh559nbWu2Xp1fk3hso,3297
|
|
75
75
|
gllm_inference/schema/code_exec_result.pyi,sha256=ZTHh6JtRrPIdQ059P1UAiD2L-tAO1_S5YcMsAXfJ5A0,559
|
|
76
76
|
gllm_inference/schema/enums.pyi,sha256=Nvc_Qsd8yyiH_tCtymN39O6EZ0DT_wxYHmlKLllxC00,605
|
|
77
77
|
gllm_inference/schema/lm_output.pyi,sha256=GafJV0KeD-VSwWkwG1oz-uruXrQ7KDZTuoojPCBRpg8,1956
|
|
@@ -86,8 +86,8 @@ gllm_inference/utils/__init__.pyi,sha256=npmBmmlBv7cPHMg1hdL3S2_RelD6vk_LhCsGELh
|
|
|
86
86
|
gllm_inference/utils/langchain.pyi,sha256=VluQiHkGigDdqLUbhB6vnXiISCP5hHqV0qokYY6dC1A,1164
|
|
87
87
|
gllm_inference/utils/validation.pyi,sha256=toxBtRp-VItC_X7sNi-GDd7sjibBdWMrR0q01OI2D7k,385
|
|
88
88
|
gllm_inference.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
|
|
89
|
-
gllm_inference.cpython-312-x86_64-linux-gnu.so,sha256=
|
|
89
|
+
gllm_inference.cpython-312-x86_64-linux-gnu.so,sha256=cs5rvo39mVMNKmH7-l2hFevL-w5-HZPyZNwb8sygFBc,3920392
|
|
90
90
|
gllm_inference.pyi,sha256=VEcscbPCJ-6lXU4jV3YYXwwumk9kWxpCAsS84ssKG6o,3295
|
|
91
|
-
gllm_inference_binary-0.5.
|
|
92
|
-
gllm_inference_binary-0.5.
|
|
93
|
-
gllm_inference_binary-0.5.
|
|
91
|
+
gllm_inference_binary-0.5.5.dist-info/METADATA,sha256=S9vLvAj1-yAb0qsT4OWsW2J6gHgJxgoIejXF_lRnoEU,4531
|
|
92
|
+
gllm_inference_binary-0.5.5.dist-info/WHEEL,sha256=mNY4pwQL4AOAoPmLYEQs2SSpMIbATFeiJFktRD5iKkY,110
|
|
93
|
+
gllm_inference_binary-0.5.5.dist-info/RECORD,,
|
|
File without changes
|