gllm-inference-binary 0.5.32b1__cp311-cp311-manylinux_2_31_x86_64.whl → 0.5.34__cp311-cp311-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.

@@ -134,7 +134,12 @@ class AzureOpenAILMInvoker(OpenAILMInvoker):
134
134
  ```python
135
135
  LMOutput(
136
136
  response="Golden retriever is a good dog breed.",
137
- token_usage=TokenUsage(input_tokens=100, output_tokens=50),
137
+ token_usage=TokenUsage(
138
+ input_tokens=1500,
139
+ output_tokens=200,
140
+ input_token_details=InputTokenDetails(cached_tokens=1200, uncached_tokens=300),
141
+ output_token_details=OutputTokenDetails(reasoning_tokens=180, response_tokens=20),
142
+ ),
138
143
  duration=0.729,
139
144
  finish_details={"status": "completed", "incomplete_details": {"reason": None}},
140
145
  )
@@ -137,7 +137,12 @@ class OpenAILMInvoker(BaseLMInvoker):
137
137
  ```python
138
138
  LMOutput(
139
139
  response="Golden retriever is a good dog breed.",
140
- token_usage=TokenUsage(input_tokens=100, output_tokens=50),
140
+ token_usage=TokenUsage(
141
+ input_tokens=1500,
142
+ output_tokens=200,
143
+ input_token_details=InputTokenDetails(cached_tokens=1200, uncached_tokens=300),
144
+ output_token_details=OutputTokenDetails(reasoning_tokens=180, response_tokens=20),
145
+ ),
141
146
  duration=0.729,
142
147
  finish_details={"status": "completed", "incomplete_details": {"reason": None}},
143
148
  )
@@ -1,7 +1,9 @@
1
+ from gllm_inference.schema.activity import Activity as Activity
1
2
  from gllm_inference.schema.attachment import Attachment as Attachment
2
3
  from gllm_inference.schema.code_exec_result import CodeExecResult as CodeExecResult
3
4
  from gllm_inference.schema.config import TruncationConfig as TruncationConfig
4
5
  from gllm_inference.schema.enums import AttachmentType as AttachmentType, BatchStatus as BatchStatus, EmitDataType as EmitDataType, MessageRole as MessageRole, TruncateSide as TruncateSide
6
+ from gllm_inference.schema.events import ActivityEvent as ActivityEvent, CodeEvent as CodeEvent, ReasoningEvent as ReasoningEvent
5
7
  from gllm_inference.schema.lm_input import LMInput as LMInput
6
8
  from gllm_inference.schema.lm_output import LMOutput as LMOutput
7
9
  from gllm_inference.schema.mcp import MCPCall as MCPCall, MCPServer as MCPServer
@@ -13,4 +15,4 @@ from gllm_inference.schema.tool_call import ToolCall as ToolCall
13
15
  from gllm_inference.schema.tool_result import ToolResult as ToolResult
14
16
  from gllm_inference.schema.type_alias import EMContent as EMContent, MessageContent as MessageContent, ResponseSchema as ResponseSchema, Vector as Vector
15
17
 
