gllm-inference-binary 0.5.40__cp313-cp313-win_amd64.whl → 0.5.42__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/builder/build_em_invoker.pyi +12 -1
- gllm_inference/constants.pyi +4 -2
- gllm_inference/em_invoker/__init__.pyi +2 -1
- gllm_inference/em_invoker/jina_em_invoker.pyi +103 -0
- gllm_inference/em_invoker/schema/jina.pyi +28 -0
- gllm_inference/lm_invoker/openai_lm_invoker.pyi +2 -1
- gllm_inference/schema/events.pyi +15 -15
- gllm_inference/schema/model_id.pyi +8 -0
- gllm_inference.cp313-win_amd64.pyd +0 -0
- gllm_inference.pyi +5 -3
- {gllm_inference_binary-0.5.40.dist-info → gllm_inference_binary-0.5.42.dist-info}/METADATA +1 -1
- {gllm_inference_binary-0.5.40.dist-info → gllm_inference_binary-0.5.42.dist-info}/RECORD +14 -12
- {gllm_inference_binary-0.5.40.dist-info → gllm_inference_binary-0.5.42.dist-info}/WHEEL +0 -0
- {gllm_inference_binary-0.5.40.dist-info → gllm_inference_binary-0.5.42.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
|
-
from gllm_inference.em_invoker import AzureOpenAIEMInvoker as AzureOpenAIEMInvoker, BedrockEMInvoker as BedrockEMInvoker, GoogleEMInvoker as GoogleEMInvoker, LangChainEMInvoker as LangChainEMInvoker, OpenAICompatibleEMInvoker as OpenAICompatibleEMInvoker, OpenAIEMInvoker as OpenAIEMInvoker, TwelveLabsEMInvoker as TwelveLabsEMInvoker, VoyageEMInvoker as VoyageEMInvoker
|
|
2
|
+
from gllm_inference.em_invoker import AzureOpenAIEMInvoker as AzureOpenAIEMInvoker, BedrockEMInvoker as BedrockEMInvoker, GoogleEMInvoker as GoogleEMInvoker, JinaEMInvoker as JinaEMInvoker, LangChainEMInvoker as LangChainEMInvoker, OpenAICompatibleEMInvoker as OpenAICompatibleEMInvoker, OpenAIEMInvoker as OpenAIEMInvoker, TwelveLabsEMInvoker as TwelveLabsEMInvoker, VoyageEMInvoker as VoyageEMInvoker
|
|
3
3
|
from gllm_inference.em_invoker.em_invoker import BaseEMInvoker as BaseEMInvoker
|
|
4
4
|
from gllm_inference.schema.model_id import ModelId as ModelId, ModelProvider as ModelProvider
|
|
5
5
|
from typing import Any
|
|
@@ -71,6 +71,16 @@ def build_em_invoker(model_id: str | ModelId, credentials: str | dict[str, Any]
|
|
|
71
71
|
```
|
|
72
72
|
Providing credentials through environment variable is not supported for Google Vertex AI.
|
|
73
73
|
|
|
74
|
+
# Using Jina
|
|
75
|
+
```python
|
|
76
|
+
em_invoker = build_em_invoker(
|
|
77
|
+
model_id="jina/jina-embeddings-v2-large",
|
|
78
|
+
credentials="jina-api-key"
|
|
79
|
+
)
|
|
80
|
+
```
|
|
81
|
+
The credentials can also be provided through the `JINA_API_KEY` environment variable. For the list of supported
|
|
82
|
+
models, please refer to the following page: https://jina.ai/models
|
|
83
|
+
|
|
74
84
|
# Using OpenAI
|
|
75
85
|
```python
|
|
76
86
|
em_invoker = build_em_invoker(
|
|
@@ -128,6 +138,7 @@ def build_em_invoker(model_id: str | ModelId, credentials: str | dict[str, Any]
|
|
|
128
138
|
variables credentials, please refer to the following page:
|
|
129
139
|
https://python.langchain.com/docs/integrations/text_embedding/
|
|
130
140
|
|
|
141
|
+
|
|
131
142
|
Security warning:
|
|
132
143
|
Please provide the EM invoker credentials ONLY to the `credentials` parameter. Do not put any kind of
|
|
133
144
|
credentials in the `config` parameter as the content of the `config` parameter will be logged.
|
gllm_inference/constants.pyi
CHANGED
|
@@ -2,10 +2,12 @@ from _typeshed import Incomplete
|
|
|
2
2
|
|
|
3
3
|
AZURE_OPENAI_URL_SUFFIX: str
|
|
4
4
|
DOCUMENT_MIME_TYPES: Incomplete
|
|
5
|
+
EMBEDDING_ENDPOINT: str
|
|
5
6
|
GOOGLE_SCOPES: Incomplete
|
|
6
7
|
GRPC_ENABLE_RETRIES_KEY: str
|
|
7
|
-
INVOKER_PROPAGATED_MAX_RETRIES: int
|
|
8
|
-
INVOKER_DEFAULT_TIMEOUT: float
|
|
9
8
|
HEX_REPR_LENGTH: int
|
|
9
|
+
INVOKER_DEFAULT_TIMEOUT: float
|
|
10
|
+
INVOKER_PROPAGATED_MAX_RETRIES: int
|
|
11
|
+
JINA_DEFAULT_URL: str
|
|
10
12
|
OPENAI_DEFAULT_URL: str
|
|
11
13
|
SECONDS_TO_MILLISECONDS: int
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from gllm_inference.em_invoker.azure_openai_em_invoker import AzureOpenAIEMInvoker as AzureOpenAIEMInvoker
|
|
2
2
|
from gllm_inference.em_invoker.bedrock_em_invoker import BedrockEMInvoker as BedrockEMInvoker
|
|
3
3
|
from gllm_inference.em_invoker.google_em_invoker import GoogleEMInvoker as GoogleEMInvoker
|
|
4
|
+
from gllm_inference.em_invoker.jina_em_invoker import JinaEMInvoker as JinaEMInvoker
|
|
4
5
|
from gllm_inference.em_invoker.langchain_em_invoker import LangChainEMInvoker as LangChainEMInvoker
|
|
5
6
|
from gllm_inference.em_invoker.openai_compatible_em_invoker import OpenAICompatibleEMInvoker as OpenAICompatibleEMInvoker
|
|
6
7
|
from gllm_inference.em_invoker.openai_em_invoker import OpenAIEMInvoker as OpenAIEMInvoker
|
|
7
8
|
from gllm_inference.em_invoker.twelevelabs_em_invoker import TwelveLabsEMInvoker as TwelveLabsEMInvoker
|
|
8
9
|
from gllm_inference.em_invoker.voyage_em_invoker import VoyageEMInvoker as VoyageEMInvoker
|
|
9
10
|
|
|
10
|
-
__all__ = ['AzureOpenAIEMInvoker', 'BedrockEMInvoker', 'GoogleEMInvoker', 'LangChainEMInvoker', 'OpenAIEMInvoker', 'OpenAICompatibleEMInvoker', 'TwelveLabsEMInvoker', 'VoyageEMInvoker']
|
|
11
|
+
__all__ = ['AzureOpenAIEMInvoker', 'BedrockEMInvoker', 'GoogleEMInvoker', 'JinaEMInvoker', 'LangChainEMInvoker', 'OpenAIEMInvoker', 'OpenAICompatibleEMInvoker', 'TwelveLabsEMInvoker', 'VoyageEMInvoker']
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from gllm_core.utils.retry import RetryConfig as RetryConfig
|
|
3
|
+
from gllm_inference.constants import EMBEDDING_ENDPOINT as EMBEDDING_ENDPOINT, JINA_DEFAULT_URL as JINA_DEFAULT_URL
|
|
4
|
+
from gllm_inference.em_invoker.em_invoker import BaseEMInvoker as BaseEMInvoker
|
|
5
|
+
from gllm_inference.em_invoker.schema.jina import InputType as InputType, Key as Key
|
|
6
|
+
from gllm_inference.exceptions import BaseInvokerError as BaseInvokerError, ProviderInternalError as ProviderInternalError
|
|
7
|
+
from gllm_inference.exceptions.error_parser import convert_http_status_to_base_invoker_error as convert_http_status_to_base_invoker_error
|
|
8
|
+
from gllm_inference.schema import Attachment as Attachment, AttachmentType as AttachmentType, EMContent as EMContent, ModelId as ModelId, ModelProvider as ModelProvider, TruncationConfig as TruncationConfig, Vector as Vector
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
SUPPORTED_ATTACHMENTS: Incomplete
|
|
12
|
+
MULTIMODAL_MODELS: Incomplete
|
|
13
|
+
|
|
14
|
+
class JinaEMInvoker(BaseEMInvoker):
|
|
15
|
+
'''An embedding model invoker to interact with Jina AI embedding models.
|
|
16
|
+
|
|
17
|
+
Attributes:
|
|
18
|
+
model_id (str): The model ID of the embedding model.
|
|
19
|
+
model_provider (str): The provider of the embedding model.
|
|
20
|
+
model_name (str): The name of the embedding model.
|
|
21
|
+
client (AsyncClient): The client for the Jina AI API.
|
|
22
|
+
default_hyperparameters (dict[str, Any]): Default hyperparameters for invoking the embedding model.
|
|
23
|
+
retry_config (RetryConfig): The retry configuration for the embedding model.
|
|
24
|
+
truncation_config (TruncationConfig | None): The truncation configuration for the embedding model.
|
|
25
|
+
|
|
26
|
+
Input types:
|
|
27
|
+
The `JinaEMInvoker` supports the following input types: text and image.
|
|
28
|
+
Non-text inputs must be passed as a `Attachment` object.
|
|
29
|
+
|
|
30
|
+
Output format:
|
|
31
|
+
The `JinaEMInvoker` can embed either:
|
|
32
|
+
1. A single content.
|
|
33
|
+
1. A single content is either a text or an image.
|
|
34
|
+
2. The output will be a `Vector`, representing the embedding of the content.
|
|
35
|
+
|
|
36
|
+
# Example 1: Embedding a text content.
|
|
37
|
+
```python
|
|
38
|
+
text = "What animal is in this image?"
|
|
39
|
+
result = await em_invoker.invoke(text)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
# Example 2: Embedding an image content.
|
|
43
|
+
```python
|
|
44
|
+
image = Attachment.from_path("path/to/local/image.png")
|
|
45
|
+
result = await em_invoker.invoke(image)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The above examples will return a `Vector` with a size of (embedding_size,).
|
|
49
|
+
|
|
50
|
+
2. A list of contents.
|
|
51
|
+
1. A list of contents is a list that consists of any of the above single contents.
|
|
52
|
+
2. The output will be a `list[Vector]`, where each element is a `Vector` representing the
|
|
53
|
+
embedding of each single content.
|
|
54
|
+
|
|
55
|
+
# Example: Embedding a list of contents.
|
|
56
|
+
```python
|
|
57
|
+
text = "What animal is in this image?"
|
|
58
|
+
image = Attachment.from_path("path/to/local/image.png")
|
|
59
|
+
result = await em_invoker.invoke([text, image])
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The above examples will return a `list[Vector]` with a size of (2, embedding_size).
|
|
63
|
+
|
|
64
|
+
Retry and timeout:
|
|
65
|
+
The `JinaEMInvoker` supports retry and timeout configuration.
|
|
66
|
+
By default, the max retries is set to 0 and the timeout is set to 30.0 seconds.
|
|
67
|
+
They can be customized by providing a custom `RetryConfig` object to the `retry_config` parameter.
|
|
68
|
+
|
|
69
|
+
Retry config examples:
|
|
70
|
+
```python
|
|
71
|
+
retry_config = RetryConfig(max_retries=0, timeout=None) # No retry, no timeout
|
|
72
|
+
retry_config = RetryConfig(max_retries=0, timeout=10.0) # No retry, 10.0 seconds timeout
|
|
73
|
+
retry_config = RetryConfig(max_retries=5, timeout=None) # 5 max retries, no timeout
|
|
74
|
+
retry_config = RetryConfig(max_retries=5, timeout=10.0) # 5 max retries, 10.0 seconds timeout
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Usage example:
|
|
78
|
+
```python
|
|
79
|
+
em_invoker = JinaEMInvoker(..., retry_config=retry_config)
|
|
80
|
+
```
|
|
81
|
+
'''
|
|
82
|
+
client: Incomplete
|
|
83
|
+
model_kwargs: Incomplete
|
|
84
|
+
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, retry_config: RetryConfig | None = None, truncation_config: TruncationConfig | None = None) -> None:
|
|
85
|
+
'''Initializes a new instance of the JinaEMInvoker class.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
model_name (str): The name of the Jina embedding model to be used.
|
|
89
|
+
api_key (str | None, optional): The API key for authenticating with Jina AI.
|
|
90
|
+
Defaults to None, in which case the `JINA_API_KEY` environment variable will be used.
|
|
91
|
+
base_url (str, optional): The base URL for the Jina AI API. Defaults to "https://api.jina.ai/v1".
|
|
92
|
+
model_kwargs (dict[str, Any] | None, optional): Additional keyword arguments for the HTTP client.
|
|
93
|
+
Defaults to None.
|
|
94
|
+
default_hyperparameters (dict[str, Any] | None, optional): Default hyperparameters for invoking the model.
|
|
95
|
+
Defaults to None.
|
|
96
|
+
retry_config (RetryConfig | None, optional): The retry configuration for the embedding model.
|
|
97
|
+
Defaults to None, in which case a default config with no retry and 30.0 seconds timeout will be used.
|
|
98
|
+
truncation_config (TruncationConfig | None, optional): Configuration for text truncation behavior.
|
|
99
|
+
Defaults to None, in which case no truncation is applied.
|
|
100
|
+
|
|
101
|
+
Raises:
|
|
102
|
+
ValueError: If neither `api_key` nor `JINA_API_KEY` environment variable is provided.
|
|
103
|
+
'''
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
|
|
3
|
+
class InputType(StrEnum):
|
|
4
|
+
"""Defines the supported input types for the Jina AI embedding API."""
|
|
5
|
+
IMAGE_URL = 'image_url'
|
|
6
|
+
TEXT = 'text'
|
|
7
|
+
|
|
8
|
+
class Key(StrEnum):
|
|
9
|
+
"""Defines key constants used in the Jina AI API payloads."""
|
|
10
|
+
DATA = 'data'
|
|
11
|
+
EMBEDDING = 'embedding'
|
|
12
|
+
ERROR = 'error'
|
|
13
|
+
IMAGE_URL = 'image_url'
|
|
14
|
+
INPUT = 'input'
|
|
15
|
+
JSON = 'json'
|
|
16
|
+
MESSAGE = 'message'
|
|
17
|
+
MODEL = 'model'
|
|
18
|
+
RESPONSE = 'response'
|
|
19
|
+
STATUS = 'status'
|
|
20
|
+
TASK = 'task'
|
|
21
|
+
TEXT = 'text'
|
|
22
|
+
TYPE = 'type'
|
|
23
|
+
URL = 'url'
|
|
24
|
+
|
|
25
|
+
class OutputType(StrEnum):
|
|
26
|
+
"""Defines the expected output types returned by the Jina AI embedding API."""
|
|
27
|
+
DATA = 'data'
|
|
28
|
+
EMBEDDING = 'embedding'
|
|
@@ -11,7 +11,8 @@ from langchain_core.tools import Tool as LangChainTool
|
|
|
11
11
|
from typing import Any
|
|
12
12
|
|
|
13
13
|
SUPPORTED_ATTACHMENTS: Incomplete
|
|
14
|
-
|
|
14
|
+
STREAM_DATA_START_TYPE_MAP: Incomplete
|
|
15
|
+
STREAM_DATA_END_TYPE_MAP: Incomplete
|
|
15
16
|
STREAM_DATA_CONTENT_TYPE_MAP: Incomplete
|
|
16
17
|
|
|
17
18
|
class OpenAILMInvoker(BaseLMInvoker):
|
gllm_inference/schema/events.pyi
CHANGED
|
@@ -8,7 +8,7 @@ class ActivityEvent(Event):
|
|
|
8
8
|
"""Event schema for model-triggered activities (e.g. web search, MCP).
|
|
9
9
|
|
|
10
10
|
Attributes:
|
|
11
|
-
id (str): The unique identifier for the activity event. Defaults to an
|
|
11
|
+
id (str): The unique identifier for the activity event. Defaults to an empty string.
|
|
12
12
|
type (Literal): The type of event, always 'activity'.
|
|
13
13
|
value (Activity): The activity data containing message and type.
|
|
14
14
|
level (EventLevel): The severity level of the event. Defined through the EventLevel constants.
|
|
@@ -22,7 +22,7 @@ class CodeEvent(Event):
|
|
|
22
22
|
"""Event schema for model-triggered code execution.
|
|
23
23
|
|
|
24
24
|
Attributes:
|
|
25
|
-
id (str): The unique identifier for the code event. Defaults to an
|
|
25
|
+
id (str): The unique identifier for the code event. Defaults to an empty string.
|
|
26
26
|
type (Literal): The type of event (code, code_start, or code_end).
|
|
27
27
|
value (str): The code content.
|
|
28
28
|
level (EventLevel): The severity level of the event. Defined through the EventLevel constants.
|
|
@@ -32,32 +32,32 @@ class CodeEvent(Event):
|
|
|
32
32
|
value: str
|
|
33
33
|
level: EventLevel
|
|
34
34
|
@classmethod
|
|
35
|
-
def start(cls,
|
|
35
|
+
def start(cls, id_: str | None = '') -> CodeEvent:
|
|
36
36
|
"""Create a code start event.
|
|
37
37
|
|
|
38
38
|
Args:
|
|
39
|
-
|
|
39
|
+
id_ (str | None): The unique identifier for the code event. Defaults to an empty string.
|
|
40
40
|
|
|
41
41
|
Returns:
|
|
42
42
|
CodeEvent: The code start event.
|
|
43
43
|
"""
|
|
44
44
|
@classmethod
|
|
45
|
-
def content(cls,
|
|
45
|
+
def content(cls, id_: str | None = '', value: str = '') -> CodeEvent:
|
|
46
46
|
"""Create a code content event.
|
|
47
47
|
|
|
48
48
|
Args:
|
|
49
|
-
|
|
49
|
+
id_ (str | None): The unique identifier for the code event. Defaults to an empty string.
|
|
50
50
|
value (str): The code content.
|
|
51
51
|
|
|
52
52
|
Returns:
|
|
53
53
|
CodeEvent: The code value event.
|
|
54
54
|
"""
|
|
55
55
|
@classmethod
|
|
56
|
-
def end(cls,
|
|
56
|
+
def end(cls, id_: str | None = '') -> CodeEvent:
|
|
57
57
|
"""Create a code end event.
|
|
58
58
|
|
|
59
59
|
Args:
|
|
60
|
-
|
|
60
|
+
id_ (str | None): The unique identifier for the code event. Defaults to an empty string.
|
|
61
61
|
|
|
62
62
|
Returns:
|
|
63
63
|
CodeEvent: The code end event.
|
|
@@ -67,7 +67,7 @@ class ThinkingEvent(Event):
|
|
|
67
67
|
"""Event schema for model thinking.
|
|
68
68
|
|
|
69
69
|
Attributes:
|
|
70
|
-
id (str): The unique identifier for the thinking event. Defaults to an
|
|
70
|
+
id (str): The unique identifier for the thinking event. Defaults to an empty string.
|
|
71
71
|
type (Literal): The type of thinking event (thinking, thinking_start, or thinking_end).
|
|
72
72
|
value (str): The thinking content or message.
|
|
73
73
|
level (EventLevel): The severity level of the event. Defined through the EventLevel constants.
|
|
@@ -77,32 +77,32 @@ class ThinkingEvent(Event):
|
|
|
77
77
|
value: str
|
|
78
78
|
level: EventLevel
|
|
79
79
|
@classmethod
|
|
80
|
-
def start(cls,
|
|
80
|
+
def start(cls, id_: str | None = '') -> ThinkingEvent:
|
|
81
81
|
"""Create a thinking start event.
|
|
82
82
|
|
|
83
83
|
Args:
|
|
84
|
-
|
|
84
|
+
id_ (str | None): The unique identifier for the thinking event. Defaults to an empty string.
|
|
85
85
|
|
|
86
86
|
Returns:
|
|
87
87
|
ThinkingEvent: The thinking start event.
|
|
88
88
|
"""
|
|
89
89
|
@classmethod
|
|
90
|
-
def content(cls,
|
|
90
|
+
def content(cls, id_: str | None = '', value: str = '') -> ThinkingEvent:
|
|
91
91
|
"""Create a thinking value event.
|
|
92
92
|
|
|
93
93
|
Args:
|
|
94
|
-
|
|
94
|
+
id_ (str | None): The unique identifier for the thinking event. Defaults to an empty string.
|
|
95
95
|
value (str): The thinking content or message.
|
|
96
96
|
|
|
97
97
|
Returns:
|
|
98
98
|
ThinkingEvent: The thinking value event.
|
|
99
99
|
"""
|
|
100
100
|
@classmethod
|
|
101
|
-
def end(cls,
|
|
101
|
+
def end(cls, id_: str | None = '') -> ThinkingEvent:
|
|
102
102
|
"""Create a thinking end event.
|
|
103
103
|
|
|
104
104
|
Args:
|
|
105
|
-
|
|
105
|
+
id_ (str | None): The unique identifier for the thinking event. Defaults to an empty string.
|
|
106
106
|
|
|
107
107
|
Returns:
|
|
108
108
|
ThinkingEvent: The thinking end event.
|
|
@@ -14,6 +14,7 @@ class ModelProvider(StrEnum):
|
|
|
14
14
|
BEDROCK = 'bedrock'
|
|
15
15
|
DATASAUR = 'datasaur'
|
|
16
16
|
GOOGLE = 'google'
|
|
17
|
+
JINA = 'jina'
|
|
17
18
|
LANGCHAIN = 'langchain'
|
|
18
19
|
LITELLM = 'litellm'
|
|
19
20
|
OPENAI = 'openai'
|
|
@@ -55,6 +56,13 @@ class ModelId(BaseModel):
|
|
|
55
56
|
model_id = ModelId.from_string("google/gemini-2.5-flash-lite")
|
|
56
57
|
```
|
|
57
58
|
|
|
59
|
+
# Using Jina
|
|
60
|
+
```python
|
|
61
|
+
model_id = ModelId.from_string("jina/jina-embeddings-v2-large")
|
|
62
|
+
```
|
|
63
|
+
For the list of supported models, please refer to the following page:
|
|
64
|
+
https://jina.ai/models
|
|
65
|
+
|
|
58
66
|
# Using OpenAI
|
|
59
67
|
```python
|
|
60
68
|
model_id = ModelId.from_string("openai/gpt-5-nano")
|
|
Binary file
|
gllm_inference.pyi
CHANGED
|
@@ -15,6 +15,7 @@ import gllm_core.utils
|
|
|
15
15
|
import gllm_inference.em_invoker.AzureOpenAIEMInvoker
|
|
16
16
|
import gllm_inference.em_invoker.BedrockEMInvoker
|
|
17
17
|
import gllm_inference.em_invoker.GoogleEMInvoker
|
|
18
|
+
import gllm_inference.em_invoker.JinaEMInvoker
|
|
18
19
|
import gllm_inference.em_invoker.LangChainEMInvoker
|
|
19
20
|
import gllm_inference.em_invoker.OpenAICompatibleEMInvoker
|
|
20
21
|
import gllm_inference.em_invoker.OpenAIEMInvoker
|
|
@@ -60,6 +61,9 @@ import google
|
|
|
60
61
|
import google.auth
|
|
61
62
|
import google.genai
|
|
62
63
|
import google.genai.types
|
|
64
|
+
import base64
|
|
65
|
+
import httpx
|
|
66
|
+
import gllm_inference.exceptions.ProviderInternalError
|
|
63
67
|
import concurrent
|
|
64
68
|
import concurrent.futures
|
|
65
69
|
import concurrent.futures.ThreadPoolExecutor
|
|
@@ -71,14 +75,13 @@ import gllm_inference.utils.load_langchain_model
|
|
|
71
75
|
import gllm_inference.utils.parse_model_data
|
|
72
76
|
import openai
|
|
73
77
|
import io
|
|
74
|
-
import httpx
|
|
75
78
|
import twelvelabs
|
|
76
|
-
import base64
|
|
77
79
|
import sys
|
|
78
80
|
import voyageai
|
|
79
81
|
import voyageai.client_async
|
|
80
82
|
import http
|
|
81
83
|
import http.HTTPStatus
|
|
84
|
+
import uuid
|
|
82
85
|
import gllm_core.constants
|
|
83
86
|
import gllm_core.event
|
|
84
87
|
import gllm_core.schema
|
|
@@ -135,7 +138,6 @@ import gllm_inference.realtime_chat.output_streamer.ConsoleOutputStreamer
|
|
|
135
138
|
import google.genai.live
|
|
136
139
|
import gllm_core.utils.logger_manager
|
|
137
140
|
import mimetypes
|
|
138
|
-
import uuid
|
|
139
141
|
import pathlib
|
|
140
142
|
import pathlib.Path
|
|
141
143
|
import filetype
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: gllm-inference-binary
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.42
|
|
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,9 +1,9 @@
|
|
|
1
|
-
gllm_inference.cp313-win_amd64.pyd,sha256=
|
|
2
|
-
gllm_inference.pyi,sha256=
|
|
1
|
+
gllm_inference.cp313-win_amd64.pyd,sha256=FYH5KTQcK7_qnRISOhH_EgUHRR5OuNaCaJrqsP7zsmc,3619840
|
|
2
|
+
gllm_inference.pyi,sha256=ifuvcH5p0J0Q2zXwfqXT4Sh5kcodA7O8x6SmQJ-_M0w,4852
|
|
3
3
|
gllm_inference/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
gllm_inference/constants.pyi,sha256=
|
|
4
|
+
gllm_inference/constants.pyi,sha256=PncjVw-mkzcJ3ln1ohvVZGdJ-TD-VZy1Ygn4Va8Z7i0,350
|
|
5
5
|
gllm_inference/builder/__init__.pyi,sha256=-bw1uDx7CAM7pkvjvb1ZXku9zXlQ7aEAyC83KIn3bz8,506
|
|
6
|
-
gllm_inference/builder/build_em_invoker.pyi,sha256=
|
|
6
|
+
gllm_inference/builder/build_em_invoker.pyi,sha256=ij24IMOYIYjia_cONdVhfW0QpulqyqG6nQhTdo5fYs0,6195
|
|
7
7
|
gllm_inference/builder/build_lm_invoker.pyi,sha256=HvQICF-qvOTzfXZUqhi7rlwcpkMZpxaC-8QZmhnXKzI,7466
|
|
8
8
|
gllm_inference/builder/build_lm_request_processor.pyi,sha256=H7Rg88e7PTTCtuyY64r333moTmh4-ypOwgnG10gkEdY,4232
|
|
9
9
|
gllm_inference/builder/build_output_parser.pyi,sha256=sgSTrzUmSRxPzUUum0fDU7A3NXYoYhpi6bEx4Q2XMnA,965
|
|
@@ -11,11 +11,12 @@ gllm_inference/catalog/__init__.pyi,sha256=HWgPKWIzprpMHRKe_qN9BZSIQhVhrqiyjLjIX
|
|
|
11
11
|
gllm_inference/catalog/catalog.pyi,sha256=eWPqgQKi-SJGHabi_XOTEKpAj96OSRypKsb5ZEC1VWU,4911
|
|
12
12
|
gllm_inference/catalog/lm_request_processor_catalog.pyi,sha256=FiveqPDkV58XbDO2znXL-Ix5tFbZwNiVnitlEa90YOY,5536
|
|
13
13
|
gllm_inference/catalog/prompt_builder_catalog.pyi,sha256=iViWB4SaezzjQY4UY1YxeoXUNxqxa2cTJGaD9JSx4Q8,3279
|
|
14
|
-
gllm_inference/em_invoker/__init__.pyi,sha256=
|
|
14
|
+
gllm_inference/em_invoker/__init__.pyi,sha256=ClcAHvB87iqUZ-clWxKqT0dD3v6Tas43pQiRWOgYnog,1100
|
|
15
15
|
gllm_inference/em_invoker/azure_openai_em_invoker.pyi,sha256=TXC5Kgf1eZqK2FHKAyeG3LB1SEsSEStnbk9bI1mjC5k,5049
|
|
16
16
|
gllm_inference/em_invoker/bedrock_em_invoker.pyi,sha256=kQETh2r-WR_H3APtt4QavmfwGOR3KB4k6USNYvFateY,5831
|
|
17
17
|
gllm_inference/em_invoker/em_invoker.pyi,sha256=YDYJ8TGScsz5Gg-OBnEENN1tI1RYvwoddypxUr6SAWw,5191
|
|
18
18
|
gllm_inference/em_invoker/google_em_invoker.pyi,sha256=zZYjeLp9ncwIVM4UHqDJSVOFn1eXiaz9Ba24-_fCF2c,6953
|
|
19
|
+
gllm_inference/em_invoker/jina_em_invoker.pyi,sha256=wrivFiPFRWBSw-TEAkaQKBvBRhlzN6CBaZkc0HOslRw,5754
|
|
19
20
|
gllm_inference/em_invoker/langchain_em_invoker.pyi,sha256=nhX6LynrjhfySEt_44OlLoSBd15hoz3giWyNM9CYLKY,3544
|
|
20
21
|
gllm_inference/em_invoker/openai_compatible_em_invoker.pyi,sha256=SbvCbOhdpkq6IyPhGd_IlxD8hbXDZID2rIehY6mJOIs,2923
|
|
21
22
|
gllm_inference/em_invoker/openai_em_invoker.pyi,sha256=dwZr9rjrjm060HEnyaPR9-jFJpxSi7fWx7i9ZB4aEY4,6313
|
|
@@ -26,6 +27,7 @@ gllm_inference/em_invoker/langchain/em_invoker_embeddings.pyi,sha256=BBSDazMOckO
|
|
|
26
27
|
gllm_inference/em_invoker/schema/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
28
|
gllm_inference/em_invoker/schema/bedrock.pyi,sha256=HoNgVi0T21aFd1JrCnSLu4yryv8k8RnYdR3-tIdHFgA,498
|
|
28
29
|
gllm_inference/em_invoker/schema/google.pyi,sha256=bzdtu4DFH2kATLybIeNl_Lznj99H-6u2Fvx3Zx52oZg,190
|
|
30
|
+
gllm_inference/em_invoker/schema/jina.pyi,sha256=EFo4d8HuzPEZDV5F0PwUIkYPrCTEiCqHq17ICzYxKeg,739
|
|
29
31
|
gllm_inference/em_invoker/schema/langchain.pyi,sha256=SZ13HDcvAOGmDTi2b72H6Y1J5GePR21JdnM6gYrwcGs,117
|
|
30
32
|
gllm_inference/em_invoker/schema/openai.pyi,sha256=rNRqN62y5wHOKlr4T0n0m41ikAnSrD72CTnoHxo6kEM,146
|
|
31
33
|
gllm_inference/em_invoker/schema/openai_compatible.pyi,sha256=A9MOeBhI-IPuvewOk4YYOAGtgyKohERx6-9cEYtbwvs,157
|
|
@@ -46,7 +48,7 @@ gllm_inference/lm_invoker/litellm_lm_invoker.pyi,sha256=IJxRUkmgXY8oQwS7tJoskO8f
|
|
|
46
48
|
gllm_inference/lm_invoker/lm_invoker.pyi,sha256=vUmMNEl7F__PavQJ42scoYGyWdEvZOw2Bwxhoqv_gKE,8659
|
|
47
49
|
gllm_inference/lm_invoker/openai_chat_completions_lm_invoker.pyi,sha256=uYJFgi4tJGab77232IC1gdoU9h9AqoClIUj6tM6O47s,15177
|
|
48
50
|
gllm_inference/lm_invoker/openai_compatible_lm_invoker.pyi,sha256=T9sShA_9fgEuaaAuT2gJZq_EYNbEhf3IkWwMCwfszY8,4244
|
|
49
|
-
gllm_inference/lm_invoker/openai_lm_invoker.pyi,sha256=
|
|
51
|
+
gllm_inference/lm_invoker/openai_lm_invoker.pyi,sha256=10iKCyleqHNbJc8M1rj3ogRcNlNxcVgyk0v6TcS6gf4,23452
|
|
50
52
|
gllm_inference/lm_invoker/xai_lm_invoker.pyi,sha256=gyi12K7M9HkjNX6pU6NVv5Uq3-aHErixO-PVhHjioo8,14632
|
|
51
53
|
gllm_inference/lm_invoker/batch/__init__.pyi,sha256=vJOTHRJ83oq8Bq0UsMdID9_HW5JAxr06gUs4aPRZfEE,130
|
|
52
54
|
gllm_inference/lm_invoker/batch/batch_operations.pyi,sha256=o2U17M41RKVFW6j_oxy-SxU1JqUtVt75pKRxrqXzorE,5499
|
|
@@ -101,12 +103,12 @@ gllm_inference/schema/attachment.pyi,sha256=9zgAjGXBjLfzPGaKi68FMW6b5mXdEA352nDe
|
|
|
101
103
|
gllm_inference/schema/code_exec_result.pyi,sha256=WQ-ARoGM9r6nyRX-A0Ro1XKiqrc9R3jRYXZpu_xo5S4,573
|
|
102
104
|
gllm_inference/schema/config.pyi,sha256=NVmjQK6HipIE0dKSfx12hgIC0O-S1HEcAc-TWlXAF5A,689
|
|
103
105
|
gllm_inference/schema/enums.pyi,sha256=U30RGvNFcNNJxTZZPt8vK7SFp3W4KSPVFxTZaiF1eLU,1375
|
|
104
|
-
gllm_inference/schema/events.pyi,sha256=
|
|
106
|
+
gllm_inference/schema/events.pyi,sha256=HMkGU1XoLDR6h9-L13LEn_27Z9jkmKk-kBTD-0qKzJY,4029
|
|
105
107
|
gllm_inference/schema/lm_input.pyi,sha256=HxQiZgY7zcXh_Dw8nK8LSeBTZEHMPZVwmPmnfgSsAbs,197
|
|
106
108
|
gllm_inference/schema/lm_output.pyi,sha256=DIV8BiIOPaSnMKxzKzH_Mp7j7-MScWCvmllegJDLqFg,2479
|
|
107
109
|
gllm_inference/schema/mcp.pyi,sha256=4SgQ83pEowfWm2p-w9lupV4NayqqVBOy7SuYxIFeWRs,1045
|
|
108
110
|
gllm_inference/schema/message.pyi,sha256=jJV6A0ihEcun2OhzyMtNkiHnf7d6v5R-GdpTBGfJ0AQ,2272
|
|
109
|
-
gllm_inference/schema/model_id.pyi,sha256=
|
|
111
|
+
gllm_inference/schema/model_id.pyi,sha256=eFNCNAmDSk0M6SqjDq8JRs0I1UcVzx2JhYWaHSFDGTQ,5667
|
|
110
112
|
gllm_inference/schema/reasoning.pyi,sha256=jbPxkDRHt0Vt-zdcc8lTT1l2hIE1Jm3HIHeNd0hfXGo,577
|
|
111
113
|
gllm_inference/schema/token_usage.pyi,sha256=WJiGQyz5qatzBK2b-sABLCyTRLCBbAvxCRcqSJOzu-8,3025
|
|
112
114
|
gllm_inference/schema/tool_call.pyi,sha256=OWT9LUqs_xfUcOkPG0aokAAqzLYYDkfnjTa0zOWvugk,403
|
|
@@ -117,7 +119,7 @@ gllm_inference/utils/io_utils.pyi,sha256=Eg7dvHWdXslTKdjh1j3dG50i7r35XG2zTmJ9XXv
|
|
|
117
119
|
gllm_inference/utils/langchain.pyi,sha256=4AwFiVAO0ZpdgmqeC4Pb5NJwBt8vVr0MSUqLeCdTscc,1194
|
|
118
120
|
gllm_inference/utils/validation.pyi,sha256=-RdMmb8afH7F7q4Ao7x6FbwaDfxUHn3hA3WiOgzB-3s,397
|
|
119
121
|
gllm_inference.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
|
|
120
|
-
gllm_inference_binary-0.5.
|
|
121
|
-
gllm_inference_binary-0.5.
|
|
122
|
-
gllm_inference_binary-0.5.
|
|
123
|
-
gllm_inference_binary-0.5.
|
|
122
|
+
gllm_inference_binary-0.5.42.dist-info/METADATA,sha256=tpuAFFqRUaKa8IeR8xqcX5b0j4e_BkVO9xA7AnIfNGY,5770
|
|
123
|
+
gllm_inference_binary-0.5.42.dist-info/WHEEL,sha256=O_u6PJIQ2pIcyIInxVQ9r-yArMuUZbBIaF1kpYVkYxA,96
|
|
124
|
+
gllm_inference_binary-0.5.42.dist-info/top_level.txt,sha256=FpOjtN80F-qVNgbScXSEyqa0w09FYn6301iq6qt69IQ,15
|
|
125
|
+
gllm_inference_binary-0.5.42.dist-info/RECORD,,
|
|
File without changes
|
{gllm_inference_binary-0.5.40.dist-info → gllm_inference_binary-0.5.42.dist-info}/top_level.txt
RENAMED
|
File without changes
|