gllm-core-binary 0.4.4.post1__cp313-cp313-win_amd64.whl → 0.4.6__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/constants.pyi CHANGED
@@ -2,26 +2,26 @@ from enum import IntEnum, StrEnum
2
2
 
3
3
  class EventLevel(IntEnum):
4
4
  """Defines event levels for the event emitter module."""
5
- TRACE = 0
6
- DEBUG = 1
7
- INFO = 2
8
- WARN = 3
9
- ERROR = 4
10
- FATAL = 5
5
+ TRACE: int
6
+ DEBUG: int
7
+ INFO: int
8
+ WARN: int
9
+ ERROR: int
10
+ FATAL: int
11
11
 
12
12
  class EventType(StrEnum):
13
13
  """Defines event types for the event emitter module."""
14
- ACTIVITY = 'activity'
15
- CODE = 'code'
16
- REFERENCE = 'reference'
17
- RESPONSE = 'response'
18
- STATUS = 'status'
19
- THINKING = 'thinking'
14
+ ACTIVITY: str
15
+ CODE: str
16
+ REFERENCE: str
17
+ RESPONSE: str
18
+ STATUS: str
19
+ THINKING: str
20
20
 
21
21
  class EventTypeSuffix(StrEnum):
22
22
  """Defines suffixes for block based event types."""
23
- START = '_start'
24
- END = '_end'
23
+ START: str
24
+ END: str
25
25
 
26
26
  class DefaultChunkMetadata:
27
27
  """Defines constants for default chunk metadata keys."""
@@ -31,6 +31,6 @@ class DefaultChunkMetadata:
31
31
 
32
32
  class LogMode(StrEnum):
33
33
  """Defines supported log modes for the SDK logging system."""
34
- TEXT = 'text'
35
- SIMPLE = 'simple'
36
- JSON = 'json'
34
+ TEXT: str
35
+ SIMPLE: str
36
+ JSON: str
@@ -4,7 +4,7 @@ from gllm_core.event.handler import ConsoleEventHandler as ConsoleEventHandler,
4
4
  from gllm_core.event.handler.event_handler import BaseEventHandler as BaseEventHandler
5
5
  from gllm_core.event.hook.event_hook import BaseEventHook as BaseEventHook
6
6
  from gllm_core.schema import Event as Event
7
- from gllm_core.utils import validate_string_enum as validate_string_enum
7
+ from gllm_core.utils import validate_enum as validate_enum
8
8
  from typing import AsyncGenerator
9
9
 
10
10
  class EventEmitter:
@@ -1,4 +1,3 @@
1
- import abc
2
1
  from _typeshed import Incomplete
3
2
  from abc import ABC, abstractmethod
4
3
  from gllm_core.constants import EventType as EventType, EventTypeSuffix as EventTypeSuffix
@@ -8,7 +7,7 @@ from gllm_core.utils import LoggerManager as LoggerManager
8
7
  DEFAULT_COLOR_MAP: Incomplete
9
8
  DEFAULT_COLOR: str
10
9
 