16
- __all__ = ['Attachment', 'AttachmentType', 'BatchStatus', 'CodeExecResult', 'EMContent', 'EmitDataType', 'MCPCall', 'MCPServer', 'InputTokenDetails', 'MessageContent', 'LMInput', 'LMOutput', 'ModelId', 'ModelProvider', 'Message', 'MessageRole', 'OutputTokenDetails', 'Reasoning', 'ResponseSchema', 'TokenUsage', 'ToolCall', 'ToolResult', 'TruncateSide', 'TruncationConfig', 'Vector']
18
+ __all__ = ['Activity', 'ActivityEvent', 'Attachment', 'AttachmentType', 'BatchStatus', 'CodeEvent', 'CodeExecResult', 'EMContent', 'EmitDataType', 'MCPCall', 'MCPServer', 'InputTokenDetails', 'MessageContent', 'LMInput', 'LMOutput', 'ModelId', 'ModelProvider', 'Message', 'MessageRole', 'OutputTokenDetails', 'Reasoning', 'ReasoningEvent', 'ResponseSchema', 'TokenUsage', 'ToolCall', 'ToolResult', 'TruncateSide', 'TruncationConfig', 'Vector']
@@ -0,0 +1,9 @@
1
+ from pydantic import BaseModel
2
+
3
+ class Activity(BaseModel):
4
+ """Base schema for any activity.
5
+
6
+ Attributes:
7
+ activity_type (str): The type of activity being performed.
8
+ """
9
+ activity_type: str
@@ -0,0 +1,40 @@
1
+ from gllm_core.schema import Event
2
+ from gllm_inference.schema.activity import Activity as Activity
3
+ from gllm_inference.schema.enums import EmitDataType as EmitDataType
4
+ from typing import Literal
5
+
6
+ class ReasoningEvent(Event):
7
+ """Event schema for model reasoning.
8
+
9
+ Attributes:
10
+ id (str): The unique identifier for the thinking event. Defaults to an UUID string.
11
+ data_type (Literal): The type of thinking event (thinking, thinking_start, or thinking_end).
12
+ data_value (str): The thinking content or message.
13
+ """
14
+ id: str
15
+ data_type: Literal[EmitDataType.THINKING, EmitDataType.THINKING_START, EmitDataType.THINKING_END]
16
+ data_value: str
17
+
18
+ class ActivityEvent(Event):
19
+ """Event schema for model-triggered activities (e.g. web search, MCP).
20
+
21
+ Attributes:
22
+ id (str): The unique identifier for the activity event. Defaults to an UUID string.
23
+ data_type (Literal): The type of event, always 'activity'.
24
+ data_value (Activity): The activity data containing message and type.
25
+ """
26
+ id: str
27
+ data_type: Literal[EmitDataType.ACTIVITY]
28
+ data_value: Activity
29
+
30
+ class CodeEvent(Event):
31
+ """Event schema for model-triggered code execution.
32
+
33
+ Attributes:
34
+ id (str): The unique identifier for the code event. Defaults to an UUID string.
35
+ data_type (Literal): The type of event (code, code_start, or code_end).
36
+ data_value (str): The code content.
37
+ """
38
+ id: str
39
+ data_type: Literal[EmitDataType.CODE, EmitDataType.CODE_START, EmitDataType.CODE_END]
40
+ data_value: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gllm-inference-binary
3
- Version: 0.5.32b1
3
+ Version: 0.5.34
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
@@ -57,12 +57,12 @@ A library containing components related to model inferences in Gen AI applicatio
57
57
  ## Installation
58
58
 
59
59
  ### Prerequisites
