gllm-inference-binary 0.5.57__cp313-cp313-manylinux_2_31_x86_64.whl → 0.5.65__cp313-cp313-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.
@@ -1,4 +1,4 @@
1
- from gllm_inference.lm_invoker import AnthropicLMInvoker as AnthropicLMInvoker, AzureOpenAILMInvoker as AzureOpenAILMInvoker, BedrockLMInvoker as BedrockLMInvoker, DatasaurLMInvoker as DatasaurLMInvoker, GoogleLMInvoker as GoogleLMInvoker, LangChainLMInvoker as LangChainLMInvoker, LiteLLMLMInvoker as LiteLLMLMInvoker, OpenAIChatCompletionsLMInvoker as OpenAIChatCompletionsLMInvoker, OpenAICompatibleLMInvoker as OpenAICompatibleLMInvoker, OpenAILMInvoker as OpenAILMInvoker, PortkeyLMInvoker as PortkeyLMInvoker, XAILMInvoker as XAILMInvoker
1
+ from gllm_inference.lm_invoker import AnthropicLMInvoker as AnthropicLMInvoker, AzureOpenAILMInvoker as AzureOpenAILMInvoker, BedrockLMInvoker as BedrockLMInvoker, DatasaurLMInvoker as DatasaurLMInvoker, GoogleLMInvoker as GoogleLMInvoker, LangChainLMInvoker as LangChainLMInvoker, LiteLLMLMInvoker as LiteLLMLMInvoker, OpenAIChatCompletionsLMInvoker as OpenAIChatCompletionsLMInvoker, OpenAICompatibleLMInvoker as OpenAICompatibleLMInvoker, OpenAILMInvoker as OpenAILMInvoker, PortkeyLMInvoker as PortkeyLMInvoker, SeaLionLMInvoker as SeaLionLMInvoker, XAILMInvoker as XAILMInvoker
2
2
  from gllm_inference.lm_invoker.lm_invoker import BaseLMInvoker as BaseLMInvoker
3
3
  from gllm_inference.schema.model_id import ModelId as ModelId, ModelProvider as ModelProvider
4
4
  from typing import Any
