gllm-inference-binary 0.5.56__cp313-cp313-win_amd64.whl → 0.5.57__cp313-cp313-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.
- gllm_inference/lm_invoker/google_lm_invoker.pyi +2 -2
- gllm_inference/lm_invoker/openai_lm_invoker.pyi +32 -1
- gllm_inference/lm_invoker/schema/openai.pyi +2 -0
- gllm_inference.cp313-win_amd64.pyd +0 -0
- {gllm_inference_binary-0.5.56.dist-info → gllm_inference_binary-0.5.57.dist-info}/METADATA +1 -1
- {gllm_inference_binary-0.5.56.dist-info → gllm_inference_binary-0.5.57.dist-info}/RECORD +8 -8
- {gllm_inference_binary-0.5.56.dist-info → gllm_inference_binary-0.5.57.dist-info}/WHEEL +0 -0
- {gllm_inference_binary-0.5.56.dist-info → gllm_inference_binary-0.5.57.dist-info}/top_level.txt +0 -0
|
@@ -31,10 +31,10 @@ class GoogleLMInvoker(BaseLMInvoker):
|
|
|
31
31
|
structured response as defined by the schema. Supports both Pydantic BaseModel and JSON schema dictionary.
|
|
32
32
|
output_analytics (bool): Whether to output the invocation analytics.
|
|
33
33
|
retry_config (RetryConfig | None): The retry configuration for the language model.
|
|
34
|
-
generate_image (bool): Whether to generate image. Only allowed for image generation models.
|
|
35
34
|
thinking (bool): Whether to enable thinking. Only allowed for thinking models.
|
|
36
35
|
thinking_budget (int): The tokens allowed for thinking process. Only allowed for thinking models.
|
|
37
36
|
If set to -1, the model will control the budget automatically.
|
|
37
|
+
image_generation (bool): Whether to generate image. Only allowed for image generation models.
|
|
38
38
|
|
|
39
39
|
Basic usage:
|
|
40
40
|
The `GoogleLMInvoker` can be used as follows:
|
|
@@ -262,7 +262,7 @@ class GoogleLMInvoker(BaseLMInvoker):
|
|
|
262
262
|
```
|
|
263
263
|
'''
|
|
264
264
|
client_params: Incomplete
|
|
265
|
-
|
|
265
|
+
image_generation: Incomplete
|
|
266
266
|
thinking: Incomplete
|
|
267
267
|
thinking_budget: Incomplete
|
|
268
268
|
def __init__(self, model_name: str, api_key: str | None = None, credentials_path: str | None = None, project_id: str | None = None, location: str = 'us-central1', model_kwargs: dict[str, Any] | None = None, default_hyperparameters: dict[str, Any] | None = None, tools: list[Tool | LangChainTool] | None = None, response_schema: ResponseSchema | None = None, output_analytics: bool = False, retry_config: RetryConfig | None = None, thinking: bool | None = None, thinking_budget: int = ..., simplify_events: bool = False) -> None:
|
|
@@ -36,6 +36,7 @@ class OpenAILMInvoker(BaseLMInvoker):
|
|
|
36
36
|
for non-reasoning models. If None, the model will perform medium reasoning effort.
|
|
37
37
|
reasoning_summary (ReasoningSummary | None): The reasoning summary level for reasoning models. Not allowed
|
|
38
38
|
for non-reasoning models. If None, no summary will be generated.
|
|
39
|
+
image_generation (bool): Whether to enable image generation.
|
|
39
40
|
mcp_servers (list[MCPServer]): The list of MCP servers to enable MCP tool calling.
|
|
40
41
|
code_interpreter (bool): Whether to enable the code interpreter.
|
|
41
42
|
web_search (bool): Whether to enable the web search.
|
|
@@ -123,6 +124,35 @@ class OpenAILMInvoker(BaseLMInvoker):
|
|
|
123
124
|
|
|
124
125
|
When structured output is enabled, streaming is disabled.
|
|
125
126
|
|
|
127
|
+
Image generation:
|
|
128
|
+
The `OpenAILMInvoker` can be configured to generate images.
|
|
129
|
+
This feature can be enabled by setting the `image_generation` parameter to `True`.
|
|
130
|
+
|
|
131
|
+
Image outputs are stored in the `outputs` attribute of the `LMOutput` object and can be accessed
|
|
132
|
+
via the `attachments` property.
|
|
133
|
+
|
|
134
|
+
Usage example:
|
|
135
|
+
```python
|
|
136
|
+
lm_invoker = OpenAILMInvoker(..., image_generation=True)
|
|
137
|
+
result = await lm_invoker.invoke("Create a picture...")
|
|
138
|
+
result.attachments[0].write_to_file("path/to/local/image.png")
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Output example:
|
|
142
|
+
```python
|
|
143
|
+
LMOutput(
|
|
144
|
+
outputs=[
|
|
145
|
+
LMOutputItem(
|
|
146
|
+
type="attachment",
|
|
147
|
+
output=Attachment(filename="image.png", mime_type="image/png", data=b"..."),
|
|
148
|
+
),
|
|
149
|
+
],
|
|
150
|
+
)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
When image generation is enabled, streaming is disabled.
|
|
154
|
+
Image generation is only available for certain models.
|
|
155
|
+
|
|
126
156
|
Tool calling:
|
|
127
157
|
The `OpenAILMInvoker` can be configured to call tools to perform certain tasks.
|
|
128
158
|
This feature can be enabled by providing a list of `Tool` objects to the `tools` parameter.
|
|
@@ -354,7 +384,7 @@ class OpenAILMInvoker(BaseLMInvoker):
|
|
|
354
384
|
```
|
|
355
385
|
'''
|
|
356
386
|
client_kwargs: Incomplete
|
|
357
|
-
def __init__(self, model_name: str, api_key: str | None = None, base_url: str = ..., model_kwargs: dict[str, Any] | None = None, default_hyperparameters: dict[str, Any] | None = None, tools: list[Tool | LangChainTool] | None = None, response_schema: ResponseSchema | None = None, output_analytics: bool = False, retry_config: RetryConfig | None = None, reasoning_effort: ReasoningEffort | None = None, reasoning_summary: ReasoningSummary | None = None, mcp_servers: list[MCPServer] | None = None, code_interpreter: bool = False, web_search: bool = False, simplify_events: bool = False) -> None:
|
|
387
|
+
def __init__(self, model_name: str, api_key: str | None = None, base_url: str = ..., model_kwargs: dict[str, Any] | None = None, default_hyperparameters: dict[str, Any] | None = None, tools: list[Tool | LangChainTool] | None = None, response_schema: ResponseSchema | None = None, output_analytics: bool = False, retry_config: RetryConfig | None = None, reasoning_effort: ReasoningEffort | None = None, reasoning_summary: ReasoningSummary | None = None, image_generation: bool = False, mcp_servers: list[MCPServer] | None = None, code_interpreter: bool = False, web_search: bool = False, simplify_events: bool = False) -> None:
|
|
358
388
|
'''Initializes a new instance of the OpenAILMInvoker class.
|
|
359
389
|
|
|
360
390
|
Args:
|
|
@@ -379,6 +409,7 @@ class OpenAILMInvoker(BaseLMInvoker):
|
|
|
379
409
|
for non-reasoning models. If None, the model will perform medium reasoning effort. Defaults to None.
|
|
380
410
|
reasoning_summary (ReasoningSummary | None, optional): The reasoning summary level for reasoning models.
|
|
381
411
|
Not allowed for non-reasoning models. If None, no summary will be generated. Defaults to None.
|
|
412
|
+
image_generation (bool, optional): Whether to enable image generation. Defaults to False.
|
|
382
413
|
mcp_servers (list[MCPServer] | None, optional): The MCP servers containing tools to be accessed by the
|
|
383
414
|
language model. Defaults to None.
|
|
384
415
|
code_interpreter (bool, optional): Whether to enable the code interpreter. Defaults to False.
|
|
@@ -18,6 +18,7 @@ class Key:
|
|
|
18
18
|
FILENAME: str
|
|
19
19
|
FORMAT: str
|
|
20
20
|
ID: str
|
|
21
|
+
IMAGE_GENERATION_CALL: str
|
|
21
22
|
IMAGE_URL: str
|
|
22
23
|
INCLUDE: str
|
|
23
24
|
INCOMPLETE_DETAILS: str
|
|
@@ -54,6 +55,7 @@ class InputType:
|
|
|
54
55
|
FUNCTION: str
|
|
55
56
|
FUNCTION_CALL: str
|
|
56
57
|
FUNCTION_CALL_OUTPUT: str
|
|
58
|
+
IMAGE_GENERATION: str
|
|
57
59
|
INPUT_FILE: str
|
|
58
60
|
INPUT_IMAGE: str
|
|
59
61
|
INPUT_TEXT: str
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: gllm-inference-binary
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.57
|
|
4
4
|
Summary: A library containing components related to model inferences in Gen AI applications.
|
|
5
5
|
Author-email: Henry Wicaksono <henry.wicaksono@gdplabs.id>, Resti Febrina <resti.febrina@gdplabs.id>
|
|
6
6
|
Requires-Python: <3.14,>=3.11
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gllm_inference.cp313-win_amd64.pyd,sha256
|
|
1
|
+
gllm_inference.cp313-win_amd64.pyd,sha256=W8iuIVL1R3Nh70mVAGCc2Bz8RGHMq3z_bw0ysVdmfOY,3963904
|
|
2
2
|
gllm_inference.pyi,sha256=U5ETTUzO_5DKsg4Zp7WQ-rnG_RJKCAqKaf6FoNNw2m4,5067
|
|
3
3
|
gllm_inference/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
gllm_inference/constants.pyi,sha256=8jIYOyxJYVWUYXSXF3vag9HhHwjq1iU9tzPiosRHkWk,328
|
|
@@ -45,13 +45,13 @@ gllm_inference/lm_invoker/anthropic_lm_invoker.pyi,sha256=_Dst_88LOpC-FN01hApihx
|
|
|
45
45
|
gllm_inference/lm_invoker/azure_openai_lm_invoker.pyi,sha256=uV98H2nJsElCTsxAuInZ9KSk1jOTq6SROAGQRPR-_r0,13173
|
|
46
46
|
gllm_inference/lm_invoker/bedrock_lm_invoker.pyi,sha256=qXmFK6zsOM3nPfueEhY5pAfG24bZytA1jqemPa63vLY,10951
|
|
47
47
|
gllm_inference/lm_invoker/datasaur_lm_invoker.pyi,sha256=FnpayOW_Zi0pWFSawLX8XahEnknbnpsRWrkhKZe8Y3U,8035
|
|
48
|
-
gllm_inference/lm_invoker/google_lm_invoker.pyi,sha256=
|
|
48
|
+
gllm_inference/lm_invoker/google_lm_invoker.pyi,sha256=8U68jWVxQKy6DOn-wJAoqyBEPhTn-Hx7133MQ9F6b28,16690
|
|
49
49
|
gllm_inference/lm_invoker/langchain_lm_invoker.pyi,sha256=ull3cX-iUT4hYMbixcxqfrNUxR8ZoR4Vt9ACVILQWSM,12126
|
|
50
50
|
gllm_inference/lm_invoker/litellm_lm_invoker.pyi,sha256=qG8pPTiDJZR2e7wr5Q2VyceC227tz3QybX3UPihT5ng,11400
|
|
51
51
|
gllm_inference/lm_invoker/lm_invoker.pyi,sha256=L_PHRCeHo0dNs6BjnB8H29irGib-qhxKYf7F7pZlU0E,8652
|
|
52
52
|
gllm_inference/lm_invoker/openai_chat_completions_lm_invoker.pyi,sha256=qt9DAdJM7YBB4op-6SOJB0kCouPYVxtIamGUXLGLUeA,13888
|
|
53
53
|
gllm_inference/lm_invoker/openai_compatible_lm_invoker.pyi,sha256=T9sShA_9fgEuaaAuT2gJZq_EYNbEhf3IkWwMCwfszY8,4244
|
|
54
|
-
gllm_inference/lm_invoker/openai_lm_invoker.pyi,sha256=
|
|
54
|
+
gllm_inference/lm_invoker/openai_lm_invoker.pyi,sha256=ReU37hrmYZFbLfCD_c14ryRgnfpPC2YyDx2S5Ft_tXQ,22747
|
|
55
55
|
gllm_inference/lm_invoker/portkey_lm_invoker.pyi,sha256=FYOp4BaDfOtompWIRhDqzMVVSK-TiFyw7JA4TznANQE,15236
|
|
56
56
|
gllm_inference/lm_invoker/xai_lm_invoker.pyi,sha256=6beZsQjGUTo7TdzWBWksRzVGT58XyipErpGfiRq6NH0,13017
|
|
57
57
|
gllm_inference/lm_invoker/batch/__init__.pyi,sha256=vJOTHRJ83oq8Bq0UsMdID9_HW5JAxr06gUs4aPRZfEE,130
|
|
@@ -62,7 +62,7 @@ gllm_inference/lm_invoker/schema/bedrock.pyi,sha256=rB1AWfER2BBKZ5I219211YE2EUFP
|
|
|
62
62
|
gllm_inference/lm_invoker/schema/datasaur.pyi,sha256=8lmb1PRbkqBsF_l7iOffxW0K5Xxpi69GW9Z7KxyxHTE,279
|
|
63
63
|
gllm_inference/lm_invoker/schema/google.pyi,sha256=elXHrUMS46pbTsulk7hBXVVFcT022iD-_U_I590xeV8,529
|
|
64
64
|
gllm_inference/lm_invoker/schema/langchain.pyi,sha256=2OJOUQPlGdlUbIOTDOyiWDBOMm3MoVX-kU2nK0zQsF0,452
|
|
65
|
-
gllm_inference/lm_invoker/schema/openai.pyi,sha256=
|
|
65
|
+
gllm_inference/lm_invoker/schema/openai.pyi,sha256=GIrqEtUPinn8VD-w-38gOw0qiIYuVzM9cj5dRYuGIoQ,2387
|
|
66
66
|
gllm_inference/lm_invoker/schema/openai_chat_completions.pyi,sha256=nNPb7ETC9IrJwkV5wfbGf6Co3-qdq4lhcXz0l_qYCE4,1261
|
|
67
67
|
gllm_inference/lm_invoker/schema/portkey.pyi,sha256=V2q4JIwDAR7BidqfmO01u1_1mLOMtm5OCon6sN2zNt0,662
|
|
68
68
|
gllm_inference/lm_invoker/schema/xai.pyi,sha256=jpC6ZSBDUltzm9GjD6zvSFIPwqizn_ywLnjvwSa7KuU,663
|
|
@@ -131,7 +131,7 @@ gllm_inference/utils/io_utils.pyi,sha256=Eg7dvHWdXslTKdjh1j3dG50i7r35XG2zTmJ9XXv
|
|
|
131
131
|
gllm_inference/utils/langchain.pyi,sha256=4AwFiVAO0ZpdgmqeC4Pb5NJwBt8vVr0MSUqLeCdTscc,1194
|
|
132
132
|
gllm_inference/utils/validation.pyi,sha256=OWRZxeVGIuuvNU0LqLGB-9gNmypvbH-LcSJx91rnH1k,453
|
|
133
133
|
gllm_inference.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
|
|
134
|
-
gllm_inference_binary-0.5.
|
|
135
|
-
gllm_inference_binary-0.5.
|
|
136
|
-
gllm_inference_binary-0.5.
|
|
137
|
-
gllm_inference_binary-0.5.
|
|
134
|
+
gllm_inference_binary-0.5.57.dist-info/METADATA,sha256=wauHbpI6u46hzTVmm3o89STDfdMsJYzbjkQBf362MS0,5945
|
|
135
|
+
gllm_inference_binary-0.5.57.dist-info/WHEEL,sha256=O_u6PJIQ2pIcyIInxVQ9r-yArMuUZbBIaF1kpYVkYxA,96
|
|
136
|
+
gllm_inference_binary-0.5.57.dist-info/top_level.txt,sha256=FpOjtN80F-qVNgbScXSEyqa0w09FYn6301iq6qt69IQ,15
|
|
137
|
+
gllm_inference_binary-0.5.57.dist-info/RECORD,,
|
|
File without changes
|
{gllm_inference_binary-0.5.56.dist-info → gllm_inference_binary-0.5.57.dist-info}/top_level.txt
RENAMED
|
File without changes
|