60
- - Python 3.11+ - [Install here](https://www.python.org/downloads/)
61
- - Pip (if using Pip) - [Install here](https://pip.pypa.io/en/stable/installation/)
62
- - Poetry 1.8.1+ (if using Poetry) - [Install here](https://python-poetry.org/docs/#installation)
63
- - Git (if using Git) - [Install here](https://git-scm.com/downloads)
64
- - For git installation:
65
- - Access to the [GDP Labs SDK github repository](https://github.com/GDP-ADMIN/gen-ai-internal)
60
+ 1. Python 3.11+ - [Install here](https://www.python.org/downloads/)
61
+ 2. Pip (if using Pip) - [Install here](https://pip.pypa.io/en/stable/installation/)
62
+ 3. Poetry (automatically installed via Makefile) - [Install here](https://python-poetry.org/docs/#installation)
63
+ 4. Git (if using Git) - [Install here](https://git-scm.com/downloads)
64
+ 5. gcloud CLI (for authentication) - [Install here](https://cloud.google.com/sdk/docs/install)
65
+ 6. For git installation, access to the [GDP Labs SDK github repository](https://github.com/GDP-ADMIN/gl-sdk)
66
66
 
67
67
  ### 1. Installation from Artifact Registry
68
68
  Choose one of the following methods to install the package:
@@ -91,24 +91,44 @@ Available extras:
91
91
  - `openai`: Install OpenAI models dependencies
92
92
  - `twelvelabs`: Install TwelveLabs models dependencies
93
93
 
94
- ## Managing Dependencies
94
+ ## Local Development Setup
95
+
96
+ ### Quick Setup (Recommended)
97
+ For local development with editable gllm packages, use the provided Makefile:
98
+
99
+ ```bash
100
+ # Complete setup: installs Poetry, configures auth, installs packages, sets up pre-commit
101
+ make setup
102
+ ```
103
+
104
+ The following are the available Makefile targets:
105
+
106
+ 1. `make setup` - Complete development setup (recommended for new developers)
107
+ 2. `make install-poetry` - Install or upgrade Poetry to the latest version
108
+ 3. `make auth` - Configure authentication for internal repositories
109
+ 4. `make install` - Install all dependencies
110
+ 5. `make install-pre-commit` - Set up pre-commit hooks
111
+ 6. `make update` - Update dependencies
112
+ ### Manual Development Setup (Legacy)
113
+ If you prefer to manage dependencies manually:
114
+
95
115
  1. Go to root folder of `gllm-inference` module, e.g. `cd libs/gllm-inference`.
96
116
  2. Run `poetry shell` to create a virtual environment.
97
117
  3. Run `poetry lock` to create a lock file if you haven't done it yet.
98
118
  4. Run `poetry install` to install the `gllm-inference` requirements for the first time.
99
119
  5. Run `poetry update` if you update any dependency module version at `pyproject.toml`.
100
120
 
121
+
101
122
  ## Contributing
102
123
  Please refer to this [Python Style Guide](https://docs.google.com/document/d/1uRggCrHnVfDPBnG641FyQBwUwLoFw0kTzNqRm92vUwM/edit?usp=sharing)
103
124
  to get information about code style, documentation standard, and SCA that you need to use when contributing to this project
104
125
 
105
- 1. Activate `pre-commit` hooks using `pre-commit install`
106
- 2. Run `poetry shell` to create a virtual environment.
107
- 3. Run `poetry lock` to create a lock file if you haven't done it yet.
108
- 4. Run `poetry install` to install the `gllm-inference` requirements for the first time.
109
- 5. Run `which python` to get the path to be referenced at Visual Studio Code interpreter path (`Ctrl`+`Shift`+`P` or `Cmd`+`Shift`+`P`)
110
- 6. Try running the unit test to see if it's working:
126
+ ### Getting Started with Development
127
+ 1. Clone the repository and navigate to the gllm-inference directory
128
+ 2. Run `make setup` to set up your development environment
129
+ 3. Run `which python` to get the path to be referenced at Visual Studio Code interpreter path (`Ctrl`+`Shift`+`P` or `Cmd`+`Shift`+`P`)
130
+ 4. Try running the unit test to see if it's working:
111
131
  ```bash
112
132
  poetry run pytest -s tests/unit_tests/
113
133
  ```
114
-
134
+ 5. When you want to update the dependencies, run `make update`
@@ -1,4 +1,4 @@
1
- gllm_inference.cpython-311-x86_64-linux-gnu.so,sha256=JEGvv1Psr4swuUxGdfdvOb9LbWDYxfUVzAXAICsjebA,4425392
1
+ gllm_inference.cpython-311-x86_64-linux-gnu.so,sha256=0OzoLFSn6LVwerQ1fgNv8dE7UtIZx5qtHU2RU-hwc3k,4470544
2
2
  gllm_inference.pyi,sha256=bvMQNMzysfZtXgjW4ZX0KwSOV4uroNakpE0NUHKCMmk,4199
3
3
  gllm_inference/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  gllm_inference/constants.pyi,sha256=EFVMtK3xDK2yjGoHp8EL3LeRZWhIefVKClI9jvbfQQ0,267
@@ -37,7 +37,7 @@ gllm_inference/exceptions/exceptions.pyi,sha256=Bv996qLa_vju0Qjf4GewMxdkq8CV9LRZ
37
37
  gllm_inference/exceptions/provider_error_map.pyi,sha256=P1WnhWkM103FW6hqMfNZBOmYSWOmsJtll3VQV8DGb8E,1210
38
38
  gllm_inference/lm_invoker/__init__.pyi,sha256=NmQSqObPjevEP1KbbrNnaz4GMh175EVPERZ19vK5Emc,1202
39
39
  gllm_inference/lm_invoker/anthropic_lm_invoker.pyi,sha256=rJeQ9jpUIvcf5z1BB9Lksqf37ZgUzcnFqDMstOl3-kk,17235
40
- gllm_inference/lm_invoker/azure_openai_lm_invoker.pyi,sha256=EXPFTsPwUk42B12MVDhh98maCFSkdPWfqJeht5Wjpq4,14783
40
+ gllm_inference/lm_invoker/azure_openai_lm_invoker.pyi,sha256=7zF8pj3LbuOwu1QArPX0ra6IrqUq5AkkGbC_wXiGhlA,15027
41
41
  gllm_inference/lm_invoker/bedrock_lm_invoker.pyi,sha256=uZ9wpzOKSOvgu1ICMLqEXcrOE3RIbUmqHmgtuwBekPg,12802
42
42
  gllm_inference/lm_invoker/datasaur_lm_invoker.pyi,sha256=J_tfnIgVDr-zQ7YE5_TKMyZyA336ly04g1l-ZKnr1As,9315
43
43
  gllm_inference/lm_invoker/google_lm_invoker.pyi,sha256=4-3CwfBcDh6thxkidRcYbGVp9bCDkQTemat6VBHsUC8,17164
@@ -45,7 +45,7 @@ gllm_inference/lm_invoker/langchain_lm_invoker.pyi,sha256=hnQcScOHs31xx4GB6YI-Rn
45
45
  gllm_inference/lm_invoker/litellm_lm_invoker.pyi,sha256=eEPvDOCj55f9wJ0neNl4O9XQWvSI6YWJgHZMHOaYGRk,13240
46
46
  gllm_inference/lm_invoker/lm_invoker.pyi,sha256=hjolpN8BzUrhgy8MSpnYxhrlWPJO1LXeCFGlBhQ-eBw,8152
47
47
  gllm_inference/lm_invoker/openai_compatible_lm_invoker.pyi,sha256=XV-KjulVYAhU0e2giqOdHUGCSCrybXRWsrtzZByqOXI,15050
48
- gllm_inference/lm_invoker/openai_lm_invoker.pyi,sha256=xrNdXmsy8i4XZRUTddaRdNbgtZtgal7l6zOogNAEa4M,21854
48
+ gllm_inference/lm_invoker/openai_lm_invoker.pyi,sha256=8U-b2dUcHGHm0uoPcZr3UBNhJsLaNCOHftfkebZP_DU,22098
49
49
  gllm_inference/lm_invoker/xai_lm_invoker.pyi,sha256=rV8D3E730OUmwK7jELKSziMUl7MnpbfxMAvMuq8-Aew,15687
50
50
  gllm_inference/lm_invoker/batch/__init__.pyi,sha256=W4W-_yfk7lL20alREJai6GnwuQvdlKRfwQCX4mQK4XI,127
51
51
  gllm_inference/lm_invoker/batch/batch_operations.pyi,sha256=Oo7hoyPSfPZdy1mXvSdvtRndvq-XTIbPIjEoGvJj5C0,5372
@@ -83,11 +83,13 @@ gllm_inference/prompt_formatter/prompt_formatter.pyi,sha256=UkcPi5ao98OGJyNRsqfh
83
83
  gllm_inference/request_processor/__init__.pyi,sha256=hVnfdNZnkTBJHnmLtN3Na4ANP0yK6AstWdIizVr2Apo,227
84
84
  gllm_inference/request_processor/lm_request_processor.pyi,sha256=VnYc8E3Iayyhw-rPnGPfTKuO3ohgFsS8HPrZJeyES5I,5889
85
85
  gllm_inference/request_processor/uses_lm_mixin.pyi,sha256=Yu0XPNuHxq1tWBviHTPw1oThojneFwGHepvGjBXxKQA,6382
86
- gllm_inference/schema/__init__.pyi,sha256=Kc0N_kISRf8wkw07tY5ka9wG_0qdZAvrFMej0zxvIZE,1679
86
+ gllm_inference/schema/__init__.pyi,sha256=BJUDYiIo_jPjR5GjWzpSaZ2yOahUFry3FPhgrv-NjK8,1933
87
+ gllm_inference/schema/activity.pyi,sha256=kcqSAWAdtyAIyKy2hhLtDgDzZzsNOaUAmHpMAVlGI-s,211
87
88
  gllm_inference/schema/attachment.pyi,sha256=jApuzjOHJDCz4lr4MlHzBgIndh559nbWu2Xp1fk3hso,3297
88
89
  gllm_inference/schema/code_exec_result.pyi,sha256=ZTHh6JtRrPIdQ059P1UAiD2L-tAO1_S5YcMsAXfJ5A0,559
89
90
  gllm_inference/schema/config.pyi,sha256=rAL_UeXyQeXVk1P2kqd8vFWOMwmKenfpQLtvMP74t9s,674
90
91
  gllm_inference/schema/enums.pyi,sha256=XQpohUC7_9nFdEmSZHj_4YmOAwM_C5jvTWw_RN-JiFk,901
92
+ gllm_inference/schema/events.pyi,sha256=wW14Gb4dS6_YcIus8sBrWvkt_iyw7Xc8E3DrnsQNa08,1566
91
93
  gllm_inference/schema/lm_input.pyi,sha256=A5pjz1id6tP9XRNhzQrbmzd66C_q3gzo0UP8rCemz6Q,193
92
94
  gllm_inference/schema/lm_output.pyi,sha256=15y-M0lpqM_fSlErPKiN1Pj-ikl5NtFBcWLMYsRidt8,2182
93
95
  gllm_inference/schema/mcp.pyi,sha256=Vwu8E2BDl6FvvnI42gIyY3Oki1BdwRE3Uh3aV0rmhQU,1014
@@ -103,7 +105,7 @@ gllm_inference/utils/io_utils.pyi,sha256=7kUTacHAVRYoemFUOjCH7-Qmw-YsQGd6rGYxjf_
103
105
  gllm_inference/utils/langchain.pyi,sha256=VluQiHkGigDdqLUbhB6vnXiISCP5hHqV0qokYY6dC1A,1164
104
106
  gllm_inference/utils/validation.pyi,sha256=toxBtRp-VItC_X7sNi-GDd7sjibBdWMrR0q01OI2D7k,385
105
107
  gllm_inference.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
106
- gllm_inference_binary-0.5.32b1.dist-info/METADATA,sha256=_Vq9GKxNtOxODXNNsnQgpaKANbJuC3DQqWUllr0ZS7k,4859
107
- gllm_inference_binary-0.5.32b1.dist-info/WHEEL,sha256=WMelAR6z66VnlU3tu68fV-jM5qbG8iPyeTqaBcpU3pI,108
108
- gllm_inference_binary-0.5.32b1.dist-info/top_level.txt,sha256=FpOjtN80F-qVNgbScXSEyqa0w09FYn6301iq6qt69IQ,15
109
- gllm_inference_binary-0.5.32b1.dist-info/RECORD,,
108
+ gllm_inference_binary-0.5.34.dist-info/METADATA,sha256=SkE5bZYrVBFIp7l6kDi2vk5m6MZtKoRM6vDVtON1_zs,5636
109
+ gllm_inference_binary-0.5.34.dist-info/WHEEL,sha256=WMelAR6z66VnlU3tu68fV-jM5qbG8iPyeTqaBcpU3pI,108
110
+ gllm_inference_binary-0.5.34.dist-info/top_level.txt,sha256=FpOjtN80F-qVNgbScXSEyqa0w09FYn6301iq6qt69IQ,15
111
+ gllm_inference_binary-0.5.34.dist-info/RECORD,,