gllm-inference-binary 0.5.3__cp312-cp312-win_amd64.whl → 0.5.5__cp312-cp312-win_amd64.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.

@@ -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
- ignore_extra_keys (bool): Whether to ignore extra keys when formatting the prompt.
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
- ignore_extra_keys: Incomplete
20
- def __init__(self, system_template: str = '', user_template: str = '', ignore_extra_keys: bool = False) -> None:
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
- ignore_extra_keys (bool, optional): Whether to ignore extra keys when formatting the prompt.
29
- Defaults to False.
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gllm-inference-binary
3
- Version: 0.5.3
3
+ Version: 0.5.5
4
4
  Summary: A library containing components related to model inferences in Gen AI applications.
5
5
  Author: Henry Wicaksono
6
6
  Author-email: henry.wicaksono@gdplabs.id
@@ -59,7 +59,7 @@ gllm_inference/output_parser/__init__.pyi,sha256=dhAeRTBxc6CfS8bhnHjbtrnyqJ1iyff
59
59
  gllm_inference/output_parser/json_output_parser.pyi,sha256=YtgQh8Uzy8W_Tgh8DfuR7VFFS7qvLEasiTwRfaGZZEU,2993
60
60
  gllm_inference/output_parser/output_parser.pyi,sha256=-Xu5onKCBDqShcO-VrQh5icqAmXdihGc3rkZxL93swg,975
61
61
  gllm_inference/prompt_builder/__init__.pyi,sha256=mPsbiafzSNHsgN-CuzjhgZpfXfi1pPC3_gdsq2p0EM4,120
62
- gllm_inference/prompt_builder/prompt_builder.pyi,sha256=tX4wfs3P5C-ti5zT1zW3Rw2wS2VEc-PIQcyZcyR8QL0,2934
62
+ gllm_inference/prompt_builder/prompt_builder.pyi,sha256=ju52smKHT_Bh2EVMZBWe1Z0ZQjD5aPBDLI_xLaILcgo,3334
63
63
  gllm_inference/prompt_formatter/__init__.pyi,sha256=q5sPPrnoCf-4tMGowh7hXxs63uyWfaZyEI-wjLBTGsA,747
64
64
  gllm_inference/prompt_formatter/agnostic_prompt_formatter.pyi,sha256=qp4L3x7XK7oZaSYP8B4idewKpPioB4XELeKVV-dNi-Q,2067
65
65
  gllm_inference/prompt_formatter/huggingface_prompt_formatter.pyi,sha256=kH60A_3DnHd3BrqbgS_FqQTCTHIjC9BTsk6_FNgcZw8,2784
@@ -71,7 +71,7 @@ gllm_inference/request_processor/__init__.pyi,sha256=giEme2WFQhgyKiBZHhSet0_nKSC
71
71
  gllm_inference/request_processor/lm_request_processor.pyi,sha256=rInXhC95BvQnw9q98KZWpjPH8Q_TV4zC2ycNjypEBZ4,5516
72
72
  gllm_inference/request_processor/uses_lm_mixin.pyi,sha256=znBG4AWWm_H70Qqrc1mO4ohmWotX9id81Fqe-x9Qa6Q,2371
73
73
  gllm_inference/schema/__init__.pyi,sha256=-ldt0xJQJirVNdwLFev3bmzmFRw9HSUWBRmmIVH7uyU,1251
74
- gllm_inference/schema/attachment.pyi,sha256=FML2m4-LZYjBIeQaTwJqrcihGpxboJqEtjs2zqLfrCk,2886
74
+ gllm_inference/schema/attachment.pyi,sha256=9zgAjGXBjLfzPGaKi68FMW6b5mXdEA352nDe-ynOSvY,3385
75
75
  gllm_inference/schema/code_exec_result.pyi,sha256=WQ-ARoGM9r6nyRX-A0Ro1XKiqrc9R3jRYXZpu_xo5S4,573
76
76
  gllm_inference/schema/enums.pyi,sha256=SQ9mXt8j7uK333uUnUHRs-mkRxf0Z5NCtkAkgQZPIb4,629
77
77
  gllm_inference/schema/lm_output.pyi,sha256=WP2LQrY0D03OJtFoaW_dGoJ_-yFUh2HbVlllgjzpYv4,1992
@@ -86,8 +86,8 @@ gllm_inference/utils/__init__.pyi,sha256=RBTWDu1TDPpTd17fixcPYFv2L_vp4-IAOX0Isxg
86
86
  gllm_inference/utils/langchain.pyi,sha256=4AwFiVAO0ZpdgmqeC4Pb5NJwBt8vVr0MSUqLeCdTscc,1194
87
87
  gllm_inference/utils/validation.pyi,sha256=-RdMmb8afH7F7q4Ao7x6FbwaDfxUHn3hA3WiOgzB-3s,397
88
88
  gllm_inference.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
89
- gllm_inference.cp312-win_amd64.pyd,sha256=465ZSOcR-ocH-szWUWrx_MMLABlNkW_R1KeqL79Jb3c,2630656
89
+ gllm_inference.cp312-win_amd64.pyd,sha256=-qRM_dYPIZy5bSLRCKOnbdrF-E3YXtCyNwZk13xQUEY,2634752
90
90
  gllm_inference.pyi,sha256=VEcscbPCJ-6lXU4jV3YYXwwumk9kWxpCAsS84ssKG6o,3295
91
- gllm_inference_binary-0.5.3.dist-info/METADATA,sha256=LQwhpH5UQfLEnYFCD2FxH_0CbhikVjdAD2-LGn33yBk,4531
92
- gllm_inference_binary-0.5.3.dist-info/WHEEL,sha256=4N0hGcnWMI_Ty6ATf4qJqqSl-UNI-Ln828iTWGIywmU,98
93
- gllm_inference_binary-0.5.3.dist-info/RECORD,,
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=4N0hGcnWMI_Ty6ATf4qJqqSl-UNI-Ln828iTWGIywmU,98
93
+ gllm_inference_binary-0.5.5.dist-info/RECORD,,