gllm-core-binary 0.4.1__cp313-cp313-win_amd64.whl → 0.4.2b1__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.
- gllm_core/adapters/tool/langchain.pyi +16 -0
- gllm_core/schema/component.pyi +31 -1
- gllm_core.cp313-win_amd64.pyd +0 -0
- {gllm_core_binary-0.4.1.dist-info → gllm_core_binary-0.4.2b1.dist-info}/METADATA +3 -1
- {gllm_core_binary-0.4.1.dist-info → gllm_core_binary-0.4.2b1.dist-info}/RECORD +7 -7
- {gllm_core_binary-0.4.1.dist-info → gllm_core_binary-0.4.2b1.dist-info}/WHEEL +0 -0
- {gllm_core_binary-0.4.1.dist-info → gllm_core_binary-0.4.2b1.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,25 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
1
2
|
from gllm_core.schema.tool import Tool as Tool
|
|
2
3
|
from typing import Any
|
|
3
4
|
|
|
5
|
+
class LangChainToolKeys:
|
|
6
|
+
"""Constants for LangChain tool attribute keys."""
|
|
7
|
+
FUNC: str
|
|
8
|
+
COROUTINE: str
|
|
9
|
+
RUN: str
|
|
10
|
+
ARUN: str
|
|
11
|
+
NAME: str
|
|
12
|
+
DESCRIPTION: str
|
|
13
|
+
ARGS_SCHEMA: str
|
|
14
|
+
|
|
15
|
+
LANGCHAIN_FUNCTION_ATTRS: Incomplete
|
|
16
|
+
|
|
4
17
|
def from_langchain_tool(langchain_tool: Any) -> Tool:
|
|
5
18
|
"""Convert a LangChain tool into the SDK Tool representation.
|
|
6
19
|
|
|
20
|
+
This function handles both traditional LangChain tools created with the @tool decorator
|
|
21
|
+
and tools created by subclassing the LangChain Tool class.
|
|
22
|
+
|
|
7
23
|
Args:
|
|
8
24
|
langchain_tool (Any): The LangChain tool to convert.
|
|
9
25
|
|
gllm_core/schema/component.pyi
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from gllm_core.event.event_emitter import EventEmitter as EventEmitter
|
|
2
2
|
from gllm_core.schema.schema_generator import generate_params_model as generate_params_model
|
|
3
|
+
from gllm_core.schema.tool import Tool as Tool, tool as tool
|
|
3
4
|
from gllm_core.utils import BinaryHandlingStrategy as BinaryHandlingStrategy, binary_handler_factory as binary_handler_factory
|
|
4
5
|
from gllm_core.utils.analyzer import MethodSignature as MethodSignature, ParameterInfo as ParameterInfo, ParameterKind as ParameterKind, RunProfile as RunProfile, analyze_method as analyze_method
|
|
5
6
|
from gllm_core.utils.logger_manager import LoggerManager as LoggerManager
|
|
@@ -117,7 +118,7 @@ class Component:
|
|
|
117
118
|
the resolved main method, or `None` if no main method can be
|
|
118
119
|
determined.
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
Examples:
|
|
121
122
|
```python
|
|
122
123
|
from pydantic import ValidationError
|
|
123
124
|
|
|
@@ -163,6 +164,35 @@ class Component:
|
|
|
163
164
|
TypeError: If conflicting main methods are inherited from multiple ancestors.
|
|
164
165
|
AttributeError: If __main_method__ refers to a non-existent method.
|
|
165
166
|
"""
|
|
167
|
+
def as_tool(self, name: str | None = None, description: str | None = None, title: str | None = None) -> Tool:
|
|
168
|
+
"""Convert the component's main method into a `Tool` instance.
|
|
169
|
+
|
|
170
|
+
Example:
|
|
171
|
+
```python
|
|
172
|
+
from gllm_core.schema import Component, main
|
|
173
|
+
|
|
174
|
+
class MyComponent(Component):
|
|
175
|
+
@main
|
|
176
|
+
async def my_method(self, param: str) -> str:
|
|
177
|
+
return param
|
|
178
|
+
|
|
179
|
+
component = MyComponent()
|
|
180
|
+
tool = component.as_tool()
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Args:
|
|
184
|
+
name (str | None, optional): Identifier for the resulting tool. Defaults to the component class name.
|
|
185
|
+
description (str | None, optional): Summary of the tool's behavior. Defaults to None, in which case the
|
|
186
|
+
main method's docstring is used.
|
|
187
|
+
title (str | None, optional): Optional display title for the tool. Defaults to None, in which case the
|
|
188
|
+
component's class name is used.
|
|
189
|
+
|
|
190
|
+
Returns:
|
|
191
|
+
Tool: The tool wrapping the component's main method.
|
|
192
|
+
|
|
193
|
+
Raises:
|
|
194
|
+
RuntimeError: If the component does not declare a main method using @main or __main_method__.
|
|
195
|
+
"""
|
|
166
196
|
@property
|
|
167
197
|
def run_profile(self) -> RunProfile:
|
|
168
198
|
"""Analyzes the `_run` method and retrieves its profile.
|
gllm_core.cp313-win_amd64.pyd
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: gllm-core-binary
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2b1
|
|
4
4
|
Summary: A library containing core components for Gen AI applications.
|
|
5
5
|
Author-email: Dimitrij Ray <dimitrij.ray@gdplabs.id>, Henry Wicaksono <henry.wicaksono@gdplabs.id>, Resti Febriana <resti.febriana@gdplabs.id>
|
|
6
6
|
Requires-Python: <3.14,>=3.11
|
|
@@ -19,6 +19,8 @@ Requires-Dist: python-json-logger<4.0.0,>=3.3.0
|
|
|
19
19
|
Requires-Dist: rich<15.0.0,>=14.1.0
|
|
20
20
|
Requires-Dist: scipy<2.0.0,>=1.15.1
|
|
21
21
|
Requires-Dist: virtualenv==20.30.0
|
|
22
|
+
Requires-Dist: python-magic-bin>=0.4.14
|
|
23
|
+
Requires-Dist: libmagic>=1.0
|
|
22
24
|
Provides-Extra: dev
|
|
23
25
|
Requires-Dist: coverage<8.0.0,>=7.4.4; extra == "dev"
|
|
24
26
|
Requires-Dist: mypy<2.0.0,>=1.15.0; extra == "dev"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
gllm_core.cp313-win_amd64.pyd,sha256=
|
|
1
|
+
gllm_core.cp313-win_amd64.pyd,sha256=2uT8pOq09viXLIe0IEwmZ6F7ElDWJ4famtjG6l2DYjM,1211904
|
|
2
2
|
gllm_core.pyi,sha256=n1D4ZCjhQUKv7qxTYLWh-afK6ECPZCddwckzt6afO2w,1446
|
|
3
3
|
gllm_core/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
gllm_core/constants.pyi,sha256=9M5UxEkdttu4fSJTLxhjt7q1xTRYbjTFheM5EjQ5Bs4,904
|
|
5
5
|
gllm_core/adapters/__init__.pyi,sha256=N8JBGr2mPUMAGaMd__7XxGr2NAzfaFMuNH15QkSfbrA,187
|
|
6
6
|
gllm_core/adapters/tool/__init__.pyi,sha256=zRmMo1ilDaYF-cErfkQqy8zGnArHebdWmox-P34_7fI,244
|
|
7
7
|
gllm_core/adapters/tool/google_adk.pyi,sha256=0awaKRXmmK5NiAP9vNNYjMARDPWfWyQqy29k3WHoX2s,953
|
|
8
|
-
gllm_core/adapters/tool/langchain.pyi,sha256=
|
|
8
|
+
gllm_core/adapters/tool/langchain.pyi,sha256=LBqox8xFm6jSxPfBEftJr_zUmXwPk_qHNwU3bZaphhE,855
|
|
9
9
|
gllm_core/event/__init__.pyi,sha256=HVs5C80lFzVEH7mO8KJTUqEPi_7KyPvNeMLuoG-hDeE,177
|
|
10
10
|
gllm_core/event/event_emitter.pyi,sha256=dzhlOGnA2h5-OSRZHt-AJ-THul-rDUatfwr6dyYzYu8,7297
|
|
11
11
|
gllm_core/event/messenger.pyi,sha256=8Nvra-a7RqnfX0PAtm-Of5M8CvsYr0L_1k3HgdNCR5I,3190
|
|
@@ -19,7 +19,7 @@ gllm_core/event/hook/event_hook.pyi,sha256=rMatofdNAwHI65ya_7-q3NAfmTuKhc2WkXeiG
|
|
|
19
19
|
gllm_core/event/hook/json_stringify_event_hook.pyi,sha256=I-QxbaLc4rEyqhW_f4INN5UxBg_ZofHHN1HQKfPJ7rs,585
|
|
20
20
|
gllm_core/schema/__init__.pyi,sha256=X7Gv3xgtl4Ylzsg9iuGgjJPkQey7OdvvIC_X1e5_LAI,310
|
|
21
21
|
gllm_core/schema/chunk.pyi,sha256=ZVYQitMtvMStiFssnTCgtSIcj30VSsK2dKscSysl3R4,2378
|
|
22
|
-
gllm_core/schema/component.pyi,sha256=
|
|
22
|
+
gllm_core/schema/component.pyi,sha256=fghUD8QJRXjjUT2jn64dkM_KjMv6MV9OAQUXjc7xsD0,9164
|
|
23
23
|
gllm_core/schema/event.pyi,sha256=Yd74uSWhIO1lx0_p70rYt-LMz4FZHbbbqJP7xhVh_pY,1335
|
|
24
24
|
gllm_core/schema/schema_generator.pyi,sha256=ToadC6UKEq35k32wUK1VaMKiICRtENXUYdAQOMlTg3U,1445
|
|
25
25
|
gllm_core/schema/tool.pyi,sha256=T5TufJZPYUzYoSPZBX0FkqgZ9u03VAIsZdwvY1PS7nw,8848
|
|
@@ -38,7 +38,7 @@ gllm_core/utils/retry.pyi,sha256=KxlPzURzZfCSgKC44v98nR2bqamzHqtbRuXLDEuX29c,161
|
|
|
38
38
|
gllm_core/utils/similarity.pyi,sha256=HmSxE5VfPwYZYih_bSIz8QRDbkouO_jij-FX6TSCEdM,439
|
|
39
39
|
gllm_core/utils/validation.pyi,sha256=-RdMmb8afH7F7q4Ao7x6FbwaDfxUHn3hA3WiOgzB-3s,397
|
|
40
40
|
gllm_core.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
|
|
41
|
-
gllm_core_binary-0.4.
|
|
42
|
-
gllm_core_binary-0.4.
|
|
43
|
-
gllm_core_binary-0.4.
|
|
44
|
-
gllm_core_binary-0.4.
|
|
41
|
+
gllm_core_binary-0.4.2b1.dist-info/METADATA,sha256=Da9YV-Fk4xYL_qaEsorUvIqz6wz8Zrqne4B0XmP2T9o,4752
|
|
42
|
+
gllm_core_binary-0.4.2b1.dist-info/WHEEL,sha256=O_u6PJIQ2pIcyIInxVQ9r-yArMuUZbBIaF1kpYVkYxA,96
|
|
43
|
+
gllm_core_binary-0.4.2b1.dist-info/top_level.txt,sha256=UYoTGvK_Yec95-_QUuVCKEr6PUXb5Lc7Dr-x8SeX9uM,10
|
|
44
|
+
gllm_core_binary-0.4.2b1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|