11
- class BaseEventHandler(ABC, metaclass=abc.ABCMeta):
10
+ class BaseEventHandler(ABC):
12
11
  """An abstract base class for all event handlers used throughout the Gen AI applications.
13
12
 
14
13
  Attributes:
@@ -1,8 +1,7 @@
1
- import abc
2
1
  from abc import ABC, abstractmethod
3
2
  from gllm_core.schema import Event as Event
4
3
 
5
- class BaseEventHook(ABC, metaclass=abc.ABCMeta):
4
+ class BaseEventHook(ABC):
6
5
  """An abstract base class for all event hooks."""
7
6
  @abstractmethod
8
7
  async def __call__(self, event: Event) -> Event:
@@ -8,6 +8,6 @@ from gllm_core.utils.logger_manager import LoggerManager as LoggerManager
8
8
  from gllm_core.utils.main_method_resolver import MainMethodResolver as MainMethodResolver
9
9
  from gllm_core.utils.merger_method import MergerMethod as MergerMethod
10
10
  from gllm_core.utils.retry import RetryConfig as RetryConfig, retry as retry
11
- from gllm_core.utils.validation import validate_string_enum as validate_string_enum
11
+ from gllm_core.utils.validation import validate_enum as validate_enum, validate_string_enum as validate_string_enum
12
12
 
13
- __all__ = ['BinaryHandlingStrategy', 'ChunkMetadataMerger', 'LoggerManager', 'MainMethodResolver', 'MergerMethod', 'RunAnalyzer', 'RetryConfig', 'asyncify', 'get_default_portal', 'binary_handler_factory', 'format_chunk_message', 'get_placeholder_keys', 'load_gsheets', 'syncify', 'retry', 'validate_string_enum']
13
+ __all__ = ['BinaryHandlingStrategy', 'ChunkMetadataMerger', 'LoggerManager', 'MainMethodResolver', 'MergerMethod', 'RunAnalyzer', 'RetryConfig', 'asyncify', 'get_default_portal', 'binary_handler_factory', 'format_chunk_message', 'get_placeholder_keys', 'load_gsheets', 'syncify', 'retry', 'validate_enum', 'validate_string_enum']
@@ -6,11 +6,11 @@ from typing import Any, Callable
6
6
 
7
7
  class ParameterKind(StrEnum):
8
8
  """Enum representing the different kinds of parameters a method can have."""
9
- POSITIONAL_ONLY = 'positional_only'
10
- POSITIONAL_OR_KEYWORD = 'positional_or_keyword'
11
- VAR_POSITIONAL = 'var_positional'
12
- KEYWORD_ONLY = 'keyword_only'
13
- VAR_KEYWORD = 'var_keyword'
9
+ POSITIONAL_ONLY: str
10
+ POSITIONAL_OR_KEYWORD: str
11
+ VAR_POSITIONAL: str
12
+ KEYWORD_ONLY: str
13
+ VAR_KEYWORD: str
14
14
 
15
15
  class ParameterInfo(BaseModel):
16
16
  """Model representing information about a method parameter.
@@ -48,9 +48,9 @@ class ArgUsages(BaseModel):
48
48
 
49
49
  class RunArgumentUsageType(StrEnum):
50
50
  """Enum representing the different types of argument usage in a run."""
51
- FULL_PASS = 'full_pass'
52
- REQUIRED = 'required'
53
- OPTIONAL = 'optional'
51
+ FULL_PASS: str
52
+ REQUIRED: str
53
+ OPTIONAL: str
54
54
 
55
55
  class RunProfile(BaseModel):
56
56
  """Model representing the profile of a run.
@@ -10,10 +10,10 @@ class BinaryHandlingStrategy(StrEnum):
10
10
  HEX (str): Encode binary data to hex.
11
11
  SHOW_SIZE (str): Show the size of binary data.
12
12
  """
13
- SKIP = 'skip'
14
- BASE64 = 'base64'
15
- HEX = 'hex'
16
- SHOW_SIZE = 'show_size'
13
+ SKIP: str
14
+ BASE64: str
15
+ HEX: str
16
+ SHOW_SIZE: str
17
17
 
18
18
  def binary_handler_factory(handling_type: BinaryHandlingStrategy | str) -> Callable[[bytes], str | None]:
19
19
  """Factory function to create appropriate binary data handler.
@@ -1,5 +1,5 @@
1
1
  import anyio
2
- from anyio.abc import BlockingPortal as BlockingPortal
2
+ from anyio.abc import BlockingPortal
3
3
  from typing import Awaitable, Callable, ParamSpec, TypeVar
4
4
 
5
5
  P = ParamSpec('P')
@@ -1,5 +1,3 @@
1
- from gspread import Client as Client, Spreadsheet as Spreadsheet, Worksheet as Worksheet
2
-
3
1
  def load_gsheets(client_email: str, private_key: str, sheet_id: str, worksheet_id: str) -> list[dict[str, str]]:
4
2
  """Loads data from a Google Sheets worksheet.
5
3
 
@@ -1,5 +1,21 @@
1
- from enum import StrEnum
1
+ from _typeshed import Incomplete
2
+ from enum import Enum, StrEnum as StrEnum
3
+ from gllm_core.utils.logger_manager import LoggerManager as LoggerManager
4
+ from typing import TypeVar
2
5
 
6
+ E = TypeVar('E', bound=Enum)
7
+ logger: Incomplete
8
+
9
+ def validate_enum(enum_type: type[E], value: object) -> None:
10
+ """Validates that the provided value is a valid enum value.
11
+
12
+ Args:
13
+ enum_type (type[E]): The type of the enum.
14
+ value (object): The value to validate.
15
+
16
+ Raises:
17
+ ValueError: If the provided value is not a valid enum value.
18
+ """
3
19
  def validate_string_enum(enum_type: type[StrEnum], value: str) -> None:
