LLM-Bridge 2.4.2__tar.gz → 2.4.4__tar.gz
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.
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/PKG-INFO +1 -1
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/gemini/gemini_response_handler.py +1 -1
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/model_client/gemini_client.py +0 -2
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_client_factory/gemini_client_factory.py +14 -27
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/message_process/message_processor.py +12 -1
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/resources/model_prices.json +9 -21
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/pyproject.toml +1 -1
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/single/config.py +4 -5
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/uv.lock +1 -1
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/.gitattributes +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/.github/workflows/pypi-publish.yaml +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/.github/workflows/python-test.yaml +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/.gitignore +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/.run/batch.run.xml +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/.run/pytest.run.xml +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/.run/single.run.xml +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/LICENSE +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/README.md +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/chat_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/claude/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/claude/claude_response_handler.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/claude/claude_token_counter.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/claude/non_stream_claude_client.py +2 -2
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/claude/stream_claude_client.py +2 -2
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/gemini/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/gemini/gemini_token_counter.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/gemini/non_stream_gemini_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/gemini/stream_gemini_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/http_error.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/openai_completion/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/openai_completion/non_stream_openai_completion_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/openai_completion/stream_openai_completion_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/openai_responses/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/openai_responses/non_stream_openai_responses_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/openai_responses/openai_responses_response_handler.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/openai_responses/stream_openai_responses_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/xai/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/xai/non_stream_xai_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/xai/stream_xai_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/model_client/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/model_client/claude_client.py +4 -4
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/model_client/openai_completion_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/model_client/openai_responses_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/model_client/xai_client.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/chat_client_factory.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/chat_message_converter.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/media_processor.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_client_factory/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_client_factory/claude_client_factory.py +4 -4
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_client_factory/openai_completion_client_factory.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_client_factory/openai_responses_client_factory.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_client_factory/xai_client_factory.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_message_converter/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_message_converter/claude_message_converter.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_message_converter/gemini_message_converter.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_message_converter/gemini_mime_types.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_message_converter/openai_completion_message_converter.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_message_converter/openai_responses_message_converter.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/model_message_converter/xai_message_converter.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/file_fetch.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/message_process/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/message_process/code_file_extensions.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/message_process/document_processor.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/message_process/file_type_checker.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/model_prices.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/resources/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/chat_response.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/message.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/model_message/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/model_message/claude_message.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/model_message/gemini_message.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/model_message/openai_completion_message.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/model_message/openai_responses_message.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/model_message/xai_message.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/serializer.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/chat_generate/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/chat_generate/model_message_converter/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/chat_generate/model_message_converter/claude_message_converter_test.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/chat_generate/model_message_converter/gemini_message_converter_test.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/chat_generate/model_message_converter/openai_completion_message_converter_test.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/chat_generate/model_message_converter/openai_responses_message_converter_test.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/chat_generate/model_message_converter/xai_message_converter_test.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/message_factory.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/message_process/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/message_process/file_type_checker_test.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/message_process/message_processor_test.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/model_prices_test.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/.env.example +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/batch/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/batch/batch.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/batch/config.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/example_file_urls.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/keys.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/messages.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/single/__init__.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/single/single.py +0 -0
- {llm_bridge-2.4.2 → llm_bridge-2.4.4}/usage/workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: LLM-Bridge
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.4
|
|
4
4
|
Summary: A library that wraps multiple LLM providers into a consistent API while using each provider's native SDK internally, supporting multimodal I/O, file processing, and stream output.
|
|
5
5
|
Author-email: windsnow1025 <windsnow1025@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -45,7 +45,7 @@ class GeminiResponseHandler:
|
|
|
45
45
|
if part.code_execution_result is not None:
|
|
46
46
|
code_output += part.code_execution_result.output
|
|
47
47
|
# File
|
|
48
|
-
if part.inline_data is not None:
|
|
48
|
+
if part.inline_data is not None and not part.thought:
|
|
49
49
|
mime_type = part.inline_data.mime_type
|
|
50
50
|
extension = mimetypes.guess_extension(mime_type) or ""
|
|
51
51
|
file = File(
|
|
@@ -13,13 +13,11 @@ class GeminiClient(ChatClient):
|
|
|
13
13
|
self,
|
|
14
14
|
model: str,
|
|
15
15
|
messages: list[GeminiMessage],
|
|
16
|
-
temperature: float,
|
|
17
16
|
client: genai.Client,
|
|
18
17
|
config: types.GenerateContentConfig,
|
|
19
18
|
):
|
|
20
19
|
self.model = model
|
|
21
20
|
self.messages = messages
|
|
22
|
-
self.temperature = temperature
|
|
23
21
|
self.client = client
|
|
24
22
|
self.config = config
|
|
25
23
|
|
|
@@ -7,20 +7,8 @@ from google.genai.types import Modality, MediaResolution
|
|
|
7
7
|
from llm_bridge.client.implementations.gemini.non_stream_gemini_client import NonStreamGeminiClient
|
|
8
8
|
from llm_bridge.client.implementations.gemini.stream_gemini_client import StreamGeminiClient
|
|
9
9
|
from llm_bridge.logic.chat_generate.chat_message_converter import convert_messages_to_gemini
|
|
10
|
-
from llm_bridge.logic.message_process.
|
|
11
|
-
from llm_bridge.
|
|
12
|
-
from llm_bridge.type.message import Message, ContentType
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
async def contains_audio_or_video(messages: list[Message]) -> bool:
|
|
16
|
-
for message in messages:
|
|
17
|
-
for content_item in message.contents:
|
|
18
|
-
if content_item.type != ContentType.File:
|
|
19
|
-
continue
|
|
20
|
-
file_type, _ = await get_file_type(content_item.data)
|
|
21
|
-
if file_type in ("audio", "video"):
|
|
22
|
-
return True
|
|
23
|
-
return False
|
|
10
|
+
from llm_bridge.logic.message_process.message_processor import extract_system_message, contains_audio_or_video
|
|
11
|
+
from llm_bridge.type.message import Message
|
|
24
12
|
|
|
25
13
|
|
|
26
14
|
async def create_gemini_client(
|
|
@@ -84,7 +72,6 @@ async def create_gemini_client(
|
|
|
84
72
|
|
|
85
73
|
config = types.GenerateContentConfig(
|
|
86
74
|
system_instruction=system_instruction,
|
|
87
|
-
temperature=temperature,
|
|
88
75
|
safety_settings=[
|
|
89
76
|
types.SafetySetting(
|
|
90
77
|
category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH,
|
|
@@ -112,19 +99,21 @@ async def create_gemini_client(
|
|
|
112
99
|
response_modalities=response_modalities,
|
|
113
100
|
)
|
|
114
101
|
|
|
102
|
+
if "image" in model:
|
|
103
|
+
config.temperature = temperature
|
|
104
|
+
|
|
115
105
|
if "pro-image" not in model:
|
|
116
106
|
config.media_resolution = MediaResolution.MEDIA_RESOLUTION_HIGH
|
|
117
107
|
|
|
118
|
-
if
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
config.service_tier = types.ServiceTier.PRIORITY
|
|
108
|
+
if vertexai:
|
|
109
|
+
config.http_options = types.HttpOptions(
|
|
110
|
+
headers={
|
|
111
|
+
"X-Vertex-AI-LLM-Request-Type": "shared",
|
|
112
|
+
"X-Vertex-AI-LLM-Shared-Request-Type": "priority",
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
elif not free_tier:
|
|
116
|
+
config.service_tier = types.ServiceTier.PRIORITY
|
|
128
117
|
|
|
129
118
|
if structured_output_schema:
|
|
130
119
|
config.response_mime_type = "application/json"
|
|
@@ -136,7 +125,6 @@ async def create_gemini_client(
|
|
|
136
125
|
return StreamGeminiClient(
|
|
137
126
|
model=model,
|
|
138
127
|
messages=gemini_messages,
|
|
139
|
-
temperature=temperature,
|
|
140
128
|
client=client,
|
|
141
129
|
config=config,
|
|
142
130
|
)
|
|
@@ -144,7 +132,6 @@ async def create_gemini_client(
|
|
|
144
132
|
return NonStreamGeminiClient(
|
|
145
133
|
model=model,
|
|
146
134
|
messages=gemini_messages,
|
|
147
|
-
temperature=temperature,
|
|
148
135
|
client=client,
|
|
149
136
|
config=config,
|
|
150
137
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from llm_bridge.logic.message_process import document_processor
|
|
2
|
-
from llm_bridge.logic.message_process.file_type_checker import get_filename_without_timestamp
|
|
2
|
+
from llm_bridge.logic.message_process.file_type_checker import get_file_type, get_filename_without_timestamp
|
|
3
3
|
from llm_bridge.type.message import Message, Role, ContentType
|
|
4
4
|
|
|
5
5
|
|
|
@@ -26,3 +26,14 @@ def extract_system_message(messages: list[Message]) -> str:
|
|
|
26
26
|
del messages[0]
|
|
27
27
|
|
|
28
28
|
return system_message
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
async def contains_audio_or_video(messages: list[Message]) -> bool:
|
|
32
|
+
for message in messages:
|
|
33
|
+
for content_item in message.contents:
|
|
34
|
+
if content_item.type != ContentType.File:
|
|
35
|
+
continue
|
|
36
|
+
file_type, _ = await get_file_type(content_item.data)
|
|
37
|
+
if file_type in ("audio", "video"):
|
|
38
|
+
return True
|
|
39
|
+
return False
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"apiType": "Google AI Studio",
|
|
16
|
-
"model": "gemini-
|
|
17
|
-
"input": 7
|
|
18
|
-
"output":
|
|
16
|
+
"model": "gemini-4-hydrogen",
|
|
17
|
+
"input": 2.7,
|
|
18
|
+
"output": 13.5
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"apiType": "Google AI Studio",
|
|
@@ -35,12 +35,6 @@
|
|
|
35
35
|
"input": 2.7,
|
|
36
36
|
"output": 13.5
|
|
37
37
|
},
|
|
38
|
-
{
|
|
39
|
-
"apiType": "Google AI Studio",
|
|
40
|
-
"model": "gemini-3-flash-preview",
|
|
41
|
-
"input": 1.8,
|
|
42
|
-
"output": 5.4
|
|
43
|
-
},
|
|
44
38
|
{
|
|
45
39
|
"apiType": "Google AI Studio",
|
|
46
40
|
"model": "gemini-3-pro-image",
|
|
@@ -175,9 +169,9 @@
|
|
|
175
169
|
},
|
|
176
170
|
{
|
|
177
171
|
"apiType": "Vertex AI",
|
|
178
|
-
"model": "gemini-
|
|
179
|
-
"input": 7
|
|
180
|
-
"output":
|
|
172
|
+
"model": "gemini-4-hydrogen",
|
|
173
|
+
"input": 2.7,
|
|
174
|
+
"output": 13.5
|
|
181
175
|
},
|
|
182
176
|
{
|
|
183
177
|
"apiType": "Vertex AI",
|
|
@@ -197,12 +191,6 @@
|
|
|
197
191
|
"input": 2.7,
|
|
198
192
|
"output": 13.5
|
|
199
193
|
},
|
|
200
|
-
{
|
|
201
|
-
"apiType": "Vertex AI",
|
|
202
|
-
"model": "gemini-3-flash-preview",
|
|
203
|
-
"input": 1.8,
|
|
204
|
-
"output": 5.4
|
|
205
|
-
},
|
|
206
194
|
{
|
|
207
195
|
"apiType": "Vertex AI",
|
|
208
196
|
"model": "gemini-3-pro-image",
|
|
@@ -217,19 +205,19 @@
|
|
|
217
205
|
},
|
|
218
206
|
{
|
|
219
207
|
"apiType": "Google AI Studio Free Tier",
|
|
220
|
-
"model": "gemini-
|
|
208
|
+
"model": "gemini-4-hydrogen",
|
|
221
209
|
"input": 0,
|
|
222
210
|
"output": 0
|
|
223
211
|
},
|
|
224
212
|
{
|
|
225
213
|
"apiType": "Google AI Studio Free Tier",
|
|
226
|
-
"model": "gemini-3.
|
|
214
|
+
"model": "gemini-3.8-flash",
|
|
227
215
|
"input": 0,
|
|
228
216
|
"output": 0
|
|
229
217
|
},
|
|
230
218
|
{
|
|
231
219
|
"apiType": "Google AI Studio Free Tier",
|
|
232
|
-
"model": "gemini-3-flash
|
|
220
|
+
"model": "gemini-3.6-flash",
|
|
233
221
|
"input": 0,
|
|
234
222
|
"output": 0
|
|
235
223
|
},
|
|
@@ -178,20 +178,19 @@ messages = [
|
|
|
178
178
|
# model = "gpt-audio-1.5"
|
|
179
179
|
# model = "gemini-4-carbon"
|
|
180
180
|
# model = "gemini-4-argon"
|
|
181
|
-
|
|
181
|
+
model = "gemini-4-hydrogen"
|
|
182
182
|
# model = "gemini-3-pro-image"
|
|
183
183
|
# model = "gemini-3.1-flash-image"
|
|
184
|
-
# model = "
|
|
185
|
-
model = "claude-fable-5-2"
|
|
184
|
+
# model = "claude-fable-5-2"
|
|
186
185
|
# model = "claude-opus-4-6"
|
|
187
186
|
# model = "grok-4.6"
|
|
188
187
|
|
|
189
|
-
|
|
188
|
+
api_type = "Vertex AI"
|
|
190
189
|
# api_type = "Google AI Studio Free Tier"
|
|
191
190
|
# api_type = "Google AI Studio"
|
|
192
191
|
# api_type = "OpenAI"
|
|
193
192
|
# api_type = "OpenAI-Azure"
|
|
194
|
-
api_type = "Claude"
|
|
193
|
+
# api_type = "Claude"
|
|
195
194
|
# api_type = "Grok"
|
|
196
195
|
|
|
197
196
|
temperature = 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -14,9 +14,9 @@ class NonStreamClaudeClient(ClaudeClient):
|
|
|
14
14
|
|
|
15
15
|
message = await self.client.beta.messages.create(
|
|
16
16
|
model=self.model,
|
|
17
|
-
messages=serialize(self.messages),
|
|
18
|
-
system=self.system,
|
|
19
17
|
max_tokens=self.max_tokens,
|
|
18
|
+
system=self.system,
|
|
19
|
+
messages=serialize(self.messages),
|
|
20
20
|
betas=self.betas,
|
|
21
21
|
tools=self.tools,
|
|
22
22
|
cache_control=self.cache_control,
|
|
@@ -34,9 +34,9 @@ class StreamClaudeClient(ClaudeClient):
|
|
|
34
34
|
|
|
35
35
|
stream: AsyncStream[BetaRawMessageStreamEvent] = await self.client.beta.messages.create(
|
|
36
36
|
model=self.model,
|
|
37
|
-
messages=serialize(self.messages),
|
|
38
|
-
system=self.system,
|
|
39
37
|
max_tokens=self.max_tokens,
|
|
38
|
+
system=self.system,
|
|
39
|
+
messages=serialize(self.messages),
|
|
40
40
|
stream=True,
|
|
41
41
|
betas=self.betas,
|
|
42
42
|
tools=self.tools,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/openai_responses/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/xai/non_stream_xai_client.py
RENAMED
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/implementations/xai/stream_xai_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -16,9 +16,9 @@ class ClaudeClient(ChatClient):
|
|
|
16
16
|
def __init__(
|
|
17
17
|
self,
|
|
18
18
|
model: str,
|
|
19
|
-
messages: list[ClaudeMessage],
|
|
20
|
-
system: str,
|
|
21
19
|
max_tokens: int,
|
|
20
|
+
system: str,
|
|
21
|
+
messages: list[ClaudeMessage],
|
|
22
22
|
client: anthropic.AsyncAnthropic,
|
|
23
23
|
betas: list[AnthropicBetaParam] | Omit,
|
|
24
24
|
tools: list[BetaToolUnionParam],
|
|
@@ -28,9 +28,9 @@ class ClaudeClient(ChatClient):
|
|
|
28
28
|
output_config: BetaOutputConfigParam | Omit,
|
|
29
29
|
):
|
|
30
30
|
self.model = model
|
|
31
|
-
self.messages = messages
|
|
32
|
-
self.system = system
|
|
33
31
|
self.max_tokens = max_tokens
|
|
32
|
+
self.system = system
|
|
33
|
+
self.messages = messages
|
|
34
34
|
self.client = client
|
|
35
35
|
self.betas = betas
|
|
36
36
|
self.tools = tools
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/model_client/openai_completion_client.py
RENAMED
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/client/model_client/openai_responses_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/chat_generate/chat_message_converter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -99,9 +99,9 @@ async def create_claude_client(
|
|
|
99
99
|
if stream:
|
|
100
100
|
return StreamClaudeClient(
|
|
101
101
|
model=model,
|
|
102
|
-
messages=claude_messages,
|
|
103
|
-
system=system,
|
|
104
102
|
max_tokens=max_tokens,
|
|
103
|
+
system=system,
|
|
104
|
+
messages=claude_messages,
|
|
105
105
|
client=client,
|
|
106
106
|
betas=betas,
|
|
107
107
|
tools=tools,
|
|
@@ -113,9 +113,9 @@ async def create_claude_client(
|
|
|
113
113
|
else:
|
|
114
114
|
return NonStreamClaudeClient(
|
|
115
115
|
model=model,
|
|
116
|
-
messages=claude_messages,
|
|
117
|
-
system=system,
|
|
118
116
|
max_tokens=max_tokens,
|
|
117
|
+
system=system,
|
|
118
|
+
messages=claude_messages,
|
|
119
119
|
client=client,
|
|
120
120
|
betas=betas,
|
|
121
121
|
tools=tools,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/message_process/code_file_extensions.py
RENAMED
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/logic/message_process/document_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/model_message/openai_completion_message.py
RENAMED
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/llm_bridge/type/model_message/openai_responses_message.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_bridge-2.4.2 → llm_bridge-2.4.4}/tests/logic/chat_generate/model_message_converter/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|