ccs-llmconnector 1.0.5__py3-none-any.whl → 1.0.6__py3-none-any.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.
- {ccs_llmconnector-1.0.5.dist-info → ccs_llmconnector-1.0.6.dist-info}/METADATA +3 -1
- ccs_llmconnector-1.0.6.dist-info/RECORD +14 -0
- llmconnector/client.py +5 -2
- llmconnector/gemini_client.py +5 -2
- llmconnector/openai_client.py +2 -1
- ccs_llmconnector-1.0.5.dist-info/RECORD +0 -14
- {ccs_llmconnector-1.0.5.dist-info → ccs_llmconnector-1.0.6.dist-info}/WHEEL +0 -0
- {ccs_llmconnector-1.0.5.dist-info → ccs_llmconnector-1.0.6.dist-info}/entry_points.txt +0 -0
- {ccs_llmconnector-1.0.5.dist-info → ccs_llmconnector-1.0.6.dist-info}/licenses/LICENSE +0 -0
- {ccs_llmconnector-1.0.5.dist-info → ccs_llmconnector-1.0.6.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ccs-llmconnector
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: Lightweight wrapper around different LLM provider Python SDK Responses APIs.
|
|
5
5
|
Author: CCS
|
|
6
6
|
License: MIT
|
|
@@ -104,6 +104,7 @@ image_bytes = client.generate_image(
|
|
|
104
104
|
prompt="Generate an infographic of the current weather in Tokyo.",
|
|
105
105
|
model="gemini-3-pro-image-preview",
|
|
106
106
|
image_size="2K", # Optional, defaults to "2K"
|
|
107
|
+
aspect_ratio="16:9", # Optional, e.g. "16:9", "4:3"
|
|
107
108
|
)
|
|
108
109
|
|
|
109
110
|
with open("weather_tokyo.png", "wb") as f:
|
|
@@ -351,6 +352,7 @@ image_bytes = llm_client.generate_image(
|
|
|
351
352
|
api_key="your-gemini-api-key",
|
|
352
353
|
prompt="A futuristic city",
|
|
353
354
|
model="gemini-3-pro-image-preview",
|
|
355
|
+
aspect_ratio="16:9",
|
|
354
356
|
)
|
|
355
357
|
```
|
|
356
358
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
ccs_llmconnector-1.0.6.dist-info/licenses/LICENSE,sha256=rPcz2YmBB9VUWZTLJcRO_B4jKDpqmGRYi2eSI-unysg,1083
|
|
2
|
+
llmconnector/__init__.py,sha256=RIprtUKqu2SrUmPJ8C7lPpCpvknpJqd93CUyxcaXy1I,1213
|
|
3
|
+
llmconnector/anthropic_client.py,sha256=sBcJVmYbqTWeT_twcpDz-00XTreLjZlJ1ifVE4ik5TM,7889
|
|
4
|
+
llmconnector/client.py,sha256=t_vWLcL0QS7w1KNwVYc8KEmtmHih5elRMelY3RhApFg,6261
|
|
5
|
+
llmconnector/client_cli.py,sha256=cxu2NKix-9axNeY5jbfqR5rKPKJ-oqBSnJCY8PKMhYY,10660
|
|
6
|
+
llmconnector/gemini_client.py,sha256=ZdNf4teG0RiV95y3mRMgsjhS-1vrsrPPIEjP9CsKYKE,10893
|
|
7
|
+
llmconnector/grok_client.py,sha256=SXcufcsrYDQgx0tK7EOfIBybTZlEdhZc0MV6siUHyyQ,6453
|
|
8
|
+
llmconnector/openai_client.py,sha256=TeXfJq1YnQ9gegjpQyOj_7h9VY4tJk6dYvEw4KQIUU8,5993
|
|
9
|
+
llmconnector/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
10
|
+
ccs_llmconnector-1.0.6.dist-info/METADATA,sha256=msjO02kEy78WrivW8TL6g4ANV8VkFYnVyLFxmMQ9DYk,15041
|
|
11
|
+
ccs_llmconnector-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
ccs_llmconnector-1.0.6.dist-info/entry_points.txt,sha256=eFvLY3nHAG_QhaKlemhhK7echfezW0KiMdSNMZOStLc,60
|
|
13
|
+
ccs_llmconnector-1.0.6.dist-info/top_level.txt,sha256=Doer7TAUsN8UXQfPHPNsuBXVNCz2uV-Q0v4t4fwv_MM,13
|
|
14
|
+
ccs_llmconnector-1.0.6.dist-info/RECORD,,
|
llmconnector/client.py
CHANGED
|
@@ -32,7 +32,8 @@ class SupportsGenerateResponse(Protocol):
|
|
|
32
32
|
api_key: str,
|
|
33
33
|
prompt: str,
|
|
34
34
|
model: str,
|
|
35
|
-
image_size: str =
|
|
35
|
+
image_size: Optional[str] = None,
|
|
36
|
+
aspect_ratio: Optional[str] = None,
|
|
36
37
|
image: Optional[ImageInput] = None,
|
|
37
38
|
) -> bytes:
|
|
38
39
|
...
|
|
@@ -106,7 +107,8 @@ class LLMClient:
|
|
|
106
107
|
api_key: str,
|
|
107
108
|
prompt: str,
|
|
108
109
|
model: str,
|
|
109
|
-
image_size: str =
|
|
110
|
+
image_size: Optional[str] = None,
|
|
111
|
+
aspect_ratio: Optional[str] = None,
|
|
110
112
|
image: Optional[ImageInput] = None,
|
|
111
113
|
) -> bytes:
|
|
112
114
|
"""Generate an image using the selected provider."""
|
|
@@ -125,6 +127,7 @@ class LLMClient:
|
|
|
125
127
|
prompt=prompt,
|
|
126
128
|
model=model,
|
|
127
129
|
image_size=image_size,
|
|
130
|
+
aspect_ratio=aspect_ratio,
|
|
128
131
|
image=image,
|
|
129
132
|
)
|
|
130
133
|
|
llmconnector/gemini_client.py
CHANGED
|
@@ -136,7 +136,8 @@ class GeminiClient:
|
|
|
136
136
|
api_key: str,
|
|
137
137
|
prompt: str,
|
|
138
138
|
model: str,
|
|
139
|
-
image_size: str =
|
|
139
|
+
image_size: Optional[str] = None,
|
|
140
|
+
aspect_ratio: Optional[str] = None,
|
|
140
141
|
image: Optional[ImageInput] = None,
|
|
141
142
|
) -> bytes:
|
|
142
143
|
"""Generate an image using Gemini 3 Pro Image.
|
|
@@ -146,6 +147,7 @@ class GeminiClient:
|
|
|
146
147
|
prompt: Text prompt for image generation.
|
|
147
148
|
model: Identifier of the Gemini model to target (e.g., "gemini-3-pro-image-preview").
|
|
148
149
|
image_size: Size of the generated image (e.g., "2K", "4K"). Defaults to "2K".
|
|
150
|
+
aspect_ratio: Aspect ratio of the generated image (e.g., "16:9", "4:3").
|
|
149
151
|
image: Optional input image for editing tasks.
|
|
150
152
|
|
|
151
153
|
Returns:
|
|
@@ -167,7 +169,8 @@ class GeminiClient:
|
|
|
167
169
|
config = types.GenerateContentConfig(
|
|
168
170
|
tools=[{"google_search": {}}],
|
|
169
171
|
image_config=types.ImageConfig(
|
|
170
|
-
image_size=image_size
|
|
172
|
+
image_size=image_size or "2K",
|
|
173
|
+
aspect_ratio=aspect_ratio,
|
|
171
174
|
)
|
|
172
175
|
)
|
|
173
176
|
|
llmconnector/openai_client.py
CHANGED
|
@@ -124,7 +124,8 @@ class OpenAIResponsesClient:
|
|
|
124
124
|
api_key: str,
|
|
125
125
|
prompt: str,
|
|
126
126
|
model: str,
|
|
127
|
-
image_size: str =
|
|
127
|
+
image_size: Optional[str] = None,
|
|
128
|
+
aspect_ratio: Optional[str] = None,
|
|
128
129
|
image: Optional[ImageInput] = None,
|
|
129
130
|
) -> bytes:
|
|
130
131
|
"""Generate an image using the OpenAI API.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
ccs_llmconnector-1.0.5.dist-info/licenses/LICENSE,sha256=rPcz2YmBB9VUWZTLJcRO_B4jKDpqmGRYi2eSI-unysg,1083
|
|
2
|
-
llmconnector/__init__.py,sha256=RIprtUKqu2SrUmPJ8C7lPpCpvknpJqd93CUyxcaXy1I,1213
|
|
3
|
-
llmconnector/anthropic_client.py,sha256=sBcJVmYbqTWeT_twcpDz-00XTreLjZlJ1ifVE4ik5TM,7889
|
|
4
|
-
llmconnector/client.py,sha256=RUonlBnUX9EmhpGPUYAIksQyFmX0-rRGvYFsSZgrkQE,6111
|
|
5
|
-
llmconnector/client_cli.py,sha256=cxu2NKix-9axNeY5jbfqR5rKPKJ-oqBSnJCY8PKMhYY,10660
|
|
6
|
-
llmconnector/gemini_client.py,sha256=GgnsGizz_M2BMp_GLZpGXyVhzk_eI835zvyYrFnbaLM,10699
|
|
7
|
-
llmconnector/grok_client.py,sha256=SXcufcsrYDQgx0tK7EOfIBybTZlEdhZc0MV6siUHyyQ,6453
|
|
8
|
-
llmconnector/openai_client.py,sha256=6CzvRdzPP75XzXjQf6I_mUxsB2XFuEi2qJgcABMsCxI,5938
|
|
9
|
-
llmconnector/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
10
|
-
ccs_llmconnector-1.0.5.dist-info/METADATA,sha256=WYx6wF-v8zmiC8LbUp9s7CJkSpXt1JiAOecAbk40xfw,14957
|
|
11
|
-
ccs_llmconnector-1.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
-
ccs_llmconnector-1.0.5.dist-info/entry_points.txt,sha256=eFvLY3nHAG_QhaKlemhhK7echfezW0KiMdSNMZOStLc,60
|
|
13
|
-
ccs_llmconnector-1.0.5.dist-info/top_level.txt,sha256=Doer7TAUsN8UXQfPHPNsuBXVNCz2uV-Q0v4t4fwv_MM,13
|
|
14
|
-
ccs_llmconnector-1.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|