@@ -119,6 +119,15 @@ def build_lm_invoker(model_id: str | ModelId, credentials: str | dict[str, Any]
119
119
  ```
120
120
  The credentials can also be provided through the `AZURE_OPENAI_API_KEY` environment variable.
121
121
 
122
+ # Using SEA-LION
123
+ ```python
124
+ lm_invoker = build_lm_invoker(
125
+ model_id="sea-lion/aisingapore/Qwen-SEA-LION-v4-32B-IT",
126
+ credentials="sk-..."
127
+ )
128
+ ```
129
+ The credentials can also be provided through the `SEA_LION_API_KEY` environment variable.
130
+
122
131
  # Using LangChain
123
132
  ```python
124
133
  lm_invoker = build_lm_invoker(
@@ -9,6 +9,7 @@ from gllm_inference.lm_invoker.openai_chat_completions_lm_invoker import OpenAIC
9
9
  from gllm_inference.lm_invoker.openai_compatible_lm_invoker import OpenAICompatibleLMInvoker as OpenAICompatibleLMInvoker
10
10
  from gllm_inference.lm_invoker.openai_lm_invoker import OpenAILMInvoker as OpenAILMInvoker
11
11
  from gllm_inference.lm_invoker.portkey_lm_invoker import PortkeyLMInvoker as PortkeyLMInvoker
12
+ from gllm_inference.lm_invoker.sea_lion_lm_invoker import SeaLionLMInvoker as SeaLionLMInvoker
12
13
  from gllm_inference.lm_invoker.xai_lm_invoker import XAILMInvoker as XAILMInvoker
13
14
 
14
- __all__ = ['AnthropicLMInvoker', 'AzureOpenAILMInvoker', 'BedrockLMInvoker', 'DatasaurLMInvoker', 'GoogleLMInvoker', 'LangChainLMInvoker', 'LiteLLMLMInvoker', 'OpenAIChatCompletionsLMInvoker', 'OpenAICompatibleLMInvoker', 'OpenAILMInvoker', 'PortkeyLMInvoker', 'XAILMInvoker']
15
+ __all__ = ['AnthropicLMInvoker', 'AzureOpenAILMInvoker', 'BedrockLMInvoker', 'DatasaurLMInvoker', 'GoogleLMInvoker', 'LangChainLMInvoker', 'LiteLLMLMInvoker', 'OpenAIChatCompletionsLMInvoker', 'OpenAICompatibleLMInvoker', 'OpenAILMInvoker', 'PortkeyLMInvoker', 'SeaLionLMInvoker', 'XAILMInvoker']
@@ -1,12 +1,14 @@
1
1
  from _typeshed import Incomplete
2
+ from anthropic.types import ContentBlockStopEvent as ContentBlockStopEvent, Message as Message, RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, RawContentBlockStartEvent as RawContentBlockStartEvent
2
3
  from gllm_core.event import EventEmitter as EventEmitter
3
4
  from gllm_core.schema.tool import Tool as Tool
4
5
  from gllm_core.utils.retry import RetryConfig as RetryConfig
5
6
  from gllm_inference.constants import INVOKER_PROPAGATED_MAX_RETRIES as INVOKER_PROPAGATED_MAX_RETRIES
6
7
  from gllm_inference.lm_invoker.lm_invoker import BaseLMInvoker as BaseLMInvoker
7
8
  from gllm_inference.lm_invoker.schema.anthropic import InputType as InputType, Key as Key, OutputType as OutputType
8
- from gllm_inference.schema import Attachment as Attachment, AttachmentType as AttachmentType, BatchStatus as BatchStatus, LMInput as LMInput, LMOutput as LMOutput, Message as Message, ModelId as ModelId, ModelProvider as ModelProvider, Reasoning as Reasoning, ResponseSchema as ResponseSchema, ThinkingEvent as ThinkingEvent, TokenUsage as TokenUsage, ToolCall as ToolCall, ToolResult as ToolResult
9
+ from gllm_inference.schema import Attachment as Attachment, AttachmentType as AttachmentType, BatchStatus as BatchStatus, LMInput as LMInput, LMOutput as LMOutput, ModelId as ModelId, ModelProvider as ModelProvider, Reasoning as Reasoning, ResponseSchema as ResponseSchema, ThinkingEvent as ThinkingEvent, TokenUsage as TokenUsage, ToolCall as ToolCall, ToolResult as ToolResult
9
10
  from langchain_core.tools import Tool as LangChainTool
11
+ from pydantic import BaseModel as BaseModel
10
12
  from typing import Any
11
13
 
12
14
  SUPPORTED_ATTACHMENTS: Incomplete
@@ -104,11 +104,12 @@ class BatchOperations:
104
104
  Returns:
105
105
  BatchStatus: The status of the batch job.
106
106
  """
107
- async def retrieve(self, batch_id: str) -> dict[str, LMOutput]:
107
+ async def retrieve(self, batch_id: str, **kwargs: Any) -> dict[str, LMOutput]:
108
108
  """Retrieves the results of a batch job.
109
109
 
110
110
  Args:
111
111
  batch_id (str): The ID of the batch job to get the results of.
112
+ **kwargs (Any): Additional keyword arguments.
112
113
 
113
114
  Returns:
114
115
  dict[str, LMOutput]: The results of the batch job.
@@ -6,8 +6,9 @@ from gllm_inference.constants import GOOGLE_SCOPES as GOOGLE_SCOPES, SECONDS_TO_
6
6
  from gllm_inference.exceptions import BaseInvokerError as BaseInvokerError, convert_http_status_to_base_invoker_error as convert_http_status_to_base_invoker_error
7
7
  from gllm_inference.exceptions.provider_error_map import GOOGLE_ERROR_MAPPING as GOOGLE_ERROR_MAPPING
8
8
  from gllm_inference.lm_invoker.lm_invoker import BaseLMInvoker as BaseLMInvoker
9
- from gllm_inference.lm_invoker.schema.google import InputType as InputType, Key as Key
10
- from gllm_inference.schema import Attachment as Attachment, AttachmentType as AttachmentType, LMOutput as LMOutput, Message as Message, MessageRole as MessageRole, ModelId as ModelId, ModelProvider as ModelProvider, Reasoning as Reasoning, ResponseSchema as ResponseSchema, ThinkingEvent as ThinkingEvent, TokenUsage as TokenUsage, ToolCall as ToolCall, ToolResult as ToolResult
9
+ from gllm_inference.lm_invoker.schema.google import InputType as InputType, JobState as JobState, Key as Key
10
+ from gllm_inference.schema import Attachment as Attachment, AttachmentType as AttachmentType, BatchStatus as BatchStatus, LMInput as LMInput, LMOutput as LMOutput, Message as Message, MessageRole as MessageRole, ModelId as ModelId, ModelProvider as ModelProvider, Reasoning as Reasoning, ResponseSchema as ResponseSchema, ThinkingEvent as ThinkingEvent, TokenUsage as TokenUsage, ToolCall as ToolCall, ToolResult as ToolResult
11
+ from google.genai.types import GenerateContentResponse as GenerateContentResponse
11
12
  from langchain_core.tools import Tool as LangChainTool
12
13
  from typing import Any
13
14
 
@@ -15,7 +16,12 @@ SUPPORTED_ATTACHMENTS: Incomplete
15
16
  DEFAULT_THINKING_BUDGET: int
16
17
  REQUIRE_THINKING_MODEL_PREFIX: Incomplete
17
18
  IMAGE_GENERATION_MODELS: Incomplete
18
- YOUTUBE_URL_PATTERN: Incomplete
19
+ BATCH_STATUS_MAP: Incomplete
20
+
21
+ class URLPattern:
22
+ """Defines specific Google related URL patterns."""
23
+ GOOGLE_FILE: Incomplete
24
+ YOUTUBE: Incomplete
19
25
 
20
26
  class GoogleLMInvoker(BaseLMInvoker):
21
27
  '''A language model invoker to interact with Google language models.
@@ -260,6 +266,94 @@ class GoogleLMInvoker(BaseLMInvoker):
260
266
  ```python
261
267
  lm_invoker = GoogleLMInvoker(..., retry_config=retry_config)
262
268
  ```
269
+
270
+ Batch processing:
271
+ The `GoogleLMInvoker` supports batch processing, which allows the language model to process multiple
272
+ requests in a single call. Batch processing is supported through the `batch` attribute.
273
+
274
+ Due to Google SDK limitations with batch processing:
275
+ 1. Only inline requests are currently supported (not file-based or BigQuery sources).
276
+ 2. The total size of all requests must be under 20MB.
277
+ 3. Original request indices are not preserved in the results. The results are keyed by request index in the
278
+ format \'1\', \'2\', etc, in which order are preserved based on the original request order. If you want to use
279
+ custom request IDs, you can pass them as a list of strings to the `custom_request_ids` keyword argument
280
+
281
+ Usage example:
282
+ ```python
283
+ requests = {"1": "What color is the sky?", "2": "What color is the grass?"}
284
+ results = await lm_invoker.batch.invoke(requests)
285
+ ```
286
+
287
+ Output example:
288
+ ```python
289
+ {
290
+ "1": LMOutput(outputs=[LMOutputItem(type="text", output="The sky is blue.")]),
291
+ "2": LMOutput(finish_details={"type": "error", "message": "..."}),
292
+ }
293
+ ```
294
+
295
+ The `GoogleLMInvoker` also supports the following standalone batch processing operations:
296
+
297
+ 1. Create a batch job:
298
+ ```python
299
+ requests = {"1": "What color is the sky?", "2": "What color is the grass?"}
300
+ batch_id = await lm_invoker.batch.create(requests)
301
+ ```
302
+
303
+ 2. Get the status of a batch job:
304
+ ```python
305
+ status = await lm_invoker.batch.status(batch_id)
306
+ ```
307
+
308
+ 3. Retrieve the results of a batch job:
309
+
310
+ In default, the results will be keyed by request index in the format \'1\', \'2\', etc,
311
+ in which order are preserved based on the original request order.
312
+
313
+
314
+ ```python
315
+ results = await lm_invoker.batch.retrieve(batch_id)
316
+ ```
317
+
318
+ Output example:
319
+ ```python
320
+ {
321
+ "1": LMOutput(outputs=[LMOutputItem(type="text", output="The sky is blue.")]),
322
+ "2": LMOutput(finish_details={"type": "error", "error": {"message": "...", ...}, ...}),
323
+ }
324
+ ```
325
+
326
+ If you pass custom_request_ids to the create method, the results will be keyed by the custom_request_ids.
327
+ ```python
328
+ results = await lm_invoker.batch.retrieve(batch_id, custom_request_ids=["request_1", "request_2"])
329
+ ```
330
+
331
+ Output example:
332
+ ```python
333
+ {
334
+ "request_1": LMOutput(outputs=[LMOutputItem(type="text", output="The sky is blue.")]),
335
+ "request_2": LMOutput(finish_details={"type": "error", "error": {"message": "...", ...}, ...}),
336
+ }
337
+ ```
338
+
339
+ 4. List the batch jobs:
340
+ ```python
341
+ batch_jobs = await lm_invoker.batch.list()
342
+ ```
343
+
344
+ Output example:
345
+ ```python
346
+ [
347
+ {"id": "batch_123", "status": "finished"},
348
+ {"id": "batch_456", "status": "in_progress"},
349
+ {"id": "batch_789", "status": "canceling"},
350
+ ]
351
+ ```
352
+
353
+ 5. Cancel a batch job:
354
+ ```python
355
+ await lm_invoker.batch.cancel(batch_id)
356
+ ```
263
357
  '''
264
358
  client_params: Incomplete
265
359
  image_generation: Incomplete
@@ -133,6 +133,24 @@ class BaseLMInvoker(ABC, metaclass=abc.ABCMeta):
133
133
  This method clears the response schema for the language model by calling the `set_response_schema` method with
134
134
  None.
135
135
  """
136
+ async def count_input_tokens(self, messages: LMInput) -> int:
137
+ """Counts the input tokens for an invocation request inputs.
138
+
139
+ This method counts the input tokens for an invocation request inputs. This method is useful for:
140
+ 1. Estimating the cost of an invocation request before invoking the language model.
141
+ 2. Checking if the invocation request is too large to be processed by the language model.
142
+
143
+ Args:
144
+ messages (LMInput): The input messages for the language model.
145
+ 1. If a list of Message objects is provided, it is used as is.
146
+ 2. If a list of MessageContent or a string is provided, it is converted into a user message.
147
+
148
+ Returns:
149
+ int: The number of input tokens for the invocation request.
150
+
151
+ Raises:
152
+ TimeoutError: If the invocation times out.
153
+ """
136
154
  async def invoke(self, messages: LMInput, hyperparameters: dict[str, Any] | None = None, event_emitter: EventEmitter | None = None) -> str | LMOutput:
137
155
  """Invokes the language model.
138
156
 
@@ -7,6 +7,9 @@ from gllm_inference.lm_invoker.lm_invoker import BaseLMInvoker as BaseLMInvoker
7
7
  from gllm_inference.lm_invoker.schema.openai import InputType as InputType, Key as Key, OutputType as OutputType, ReasoningEffort as ReasoningEffort, ReasoningSummary as ReasoningSummary
8
8
  from gllm_inference.schema import ActivityEvent as ActivityEvent, Attachment as Attachment, AttachmentType as AttachmentType, CodeEvent as CodeEvent, CodeExecResult as CodeExecResult, LMOutput as LMOutput, MCPCall as MCPCall, MCPCallActivity as MCPCallActivity, MCPListToolsActivity as MCPListToolsActivity, MCPServer as MCPServer, Message as Message, MessageRole as MessageRole, ModelId as ModelId, ModelProvider as ModelProvider, Reasoning as Reasoning, ResponseSchema as ResponseSchema, ThinkingEvent as ThinkingEvent, TokenUsage as TokenUsage, ToolCall as ToolCall, ToolResult as ToolResult, WebSearchActivity as WebSearchActivity
9
9
  from langchain_core.tools import Tool as LangChainTool
10
+ from openai import AsyncStream as AsyncStream
11
+ from openai.types.responses import Response as Response, ResponseFunctionWebSearch as ResponseFunctionWebSearch, ResponseOutputItem as ResponseOutputItem
12
+ from openai.types.responses.response_output_item import McpCall as McpCall, McpListTools as McpListTools
10
13
  from typing import Any
11
14
 
12
15
  SUPPORTED_ATTACHMENTS: Incomplete
@@ -7,8 +7,10 @@ class Key:
7
7
  FUNCTION: str
8
8
  FUNCTION_CALL: str
9
9
  HTTP_OPTIONS: str
10
+ ID: str
10
11
  NAME: str
11
12
  RETRY_OPTIONS: str
13
+ STATUS: str
12
14
  SYSTEM_INSTRUCTION: str
13
15
  THINKING_CONFIG: str
14
16
  TIMEOUT: str
@@ -16,9 +18,19 @@ class Key:
16
18
  RESPONSE_SCHEMA: str
17
19
  RESPONSE_MIME_TYPE: str
18
20
  VERTEXAI: str
21
+ CUSTOM_REQUEST_IDS: str
19
22
 
20
23
  class InputType:
21
24
  """Defines valid input types in Google."""
22
25
  APPLICATION_JSON: str
23
26
  MODEL: str
24
27
  USER: str
28
+
29
+ class JobState:
30
+ """Defines valid output types in Google."""
31
+ JOB_STATE_CANCELLED: str
32
+ JOB_STATE_EXPIRED: str
33
+ JOB_STATE_FAILED: str
34
+ JOB_STATE_PENDING: str
35
+ JOB_STATE_RUNNING: str
36
+ JOB_STATE_SUCCEEDED: str
@@ -80,6 +80,7 @@ class OutputType:
80
80
  FIND_IN_PAGE: str
81
81
  FUNCTION_CALL: str
82
82
  IMAGE: str
83
+ IMAGE_GENERATION_CALL: str
83
84
  INCOMPLETE: str
84
85
  ITEM_DONE: str
85
86
  MCP_CALL: str
@@ -0,0 +1,48 @@
1
+ from _typeshed import Incomplete
2
+ from gllm_core.schema.tool import Tool as Tool
3
+ from gllm_core.utils import RetryConfig as RetryConfig
4
+ from gllm_inference.constants import INVOKER_PROPAGATED_MAX_RETRIES as INVOKER_PROPAGATED_MAX_RETRIES
5
+ from gllm_inference.lm_invoker.openai_chat_completions_lm_invoker import OpenAIChatCompletionsLMInvoker as OpenAIChatCompletionsLMInvoker
6
+ from gllm_inference.lm_invoker.schema.openai_chat_completions import Key as Key
7
+ from gllm_inference.schema import ModelId as ModelId, ModelProvider as ModelProvider, ResponseSchema as ResponseSchema
8
+ from langchain_core.tools import Tool as LangChainTool
9
+ from typing import Any
10
+
11
+ SEA_LION_URL: str
12
+ SUPPORTED_ATTACHMENTS: Incomplete
13
+
14
+ class SeaLionLMInvoker(OpenAIChatCompletionsLMInvoker):
15
+ """A language model invoker to interact with SEA-LION API.
16
+
17
+ Attributes:
18
+ model_id (str): The model ID of the language model.
19
+ model_provider (str): The provider of the language model.
20
+ model_name (str): The name of the language model.
21
+ client_kwargs (dict[str, Any]): The keyword arguments for the OpenAI client.
22
+ default_hyperparameters (dict[str, Any]): Default hyperparameters for invoking the model.
23
+ tools (list[Tool]): The list of tools provided to the model to enable tool calling.
24
+ response_schema (ResponseSchema | None): The schema of the response. If provided, the model will output a
25
+ structured response as defined by the schema. Supports both Pydantic BaseModel and JSON schema dictionary.
26
+ output_analytics (bool): Whether to output the invocation analytics.
27
+ retry_config (RetryConfig | None): The retry configuration for the language model.
28
+ """
29
+ client_kwargs: Incomplete
30
+ def __init__(self, model_name: str, api_key: str | None = None, 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) -> None:
31
+ """Initializes a new instance of the SeaLionLMInvoker class.
32
+
33
+ Args:
34
+ model_name (str): The name of the SEA-LION language model.
35
+ api_key (str | None, optional): The API key for authenticating with the SEA-LION API.
36
+ Defaults to None, in which case the `SEA_LION_API_KEY` environment variable will be used.
37
+ model_kwargs (dict[str, Any] | None, optional): Additional model parameters. Defaults to None.
38
+ default_hyperparameters (dict[str, Any] | None, optional): Default hyperparameters for invoking the model.
39
+ Defaults to None.
40
+ tools (list[Tool | LangChainTool] | None, optional): Tools provided to the model to enable tool calling.
41
+ Defaults to None.
42
+ response_schema (ResponseSchema | None, optional): The schema of the response. If provided, the model will
43
+ output a structured response as defined by the schema. Supports both Pydantic BaseModel and JSON schema
44
+ dictionary. Defaults to None.
45
+ output_analytics (bool, optional): Whether to output the invocation analytics. Defaults to False.
46
+ retry_config (RetryConfig | None, optional): The retry configuration for the language model.
47
+ Defaults to None, in which case a default config with no retry and 30.0 seconds timeout will be used.
48
+ """
@@ -7,6 +7,7 @@ from gllm_inference.model.em.voyage_em import VoyageEM as VoyageEM
7
7
  from gllm_inference.model.lm.anthropic_lm import AnthropicLM as AnthropicLM
8
8
  from gllm_inference.model.lm.google_lm import GoogleLM as GoogleLM
9
9
  from gllm_inference.model.lm.openai_lm import OpenAILM as OpenAILM
10
+ from gllm_inference.model.lm.sea_lion_lm import SeaLionLM as SeaLionLM
10
11
  from gllm_inference.model.lm.xai_lm import XAILM as XAILM
11
12
 
12
- __all__ = ['AnthropicLM', 'CohereEM', 'GoogleEM', 'GoogleLM', 'JinaEM', 'OpenAIEM', 'OpenAILM', 'TwelveLabsEM', 'VoyageEM', 'XAILM']
13
+ __all__ = ['AnthropicLM', 'CohereEM', 'GoogleEM', 'GoogleLM', 'JinaEM', 'OpenAIEM', 'OpenAILM', 'SeaLionLM', 'TwelveLabsEM', 'VoyageEM', 'XAILM']
@@ -0,0 +1,16 @@
1
+ class SeaLionLM:
2
+ '''Defines SEA-LION language model names constants.
3
+
4
+ Usage example:
5
+ ```python
6
+ from gllm_inference.model import SeaLionLM
7
+ from gllm_inference.lm_invoker import SeaLionLMInvoker
8
+
9
+ lm_invoker = SeaLionLMInvoker(SeaLionLM.GEMMA_SEA_LION_V4_27B_IT)
10
+ response = await lm_invoker.invoke("Hello, world!")
11
+ ```
12
+ '''
13
+ GEMMA_SEA_LION_V4_27B_IT: str
14
+ LLAMA_SEA_LION_V3_5_70B_R: str
15
+ LLAMA_SEA_LION_V3_70B_IT: str
16
+ QWEN_SEA_LION_V4_32B_IT: str
@@ -1,6 +1,6 @@
1
1
  from _typeshed import Incomplete
2
2
  from gllm_inference.prompt_builder.format_strategy import JinjaFormatStrategy as JinjaFormatStrategy, StringFormatStrategy as StringFormatStrategy
3
- from gllm_inference.schema import JinjaEnvType as JinjaEnvType, Message as Message, MessageContent as MessageContent, MessageRole as MessageRole
3
+ from gllm_inference.schema import HistoryFormatter as HistoryFormatter, JinjaEnvType as JinjaEnvType, Message as Message, MessageContent as MessageContent, MessageRole as MessageRole
4
4
  from jinja2.sandbox import SandboxedEnvironment as SandboxedEnvironment
5
5
  from typing import Any
6
6
 
@@ -13,13 +13,15 @@ class PromptBuilder:
13
13
  prompt_key_set (set[str]): A set of expected keys that must be present in the prompt templates.
14
14
  key_defaults (dict[str, str]): Default values for the keys in the prompt templates.
15
15
  strategy (BasePromptFormattingStrategy): The format strategy to be used for formatting the prompt.
16
+ history_formatter (HistoryFormatter): The history formatter to be used for formatting the history.
16
17
  """
17
18
  key_defaults: Incomplete
18
19
  system_template: Incomplete
19
20
  user_template: Incomplete
21
+ history_formatter: Incomplete
20
22
  strategy: Incomplete
21
23
  prompt_key_set: Incomplete
22
- def __init__(self, system_template: str = '', user_template: str = '', key_defaults: dict[str, str] | None = None, ignore_extra_keys: bool | None = None, use_jinja: bool = False, jinja_env: JinjaEnvType | SandboxedEnvironment = ...) -> None:
24
+ def __init__(self, system_template: str = '', user_template: str = '', key_defaults: dict[str, str] | None = None, ignore_extra_keys: bool | None = None, history_formatter: HistoryFormatter | None = None, use_jinja: bool | None = False, jinja_env: JinjaEnvType | SandboxedEnvironment | None = None) -> None:
23
25
  """Initializes a new instance of the PromptBuilder class.
24
26
 
25
27
  Args:
@@ -32,6 +34,8 @@ class PromptBuilder:
32
34
  Defaults to None, in which case no default values will be assigned to the keys.
33
35
  ignore_extra_keys (bool | None, optional): Deprecated parameter. Will be removed in v0.6. Extra keys
34
36
  will always raise a warning only instead of raising an error.
37
+ history_formatter (HistoryFormatter | None, optional): The history formatter to be used for formatting
38
+ the history. Defaults to None, in which case the history will be used as is.
35
39
  use_jinja (bool, optional): Whether to use Jinja for rendering the prompt templates.
36
40
  Defaults to False.
37
41
  jinja_env (JinjaEnvType | SandboxedEnvironment, optional): The environment for Jinja rendering.
@@ -4,6 +4,7 @@ from gllm_inference.schema.code_exec_result import CodeExecResult as CodeExecRes
4
4
  from gllm_inference.schema.config import TruncationConfig as TruncationConfig
5
5
  from gllm_inference.schema.enums import AttachmentType as AttachmentType, BatchStatus as BatchStatus, EmitDataType as EmitDataType, JinjaEnvType as JinjaEnvType, LMEventType as LMEventType, LMEventTypeSuffix as LMEventTypeSuffix, LMOutputType as LMOutputType, MessageRole as MessageRole, TruncateSide as TruncateSide
6
6
  from gllm_inference.schema.events import ActivityEvent as ActivityEvent, CodeEvent as CodeEvent, ThinkingEvent as ThinkingEvent
7
+ from gllm_inference.schema.formatter import HistoryFormatter as HistoryFormatter
7
8
  from gllm_inference.schema.lm_input import LMInput as LMInput
8
9
  from gllm_inference.schema.lm_output import LMOutput as LMOutput, LMOutputData as LMOutputData, LMOutputItem as LMOutputItem
9
10
  from gllm_inference.schema.mcp import MCPCall as MCPCall, MCPServer as MCPServer
@@ -15,4 +16,4 @@ from gllm_inference.schema.tool_call import ToolCall as ToolCall
15
16
  from gllm_inference.schema.tool_result import ToolResult as ToolResult
16
17
  from gllm_inference.schema.type_alias import EMContent as EMContent, MessageContent as MessageContent, ResponseSchema as ResponseSchema, Vector as Vector
17
18
 
18
- __all__ = ['Activity', 'ActivityEvent', 'Attachment', 'AttachmentType', 'BatchStatus', 'CodeEvent', 'CodeExecResult', 'EMContent', 'EmitDataType', 'InputTokenDetails', 'JinjaEnvType', 'LMEventType', 'LMEventTypeSuffix', 'LMInput', 'LMOutput', 'LMOutputItem', 'LMOutputData', 'LMOutputType', 'MCPCall', 'MCPCallActivity', 'MCPListToolsActivity', 'MCPServer', 'Message', 'MessageContent', 'MessageRole', 'ModelId', 'ModelProvider', 'OutputTokenDetails', 'Reasoning', 'ResponseSchema', 'ThinkingEvent', 'TokenUsage', 'ToolCall', 'ToolResult', 'TruncateSide', 'TruncationConfig', 'Vector', 'WebSearchActivity']
19
+ __all__ = ['Activity', 'ActivityEvent', 'Attachment', 'AttachmentType', 'BatchStatus', 'CodeEvent', 'CodeExecResult', 'EMContent', 'EmitDataType', 'HistoryFormatter', 'InputTokenDetails', 'JinjaEnvType', 'LMEventType', 'LMEventTypeSuffix', 'LMInput', 'LMOutput', 'LMOutputItem', 'LMOutputData', 'LMOutputType', 'MCPCall', 'MCPCallActivity', 'MCPListToolsActivity', 'MCPServer', 'Message', 'MessageContent', 'MessageRole', 'ModelId', 'ModelProvider', 'OutputTokenDetails', 'Reasoning', 'ResponseSchema', 'ThinkingEvent', 'TokenUsage', 'ToolCall', 'ToolResult', 'TruncateSide', 'TruncationConfig', 'Vector', 'WebSearchActivity']
@@ -1,7 +1,9 @@
1
1
  from _typeshed import Incomplete
2
2
  from pydantic import BaseModel
3
+ from typing import Any
3
4
 
4
5
  HEX_REPR_LENGTH: int
6
+ METADATA_ITEM_REPR_LENGTH: int
5
7
  logger: Incomplete
6
8
 
7
9
  class Attachment(BaseModel):
@@ -13,68 +15,80 @@ class Attachment(BaseModel):
13
15
  mime_type (str): The mime type of the file attachment.
14
16
  extension (str): The extension of the file attachment.
15
17
  url (str | None): The URL of the file attachment. Defaults to None.
18
+ metadata (dict[str, Any]): The metadata of the file attachment. Defaults to an empty dictionary.
16
19
  """
17
20
  data: bytes
18
21
  filename: str
19
22
  mime_type: str
20
23
  extension: str
21
24
  url: str | None
25
+ metadata: dict[str, Any]
22
26
  @classmethod
23
- def from_bytes(cls, bytes: bytes, filename: str | None = None) -> Attachment:
27
+ def from_bytes(cls, bytes: bytes, filename: str | None = None, metadata: dict[str, Any] | None = None) -> Attachment:
24
28
  """Creates an Attachment from bytes.
25
29
 
26
30
  Args:
27
31
  bytes (bytes): The bytes of the file.
28
32
  filename (str | None, optional): The filename of the file. Defaults to None,
29
33
  in which case the filename will be derived from the extension.
34
+ metadata (dict[str, Any] | None, optional): The metadata of the file attachment. Defaults to None,
35
+ in which case an empty dictionary will be used.
30
36
 
31
37
  Returns:
32
38
  Attachment: The instantiated Attachment.
33
39
  """
34
40
  @classmethod
35
- def from_base64(cls, base64_data: str, filename: str | None = None) -> Attachment:
41
+ def from_base64(cls, base64_data: str, filename: str | None = None, metadata: dict[str, Any] | None = None) -> Attachment:
36
42
  """Creates an Attachment from a base64 string.
37
43
 
38
44
  Args:
39
45
  base64_data (str): The base64 string of the file.
40
46
  filename (str | None, optional): The filename of the file. Defaults to None,
41
47
  in which case the filename will be derived from the mime type.
48
+ metadata (dict[str, Any] | None, optional): The metadata of the file attachment. Defaults to None,
49
+ in which case an empty dictionary will be used.
42
50
 
43
51
  Returns:
44
52
  Attachment: The instantiated Attachment.
45
53
  """
46
54
  @classmethod
47
- def from_data_url(cls, data_url: str, filename: str | None = None) -> Attachment:
55
+ def from_data_url(cls, data_url: str, filename: str | None = None, metadata: dict[str, Any] | None = None) -> Attachment:
48
56
  """Creates an Attachment from a data URL (data:[mime/type];base64,[bytes]).
49
57
 
50
58
  Args:
51
59
  data_url (str): The data URL of the file.
52
60
  filename (str | None, optional): The filename of the file. Defaults to None,
53
61
  in which case the filename will be derived from the mime type.
62
+ metadata (dict[str, Any] | None, optional): The metadata of the file attachment. Defaults to None,
63
+ in which case an empty dictionary will be used.
54
64
 
55
65
  Returns:
56
66
  Attachment: The instantiated Attachment.
57
67
  """
58
68
  @classmethod
59
- def from_url(cls, url: str, filename: str | None = None) -> Attachment:
69
+ def from_url(cls, url: str, filename: str | None = None, metadata: dict[str, Any] | None = None) -> Attachment:
60
70
  """Creates an Attachment from a URL.
61
71
 
62
72
  Args:
63
73
  url (str): The URL of the file.
64
74
  filename (str | None, optional): The filename of the file. Defaults to None,
65
75
  in which case the filename will be derived from the URL.
76
+ metadata (dict[str, Any] | None, optional): The metadata of the file attachment. Defaults to None,
77
+ in which case an empty dictionary will be used.
66
78
 
67
79
  Returns:
68
80
  Attachment: The instantiated Attachment.
69
81
  """
70
82
  @classmethod
71
- def from_path(cls, path: str, filename: str | None = None) -> Attachment:
83
+ def from_path(cls, path: str, filename: str | None = None, metadata: dict[str, Any] | None = None) -> Attachment:
72
84
  """Creates an Attachment from a path.
73
85
 
74
86
  Args:
75
87
  path (str): The path to the file.
76
88
  filename (str | None, optional): The filename of the file. Defaults to None,
77
89
  in which case the filename will be derived from the path.
90
+ metadata (dict[str, Any] | None, optional): The metadata of the file attachment. Defaults to None,
91
+ in which case an empty dictionary will be used.
78
92
 
79
93
  Returns:
80
94
  Attachment: The instantiated Attachment.
@@ -9,9 +9,11 @@ class AttachmentType(StrEnum):
9
9
 
10
10
  class BatchStatus(StrEnum):
11
11
  """Defines the status of a batch job."""
12
- CANCELING = 'canceling'
13
12
  IN_PROGRESS = 'in_progress'
14
13
  FINISHED = 'finished'
14
+ FAILED = 'failed'
15
+ CANCELING = 'canceling'
16
+ EXPIRED = 'expired'
15
17
  UNKNOWN = 'unknown'
16
18
 
17
19
  class LMEventType(StrEnum):
@@ -0,0 +1,31 @@
1
+ from gllm_inference.schema.enums import MessageRole as MessageRole
2
+ from gllm_inference.schema.message import Message as Message
3
+ from gllm_inference.schema.type_alias import MessageContent as MessageContent
4
+ from pydantic import BaseModel
5
+
6
+ class HistoryFormatter(BaseModel):
7
+ """Configuration for history formatting.
8
+
9
+ Attributes:
10
+ prefix_user_message (str): Prefix for user messages.
11
+ suffix_user_message (str): Suffix for user messages.
12
+ prefix_assistant_message (str): Prefix for assistant messages.
13
+ suffix_assistant_message (str): Suffix for assistant messages.
14
+ """
15
+ prefix_user_message: str
16
+ suffix_user_message: str
17
+ prefix_assistant_message: str
18
+ suffix_assistant_message: str
19
+ def format_history(self, history: list[Message]) -> list[Message]:
20
+ """Formats a list of messages based on their roles.
21
+
22
+ This method formats each message in the history list by applying the appropriate
23
+ formatting based on the message role (user or assistant). Other message types
24
+ are added to the result without modification.
25
+
26
+ Args:
27
+ history (list[Message]): The list of messages to format.
28
+
29
+ Returns:
30
+ list[Message]: A new list containing the formatted messages.
31
+ """
@@ -21,6 +21,7 @@ class ModelProvider(StrEnum):
21
21
  PORTKEY = 'portkey'
22
22
  OPENAI_CHAT_COMPLETIONS = 'openai-chat-completions'
23
23
  OPENAI_COMPATIBLE = 'openai-compatible'
24
+ SEA_LION = 'sea-lion'
24
25
  TWELVELABS = 'twelvelabs'
25
26
  VOYAGE = 'voyage'
26
27
  XAI = 'xai'
gllm_inference.pyi CHANGED
@@ -33,6 +33,7 @@ import gllm_inference.lm_invoker.OpenAIChatCompletionsLMInvoker
33
33
  import gllm_inference.lm_invoker.OpenAICompatibleLMInvoker
34
34
  import gllm_inference.lm_invoker.OpenAILMInvoker
35
35
  import gllm_inference.lm_invoker.PortkeyLMInvoker
36
+ import gllm_inference.lm_invoker.SeaLionLMInvoker
36
37
  import gllm_inference.lm_invoker.XAILMInvoker
37
38
  import gllm_inference.prompt_builder.PromptBuilder
38
39
  import gllm_inference.output_parser.JSONOutputParser
@@ -82,6 +83,7 @@ import voyageai
82
83
  import voyageai.client_async
83
84
  import http
84
85
  import http.HTTPStatus
86
+ import __future__
85
87
  import uuid
86
88
  import gllm_core.constants
87
89
  import gllm_core.event
@@ -113,7 +115,6 @@ import time
113
115
  import jsonschema
114
116
  import gllm_inference.lm_invoker.batch.BatchOperations
115
117
  import gllm_inference.schema.MessageContent
116
- import __future__
117
118
  import gllm_inference.schema.ActivityEvent
118
119
  import gllm_inference.schema.CodeEvent
119
120
  import gllm_inference.schema.CodeExecResult
@@ -135,6 +136,7 @@ import jinja2.sandbox
135
136
  import gllm_inference.schema.JinjaEnvType
136
137
  import gllm_inference.prompt_builder.format_strategy.JinjaFormatStrategy
137
138
  import gllm_inference.prompt_builder.format_strategy.StringFormatStrategy
139
+ import gllm_inference.schema.HistoryFormatter
138
140
  import transformers
139
141
  import gllm_inference.prompt_formatter.HuggingFacePromptFormatter
140
142
  import traceback
@@ -148,6 +150,7 @@ import pathlib.Path
148
150
  import filetype
149
151
  import magic
150
152
  import requests
153
+ import gllm_core.schema.chunk
151
154
  import binascii
152
155
  import fnmatch
153
156
  import importlib
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gllm-inference-binary
3
- Version: 0.5.57
3
+ Version: 0.5.65
4
4
  Summary: A library containing components related to model inferences in Gen AI applications.
5
- Author-email: Henry Wicaksono <henry.wicaksono@gdplabs.id>, Resti Febrina <resti.febrina@gdplabs.id>
5
+ Author-email: Henry Wicaksono <henry.wicaksono@gdplabs.id>, "Delfia N. A. Putri" <delfia.n.a.putri@gdplabs.id>
6
6
  Requires-Python: <3.14,>=3.11
7
7
  Description-Content-Type: text/markdown
8
8
  Requires-Dist: poetry<3.0.0,>=2.1.3
@@ -33,7 +33,7 @@ Requires-Dist: aioboto3<16.0.0,>=15.0.0; extra == "bedrock"
33
33
  Provides-Extra: cohere
34
34
  Requires-Dist: cohere<6.0.0,>=5.18.0; extra == "cohere"
35
35
  Provides-Extra: datasaur
36
- Requires-Dist: openai<2.0.0,>=1.98.0; extra == "datasaur"
36
+ Requires-Dist: openai<3.0.0,>=2.7.0; extra == "datasaur"
37
37
  Provides-Extra: google
38
38
  Requires-Dist: google-genai<=1.36,>=1.23; extra == "google"
39
39
  Provides-Extra: huggingface
@@ -42,7 +42,7 @@ Requires-Dist: transformers<5.0.0,>=4.52.0; extra == "huggingface"
42
42
  Provides-Extra: litellm
43
43
  Requires-Dist: litellm<2.0.0,>=1.69.2; extra == "litellm"
44
44
  Provides-Extra: openai
45
- Requires-Dist: openai<2.0.0,>=1.98.0; extra == "openai"
45
+ Requires-Dist: openai<3.0.0,>=2.7.0; extra == "openai"
46
46
  Provides-Extra: portkey-ai
47
47
  Requires-Dist: portkey-ai<2.0.0,>=1.14.4; extra == "portkey-ai"
48
48
  Provides-Extra: twelvelabs
@@ -1,11 +1,11 @@
1
- gllm_inference.cpython-313-x86_64-linux-gnu.so,sha256=PTkaVkJSAvooZuKI01fjrFMNkBqGNfVJIhnjB-eTk2U,5708888
2
- gllm_inference.pyi,sha256=U5ETTUzO_5DKsg4Zp7WQ-rnG_RJKCAqKaf6FoNNw2m4,5067
1
+ gllm_inference.cpython-313-x86_64-linux-gnu.so,sha256=aMQyK0sMg5NfAmDJGrrX58UWy28FZQApYc78D87pK6k,5819608
2
+ gllm_inference.pyi,sha256=3UoxsyZnC_6PhNzIKIp37rL6CNEw-Ve0RJHiG9jLOBY,5193
3
3
  gllm_inference/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  gllm_inference/constants.pyi,sha256=tBFhwE1at2gXMJ1bBM32eVIRgCJlB1uzg7ItXGx3RQE,316
5
5
  gllm_inference/builder/__init__.pyi,sha256=usz2lvfwO4Yk-ZGKXbCWG1cEr3nlQXxMNDNC-2yc1NM,500
6
6
  gllm_inference/builder/_build_invoker.pyi,sha256=v__-YT0jGmLqEsgl7Abk9we-wYWcyVFvlRN_Uu4vVak,848
7
7
  gllm_inference/builder/build_em_invoker.pyi,sha256=0IVcRGaciPBAFcgvGRC4-Kje_PPXOSug77LqxRc-x_U,5749
8
- gllm_inference/builder/build_lm_invoker.pyi,sha256=TBAr7Sk9Jgckdlfj69pYOzZFMsooL-FpfbPYt_kCcXU,8852
8
+ gllm_inference/builder/build_lm_invoker.pyi,sha256=o4dIL90wDu94y_fIeUs2ei5Qkk1zZo5_nYBqL2EiHAE,9195
9
9
  gllm_inference/builder/build_lm_request_processor.pyi,sha256=KbQkcPa8C-yzyelht4mWLP8kDmh17itAT3tn8ZJB6pg,4144
10
10
  gllm_inference/builder/build_output_parser.pyi,sha256=_Lrq-bh1oPsb_Nwkkr_zyEUwIOMysRFZkvEtEM29LZM,936
11
11
  gllm_inference/catalog/__init__.pyi,sha256=JBkPGTyiiZ30GECzJBW-mW8LekWyY2qyzal3eW7ynaM,287
@@ -40,33 +40,34 @@ gllm_inference/exceptions/__init__.pyi,sha256=Upcuj7od2lkbdueQ0iMT2ktFYYi-KKTynT
40
40
  gllm_inference/exceptions/error_parser.pyi,sha256=IOfa--NpLUW5E9Qq0mwWi6ZpTAbUyyNe6iAqunBNGLI,1999
41
41
  gllm_inference/exceptions/exceptions.pyi,sha256=Bv996qLa_vju0Qjf4GewMxdkq8CV9LRZb0S6289DldA,5725
42
42
  gllm_inference/exceptions/provider_error_map.pyi,sha256=XPLWU42-r8MHZgg5ZkE80Gdqg3p8Z_JHvq_Na03iTqY,1243
43
- gllm_inference/lm_invoker/__init__.pyi,sha256=Ze9CxgGYguyz8BAU87_2JM-D4OZjlYAqktLI_B2tj_s,1488
44
- gllm_inference/lm_invoker/anthropic_lm_invoker.pyi,sha256=oU0dzg87OHTVPGhKBT8WdcdR0AzeJJNSSVvGKtY0UQU,15178
43
+ gllm_inference/lm_invoker/__init__.pyi,sha256=dvwZQhO-7bHDOouXBXxujux9QQbu10ux-0vAsJI1DeI,1603
44
+ gllm_inference/lm_invoker/anthropic_lm_invoker.pyi,sha256=_by_rLLdBpnpIyniBVCOEhjur5HzdBJ1UYoXdpxb8Lw,15409
45
45
  gllm_inference/lm_invoker/azure_openai_lm_invoker.pyi,sha256=drtMgbDzBQJrWXLiI2t5PNy7HtcW5Kuj0XR2b6rltjc,12936
46
46
  gllm_inference/lm_invoker/bedrock_lm_invoker.pyi,sha256=9Gz0U2c94UM9SOt-_e89_NqT_bDQ6wECRiJ9VTwsqfw,10739
47
47
  gllm_inference/lm_invoker/datasaur_lm_invoker.pyi,sha256=IqvDxBzwEf2z34FZcLKIH404y386Rnk5gsj2TcAm424,7878
48
- gllm_inference/lm_invoker/google_lm_invoker.pyi,sha256=wWnLHY-Q9Id6E5al4Wy57gIViTIJ-R-ZjLK1SFnESZw,16363
48
+ gllm_inference/lm_invoker/google_lm_invoker.pyi,sha256=DrMIhGhWolSBH26jTkx9zaXTVcRBqxBwNWgzI3InODE,20063
49
49
  gllm_inference/lm_invoker/langchain_lm_invoker.pyi,sha256=OzISl89C2s-qB6VxNlMgf5dFRC-ooj30YCFfsZzcX4s,11887
50
50
  gllm_inference/lm_invoker/litellm_lm_invoker.pyi,sha256=0PZYitAljAjzyympqqNyN5fMyoakmqr1XIz1PE6NNc4,11176
51
- gllm_inference/lm_invoker/lm_invoker.pyi,sha256=pJ0-s37NqTHdFD7IijvNzJnQ7JXgrGxsEaXuS8cxz3s,8487
51
+ gllm_inference/lm_invoker/lm_invoker.pyi,sha256=tgyv7A8K_36mYxL_Fkb7DFCZfJT_Hy08CKSiSJ88f0M,9370
52
52
  gllm_inference/lm_invoker/openai_chat_completions_lm_invoker.pyi,sha256=47lMyuzWKn57Ndt124-zzl9kKHa7IYzDu51iRdUPg6c,13636
53
53
  gllm_inference/lm_invoker/openai_compatible_lm_invoker.pyi,sha256=i5pMpZf4-r_7FQ1qfsqcjpc98sI-cPiqheuTfTEKxJs,4192
54
- gllm_inference/lm_invoker/openai_lm_invoker.pyi,sha256=OytpncpkOLdaSyFQ41GLh4_MioEbpsX0WiA8zc70Q6s,22313
54
+ gllm_inference/lm_invoker/openai_lm_invoker.pyi,sha256=oKVs5UnJJxjWaO7Rd0mmwPfBqEFeZRI09mmRdONs3js,22618
55
55
  gllm_inference/lm_invoker/portkey_lm_invoker.pyi,sha256=ewxzRT-ekmvCFeb7ij840s4p18AO_LAKA-UP0ot12hs,14940
56
+ gllm_inference/lm_invoker/sea_lion_lm_invoker.pyi,sha256=ElV7iKYWnI3J1CUYuHtvOTsJByMY_l2WF4Rc7IJsBjw,3485
56
57
  gllm_inference/lm_invoker/xai_lm_invoker.pyi,sha256=SVIsRGcqbRnR9sqoLYWwigoEumDib5m4cTaTJT98Uz4,12765
57
58
  gllm_inference/lm_invoker/batch/__init__.pyi,sha256=W4W-_yfk7lL20alREJai6GnwuQvdlKRfwQCX4mQK4XI,127
58
- gllm_inference/lm_invoker/batch/batch_operations.pyi,sha256=Oo7hoyPSfPZdy1mXvSdvtRndvq-XTIbPIjEoGvJj5C0,5372
59
+ gllm_inference/lm_invoker/batch/batch_operations.pyi,sha256=cEdRVHAb5uiIPnlQudtaNzQ9kszI7cH6nD9mpMYQLco,5445
59
60
  gllm_inference/lm_invoker/schema/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
61
  gllm_inference/lm_invoker/schema/anthropic.pyi,sha256=6lreMyHKRfZzX5NBYKnQf1Z6RzXBjTvqZj2VbMeaTLQ,1098
61
62
  gllm_inference/lm_invoker/schema/bedrock.pyi,sha256=FJLY-ZkkLUYDV48pfsLatnot4ev_xxz9xAayLK28CpU,1027
62
63
  gllm_inference/lm_invoker/schema/datasaur.pyi,sha256=WSuwOqL1j2ZioCZFC-gbB7vTRIZHQ3sU40c3ool5L6c,265
63
- gllm_inference/lm_invoker/schema/google.pyi,sha256=AIsNgq0ZZuicHmx4bL7z6q-946T05nWts3HUeA8hhHQ,505
64
+ gllm_inference/lm_invoker/schema/google.pyi,sha256=MYjznjkKfNdh9XwTIrrK29tS4pkGPEU7WebVfCvFLGw,791
64
65
  gllm_inference/lm_invoker/schema/langchain.pyi,sha256=rZcIxuvABI4pKfyVvkRBRqfJJogZ67EFPydpubHt49c,429
65
- gllm_inference/lm_invoker/schema/openai.pyi,sha256=PS4QrNYa1NPq0s-3r8FI22a2Td0n70UONLxPn8rP_s4,2279
66
+ gllm_inference/lm_invoker/schema/openai.pyi,sha256=y__q2_2ZcfqCkWBw3uA6iCEQKDCm7IJoLVo3GS-ck9c,2310
66
67
  gllm_inference/lm_invoker/schema/openai_chat_completions.pyi,sha256=8byBRZ4xyTidIQJsZqiSjp5t1X875Obe-aEbT0yYfuA,1199
67
68
  gllm_inference/lm_invoker/schema/portkey.pyi,sha256=NeRjHNd84HgE_ur2F3Cv6Jx30v6V7eQvI_iJiq4kuME,631
68
69
  gllm_inference/lm_invoker/schema/xai.pyi,sha256=cWnbJmDtllqRH3NXpQbiXgkNBcUXr8ksDSDywcgJebE,632
69
- gllm_inference/model/__init__.pyi,sha256=LTeBCSJJwCSd5Qrg7RZCXcp9fURNVNXFR5akk1ZZrTk,810
70
+ gllm_inference/model/__init__.pyi,sha256=1gesoNUUHutpN2-DYmVrG5LZhpeSW96ciON3SjVEqqM,894
70
71
  gllm_inference/model/em/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
72
  gllm_inference/model/em/cohere_em.pyi,sha256=fArRlV08NwbsJ_h6vpWr94XxUVBtbqW1Jh8s42LRXCo,488
72
73
  gllm_inference/model/em/google_em.pyi,sha256=ZPN5LmReO0bcTfnZixFooUTzgD-daNFPzfxzZ-5WzQQ,471
@@ -78,12 +79,13 @@ gllm_inference/model/lm/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
78
79
  gllm_inference/model/lm/anthropic_lm.pyi,sha256=dWfG-M_gD644yJ-LK_T8HnAT649j3Vx7TVof03XQimE,611
79
80
  gllm_inference/model/lm/google_lm.pyi,sha256=cMV5zYX8uwUF7pErv4pXnXD2G52umo3sxKwbSx7nFhQ,511
80
81
  gllm_inference/model/lm/openai_lm.pyi,sha256=u11zvvIS7-XaHKZ33cZxGQmT6cZ4DqK9Do8l7gFOUTc,618
82
+ gllm_inference/model/lm/sea_lion_lm.pyi,sha256=k0xG5JGrecBDlNKWwNZb4BG0Ath_tGfy4fudr51-10w,492
81
83
  gllm_inference/model/lm/xai_lm.pyi,sha256=2ZEQ_--e_zsb23zZQ8bKdQShU7zChx5TrDKF8EpwEpU,506
82
84
  gllm_inference/output_parser/__init__.pyi,sha256=WQOOgsYnPk8vd-SOhFMMaVTzy4gkYrOAyT5gnAxv0A0,129
83
85
  gllm_inference/output_parser/json_output_parser.pyi,sha256=uulh91uQLMSb4ZXZhHYi9W9w7zGnmrOweEkL6wdDJN8,2933
84
86
  gllm_inference/output_parser/output_parser.pyi,sha256=Yzk7F26pH8Uc7FQZo4G6l67YkfppefUvaV9cNK-HyDs,948
85
87
  gllm_inference/prompt_builder/__init__.pyi,sha256=kshfBMvwIwiIvjxiGG5BrJZNvpPa8rhtkbHo5FPifBg,117
86
- gllm_inference/prompt_builder/prompt_builder.pyi,sha256=VQaw8nE8SPK1nvVVB4YjeqZSazigNPuWvOEcgGji0W8,4557
88
+ gllm_inference/prompt_builder/prompt_builder.pyi,sha256=qJ6L81KMLdZvS2MmOGGjrJ9btmWwVPoRVl3NQxHq3fw,5010
87
89
  gllm_inference/prompt_builder/format_strategy/__init__.pyi,sha256=QhORHac3ySOPmL9k9kmCKL70vtaUtwkZEtGoRNWNuA8,308
88
90
  gllm_inference/prompt_builder/format_strategy/format_strategy.pyi,sha256=JSUl_7Ka08oDZPpslymkUa8pDzqNGIK2TlcVANspqrY,2273
89
91
  gllm_inference/prompt_builder/format_strategy/jinja_format_strategy.pyi,sha256=IAezLUiKSJMaoDyleo8pFnFqq8rBM_Q-lNXuAGvwXhI,2225
@@ -109,18 +111,19 @@ gllm_inference/realtime_chat/output_streamer/output_streamer.pyi,sha256=GPAw1wPS
109
111
  gllm_inference/request_processor/__init__.pyi,sha256=hVnfdNZnkTBJHnmLtN3Na4ANP0yK6AstWdIizVr2Apo,227
110
112
  gllm_inference/request_processor/lm_request_processor.pyi,sha256=VnYc8E3Iayyhw-rPnGPfTKuO3ohgFsS8HPrZJeyES5I,5889
111
113
  gllm_inference/request_processor/uses_lm_mixin.pyi,sha256=Yu0XPNuHxq1tWBviHTPw1oThojneFwGHepvGjBXxKQA,6382
112
- gllm_inference/schema/__init__.pyi,sha256=hgRrwTocQ8b5MDDosSQN8zEuarGckpVply1OwEbrd28,2404
114
+ gllm_inference/schema/__init__.pyi,sha256=OOZE9H4DgUqOsk5_01hXb5opkAwBmp1TvhqcV2SrqJY,2505
113
115
  gllm_inference/schema/activity.pyi,sha256=JnO2hqj91P5Tc6qb4pbkEMrHer2u5owiCvhl-igcQKQ,2303
114
- gllm_inference/schema/attachment.pyi,sha256=EHV3uPB3lVZCMNxySVuIoB6ikAiY7THSNh77q3ZtkVY,3246
116
+ gllm_inference/schema/attachment.pyi,sha256=oCopoxiPgGSkCRdPsqmjcMofTawfbdCDxaPdo6mits0,4509
115
117
  gllm_inference/schema/code_exec_result.pyi,sha256=ZTHh6JtRrPIdQ059P1UAiD2L-tAO1_S5YcMsAXfJ5A0,559
116
118
  gllm_inference/schema/config.pyi,sha256=rAL_UeXyQeXVk1P2kqd8vFWOMwmKenfpQLtvMP74t9s,674
117
- gllm_inference/schema/enums.pyi,sha256=jByrR0Y84-WZ3KDPUjuOyfecouUATyO-A8rdehKPjgs,2065
119
+ gllm_inference/schema/enums.pyi,sha256=rLTlnhtdTIKT_Q8p-ukKpCMhRk9NbqcR_ylZ0-8UivA,2111
118
120
  gllm_inference/schema/events.pyi,sha256=XQEy5SqYoutq2DguwCCTGi5DHrlnDai6nJElAYsj1gk,4638
121
+ gllm_inference/schema/formatter.pyi,sha256=qPQ1oSnmSgr7yBsBBMe-aehLLk9lKI9OPZ8Og-EbzdI,1281
119
122
  gllm_inference/schema/lm_input.pyi,sha256=A5pjz1id6tP9XRNhzQrbmzd66C_q3gzo0UP8rCemz6Q,193
120
123
  gllm_inference/schema/lm_output.pyi,sha256=ec5ErE68PVthNHhHlaVHsiAN3nn03yBqRR7HVabsf68,11401
121
124
  gllm_inference/schema/mcp.pyi,sha256=Vwu8E2BDl6FvvnI42gIyY3Oki1BdwRE3Uh3aV0rmhQU,1014
122
125
  gllm_inference/schema/message.pyi,sha256=VP9YppKj2mo1esl9cy6qQO9m2mMHUjTmfGDdyUor880,2220
123
- gllm_inference/schema/model_id.pyi,sha256=w_HA48gQ-TztufTCKS6RNlGLWGWJ9HaUyeloNdKW8sU,5816
126
+ gllm_inference/schema/model_id.pyi,sha256=MuH0KyFjI1uC9v7PoIU6Uuk6wPdpmczVrHZj0r5EcZk,5842
124
127
  gllm_inference/schema/reasoning.pyi,sha256=SlTuiDw87GdnAn-I6YOPIJRhEBiwQljM46JohG05guQ,562
125
128
  gllm_inference/schema/token_usage.pyi,sha256=1GTQVORV0dBNmD_jix8aVaUqxMKFF04KpLP7y2urqbk,2950
126
129
  gllm_inference/schema/tool_call.pyi,sha256=zQaVxCnkVxOfOEhBidqohU85gb4PRwnwBiygKaunamk,389
@@ -131,7 +134,7 @@ gllm_inference/utils/io_utils.pyi,sha256=7kUTacHAVRYoemFUOjCH7-Qmw-YsQGd6rGYxjf_
131
134
  gllm_inference/utils/langchain.pyi,sha256=VluQiHkGigDdqLUbhB6vnXiISCP5hHqV0qokYY6dC1A,1164
132
135
  gllm_inference/utils/validation.pyi,sha256=W9RQddN90F8SJMu_HXEQyQTDMBaRL-bo7fOosZWK7oY,438
133
136
  gllm_inference.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
134
- gllm_inference_binary-0.5.57.dist-info/METADATA,sha256=JTadwr_lJ2tUsITlqFi2WAbqvB9M3LApoy_Xj8fbgZE,5807
135
- gllm_inference_binary-0.5.57.dist-info/WHEEL,sha256=GrvfTP3j0ebqecWD3AHlLRzmSrTVGeL6T8Btq6Eg9eI,108
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,,
137
+ gllm_inference_binary-0.5.65.dist-info/METADATA,sha256=ZoIOAqMSWLFjLzw3e3FTD-H3GxGsndl9lxlK4MbwsgA,5815
138
+ gllm_inference_binary-0.5.65.dist-info/WHEEL,sha256=GrvfTP3j0ebqecWD3AHlLRzmSrTVGeL6T8Btq6Eg9eI,108
139
+ gllm_inference_binary-0.5.65.dist-info/top_level.txt,sha256=FpOjtN80F-qVNgbScXSEyqa0w09FYn6301iq6qt69IQ,15
140
+ gllm_inference_binary-0.5.65.dist-info/RECORD,,