4
20
  """Validates that the provided value is a valid string enum value.
5
21
 
Binary file
gllm_core.pyi CHANGED
@@ -18,7 +18,7 @@ import gllm_core.event.handler.ConsoleEventHandler
18
18
  import gllm_core.event.handler.PrintEventHandler
19
19
  import gllm_core.event.handler.StreamEventHandler
20
20
  import gllm_core.schema.Event
21
- import gllm_core.utils.validate_string_enum
21
+ import gllm_core.utils.validate_enum
22
22
  import rich
23
23
  import rich.console
24
24
  import abc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gllm-core-binary
3
- Version: 0.4.4.post1
3
+ Version: 0.4.6
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
@@ -1,21 +1,21 @@
1
- gllm_core.cp313-win_amd64.pyd,sha256=EdYdidOen9p6PHund1v3Om2h2b-LaOvd3SnooK7YDZs,1211904
2
- gllm_core.pyi,sha256=n1D4ZCjhQUKv7qxTYLWh-afK6ECPZCddwckzt6afO2w,1446
1
+ gllm_core.cp313-win_amd64.pyd,sha256=nOxRmHTcKEJbvdsdm4jSS-3uF6hVlz9BRF8sjJbhHaI,1216000
2
+ gllm_core.pyi,sha256=yaptQynjmnHkD9cSX6dNIU6v2MRB_3yafwgtuoFPbh4,1439
3
3
  gllm_core/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- gllm_core/constants.pyi,sha256=9M5UxEkdttu4fSJTLxhjt7q1xTRYbjTFheM5EjQ5Bs4,904
4
+ gllm_core/constants.pyi,sha256=HfDsdHcPhUsSniEp_fScuVnSuhpJOM17rQIU2dV2DY8,843
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
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
- gllm_core/event/event_emitter.pyi,sha256=dzhlOGnA2h5-OSRZHt-AJ-THul-rDUatfwr6dyYzYu8,7297
10
+ gllm_core/event/event_emitter.pyi,sha256=PDW4OtFUjjYxWjOINLOr42hCbzaTmGMvYaRKpLlX4-Y,7283
11
11
  gllm_core/event/messenger.pyi,sha256=8Nvra-a7RqnfX0PAtm-Of5M8CvsYr0L_1k3HgdNCR5I,3190
12
12
  gllm_core/event/handler/__init__.pyi,sha256=gZ21Fjjog3-e3-_Xv5sTpX9_Mx8X2LUzTrqp_tPisCg,377
13
13
  gllm_core/event/handler/console_event_handler.pyi,sha256=eCv0SaZEpbu8W2jQPLnWwXNzhGOSM5KAtDVUYfvlvMs,1494
14
- gllm_core/event/handler/event_handler.pyi,sha256=chEYnw3Rp9Lk3Cz4dSn6EVlzje4BG-SlM82J-4UE5Hw,2153
14
+ gllm_core/event/handler/event_handler.pyi,sha256=tC6q1-pvIBhX16uaryeLcpyf5Z6vQgjEVf3vo257gCo,2118
15
15
  gllm_core/event/handler/print_event_handler.pyi,sha256=D_xNtpcBsGl7NVSCvFKEGvaUqfMTxPaQV8zXECwmZ2Q,1674
16
16
  gllm_core/event/handler/stream_event_handler.pyi,sha256=5faGSFQLBN7XMqd4nIfGkdTBI_ALVaE-fmxVAjzca9w,2908
17
17
  gllm_core/event/hook/__init__.pyi,sha256=gSDHYl0yi00zHHMRvU_Eg8qLqsGHESTvoNE3MXig-g0,149
18
- gllm_core/event/hook/event_hook.pyi,sha256=rMatofdNAwHI65ya_7-q3NAfmTuKhc2WkXeiGPAvcKI,600
18
+ gllm_core/event/hook/event_hook.pyi,sha256=IV5oq-ZZqrLG_hvdibphCpWDYu9e5lYuarQxt8dn76Y,565
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
@@ -23,22 +23,22 @@ gllm_core/schema/component.pyi,sha256=fghUD8QJRXjjUT2jn64dkM_KjMv6MV9OAQUXjc7xsD
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
26
- gllm_core/utils/__init__.pyi,sha256=ZFilGPXXqc2JGwy8AV8N7pf6zmtd9clzuk310PIGkBs,1359
27
- gllm_core/utils/analyzer.pyi,sha256=M48PRor76L5eAQBpSqpv3EkZ4kU1t5Zm3CPFd34dxWM,4470
28
- gllm_core/utils/binary_handler_factory.pyi,sha256=imcuCL2oa-7uwTnC_vI-_KvE1hGu1-5U4ZiF5fShDmQ,1739
26
+ gllm_core/utils/__init__.pyi,sha256=KTUv1RiXQpr8Ef2owMYWUrAB7U_LpC9lTb0-rcHx0NM,1408
27
+ gllm_core/utils/analyzer.pyi,sha256=E3xvelXssLGrKMRvHn_Ap-ao3dhCLPM-q2Pr1vHAdgw,4372
28
+ gllm_core/utils/binary_handler_factory.pyi,sha256=Cpsv8gvCuD52c-q8sjZizSiRHV0h5sVdgYP9uMgKWbg,1717
29
29
  gllm_core/utils/chunk_metadata_merger.pyi,sha256=J1lHTFV-0IiC6xKzzC7x1D1wBoki249muEU2HrF6C58,2317
30
- gllm_core/utils/concurrency.pyi,sha256=n_Mb9D_2hJAQ7VSwDBxhgmDv7hyFRKevDlhcHoAjvyA,3959
30
+ gllm_core/utils/concurrency.pyi,sha256=S_B9BLhVzOOBANknZW0eVTKFHVjCYI3vD7zwLQfawvI,3941
31
31
  gllm_core/utils/event_formatter.pyi,sha256=ocQ_Ev_XorRhLzj0c2szlclz8V3_Ysbg6qHmjhmur3k,1375
32
- gllm_core/utils/google_sheets.pyi,sha256=IjKdc7H3hBLAp8I8jxnwDfKP79D1EIBIRQKKFTUNqjM,939
32
+ gllm_core/utils/google_sheets.pyi,sha256=S3ArLRoWqGZpzqmuQ48xVVOZ9OjLILdD8Ez51QfufFM,847
33
33
  gllm_core/utils/imports.pyi,sha256=-KM0pyw7yFVCUZjHjoNBRFgEnI8hlr0pquKuhcA2X9M,2196
34
34
  gllm_core/utils/logger_manager.pyi,sha256=IDRgA-5jRDu4miO5Ru_tFJHql2JlHdr1GvZdmdS9Sg8,7159
35
35
  gllm_core/utils/main_method_resolver.pyi,sha256=dHozSqFMwCyVorQ0ZE9N-c2V4PkpF8FdU1VGGPvTjK4,2178
36
36
  gllm_core/utils/merger_method.pyi,sha256=JsgHnO47cqenqNxCrHqhAR-nnR_dEqE-7wprVrd8ZFg,1868
37
37
  gllm_core/utils/retry.pyi,sha256=KxlPzURzZfCSgKC44v98nR2bqamzHqtbRuXLDEuX29c,1614
38
38
  gllm_core/utils/similarity.pyi,sha256=HmSxE5VfPwYZYih_bSIz8QRDbkouO_jij-FX6TSCEdM,439
39
- gllm_core/utils/validation.pyi,sha256=-RdMmb8afH7F7q4Ao7x6FbwaDfxUHn3hA3WiOgzB-3s,397
39
+ gllm_core/utils/validation.pyi,sha256=NFfyDCYsqHv44Z_5RqpSUEiuETpqH5Eoia5xwC4n1MU,938
40
40
  gllm_core.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
41
- gllm_core_binary-0.4.4.post1.dist-info/METADATA,sha256=HBgiqVeIkwIWw7VFOHKJDksn9gHBm8oyhKZuzy8LJRg,4663
42
- gllm_core_binary-0.4.4.post1.dist-info/WHEEL,sha256=O_u6PJIQ2pIcyIInxVQ9r-yArMuUZbBIaF1kpYVkYxA,96
43
- gllm_core_binary-0.4.4.post1.dist-info/top_level.txt,sha256=UYoTGvK_Yec95-_QUuVCKEr6PUXb5Lc7Dr-x8SeX9uM,10
44
- gllm_core_binary-0.4.4.post1.dist-info/RECORD,,
41
+ gllm_core_binary-0.4.6.dist-info/METADATA,sha256=VNsP3VTf5xXsdZ-lX0D8o9uFXWSAXH-PVQGhGd4W7wQ,4657
42
+ gllm_core_binary-0.4.6.dist-info/WHEEL,sha256=O_u6PJIQ2pIcyIInxVQ9r-yArMuUZbBIaF1kpYVkYxA,96
43
+ gllm_core_binary-0.4.6.dist-info/top_level.txt,sha256=UYoTGvK_Yec95-_QUuVCKEr6PUXb5Lc7Dr-x8SeX9uM,10
44
+ gllm_core_binary-0.4.6.dist-info/RECORD,,