ccs-llmconnector 1.0.3__tar.gz → 1.0.5__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.
Files changed (20) hide show
  1. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/LICENSE +22 -22
  2. {ccs_llmconnector-1.0.3/src/ccs_llmconnector.egg-info → ccs_llmconnector-1.0.5}/PKG-INFO +36 -2
  3. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/README.md +403 -369
  4. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/pyproject.toml +29 -29
  5. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5/src/ccs_llmconnector.egg-info}/PKG-INFO +36 -2
  6. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/llmconnector/__init__.py +39 -39
  7. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/llmconnector/anthropic_client.py +233 -217
  8. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/llmconnector/client.py +188 -148
  9. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/llmconnector/client_cli.py +325 -325
  10. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/llmconnector/gemini_client.py +296 -224
  11. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/llmconnector/grok_client.py +186 -170
  12. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/llmconnector/openai_client.py +89 -73
  13. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/llmconnector/py.typed +1 -1
  14. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/MANIFEST.in +0 -0
  15. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/setup.cfg +0 -0
  16. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/ccs_llmconnector.egg-info/SOURCES.txt +0 -0
  17. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/ccs_llmconnector.egg-info/dependency_links.txt +0 -0
  18. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/ccs_llmconnector.egg-info/entry_points.txt +0 -0
  19. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/ccs_llmconnector.egg-info/requires.txt +0 -0
  20. {ccs_llmconnector-1.0.3 → ccs_llmconnector-1.0.5}/src/ccs_llmconnector.egg-info/top_level.txt +0 -0
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 CCS
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ MIT License
2
+
3
+ Copyright (c) 2025 CCS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ccs-llmconnector
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: Lightweight wrapper around different LLM provider Python SDK Responses APIs.
5
5
  Author: CCS
6
6
  License: MIT
@@ -91,10 +91,36 @@ vision_response = client.generate_response(
91
91
  | `reasoning_effort` | `Optional[str]` | No | Present for parity with the OpenAI client; currently ignored by the Gemini SDK. |
92
92
  | `images` | `Optional[Sequence[str \| Path]]` | No | Image references (local paths, URLs, or data URLs) read and forwarded to the Gemini SDK. |
93
93
 
94
- The method returns the generated model output as a plain string. Optional image
95
94
  references are automatically converted into the appropriate `types.Part` instances,
96
95
  allowing you to mix text and visuals in a single request.
97
96
 
97
+ ### Image Generation
98
+
99
+ Use `generate_image` to create images using Gemini's image generation models (e.g., `gemini-3-pro-image-preview`).
100
+
101
+ ```python
102
+ image_bytes = client.generate_image(
103
+ api_key="your-gemini-api-key",
104
+ prompt="Generate an infographic of the current weather in Tokyo.",
105
+ model="gemini-3-pro-image-preview",
106
+ image_size="2K", # Optional, defaults to "2K"
107
+ )
108
+
109
+ with open("weather_tokyo.png", "wb") as f:
110
+ f.write(image_bytes)
111
+ ```
112
+
113
+ You can also provide an input image for editing tasks:
114
+
115
+ ```python
116
+ image_bytes = client.generate_image(
117
+ api_key="your-gemini-api-key",
118
+ prompt="Make the background a sunset.",
119
+ model="gemini-3-pro-image-preview",
120
+ image="/path/to/original.png",
121
+ )
122
+ ```
123
+
98
124
  ### Listing models
99
125
 
100
126
  Use `list_models` to enumerate the Gemini models available to your account:
@@ -318,6 +344,14 @@ anthropic_response = llm_client.generate_response(
318
344
  # Additional providers can be registered at runtime:
319
345
  # llm_client.register_provider("custom", CustomProviderClient())
320
346
  # llm_client.generate_response(provider="custom", ...)
347
+
348
+ # Image generation (currently only supported by Gemini)
349
+ image_bytes = llm_client.generate_image(
350
+ provider="gemini",
351
+ api_key="your-gemini-api-key",
352
+ prompt="A futuristic city",
353
+ model="gemini-3-pro-image-preview",
354
+ )
321
355
  ```
322
356
 
323
357
  ### Listing models