alita-sdk 0.3.359__py3-none-any.whl → 0.3.360__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.

Potentially problematic release.


This version of alita-sdk might be problematic. Click here for more details.

@@ -231,25 +231,40 @@ class AlitaClient:
231
231
  if not self.model_image_generation:
232
232
  raise ValueError("Image generation model is not configured for this client")
233
233
 
234
- # Prepare the request data
234
+ # Prepare the request data - only include non-"auto" parameters
235
+ # This prevents LiteLLM from adding unsupported parameters to extra_body
235
236
  image_generation_data = {
236
237
  "prompt": prompt,
237
238
  "model": self.model_image_generation,
238
239
  "n": n,
239
- "size": size,
240
- "quality": quality,
241
240
  "response_format": response_format,
241
+ # Enable drop_params to prevent LiteLLM from adding unsupported params to extra_body
242
+ "drop_params": True
242
243
  }
243
244
 
245
+ # Only add optional parameters if they have meaningful values
246
+ if size and size.lower() != "auto":
247
+ image_generation_data["size"] = size
248
+
249
+ if quality and quality.lower() != "auto":
250
+ image_generation_data["quality"] = quality
251
+
244
252
  if style:
245
253
  image_generation_data["style"] = style
246
254
 
255
+ # Standard headers for image generation
256
+ image_headers = self.headers.copy()
257
+ image_headers.update({
258
+ "Content-Type": "application/json",
259
+ })
260
+
247
261
  logger.info(f"Generating image with model: {self.model_image_generation}, prompt: {prompt[:50]}...")
262
+ logger.debug(f"Image generation request data: {image_generation_data}")
248
263
 
249
264
  try:
250
265
  response = requests.post(
251
266
  self.image_generation_url,
252
- headers=self.headers,
267
+ headers=image_headers,
253
268
  json=image_generation_data,
254
269
  verify=False,
255
270
  timeout=self.model_timeout
@@ -259,6 +274,12 @@ class AlitaClient:
259
274
 
260
275
  except requests.exceptions.HTTPError as e:
261
276
  logger.error(f"Image generation failed: {e.response.status_code} - {e.response.text}")
277
+ # Try to parse the error response for more details
278
+ try:
279
+ error_details = e.response.json()
280
+ logger.error(f"Error details: {error_details}")
281
+ except:
282
+ pass
262
283
  raise
263
284
  except requests.exceptions.RequestException as e:
264
285
  logger.error(f"Image generation request failed: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alita_sdk
3
- Version: 0.3.359
3
+ Version: 0.3.360
4
4
  Summary: SDK for building langchain agents using resources from Alita
5
5
  Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <lifedj27@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -36,7 +36,7 @@ alita_sdk/configurations/zephyr_essential.py,sha256=tUIrh-PRNvdrLBj6rJXqlF-h6oaM
36
36
  alita_sdk/runtime/__init__.py,sha256=4W0UF-nl3QF2bvET5lnah4o24CoTwSoKXhuN0YnwvEE,828
37
37
  alita_sdk/runtime/clients/__init__.py,sha256=BdehU5GBztN1Qi1Wul0cqlU46FxUfMnI6Vq2Zd_oq1M,296
38
38
  alita_sdk/runtime/clients/artifact.py,sha256=Tt3aWcxu20bVW6EX7s_iX5CTmcItKhUnkk8Q2gv2vw0,4036
39
- alita_sdk/runtime/clients/client.py,sha256=sNa_2Ep1ugfuMQS27LxkPnw05EChpNOW3MdsdhL8bSA,45421
39
+ alita_sdk/runtime/clients/client.py,sha256=dBk8HpvV2sdQnUg0fAYK8wEFSrOybBxqPFs9FmQILCA,46391
40
40
  alita_sdk/runtime/clients/datasource.py,sha256=HAZovoQN9jBg0_-lIlGBQzb4FJdczPhkHehAiVG3Wx0,1020
41
41
  alita_sdk/runtime/clients/prompt.py,sha256=li1RG9eBwgNK_Qf0qUaZ8QNTmsncFrAL2pv3kbxZRZg,1447
42
42
  alita_sdk/runtime/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -352,8 +352,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=kT0TbmMvuKhDUZc0i7KO18O38JM9S
352
352
  alita_sdk/tools/zephyr_squad/__init__.py,sha256=0ne8XLJEQSLOWfzd2HdnqOYmQlUliKHbBED5kW_Vias,2895
353
353
  alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
354
354
  alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
355
- alita_sdk-0.3.359.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
356
- alita_sdk-0.3.359.dist-info/METADATA,sha256=dG_WTlIsQxUJe23SVu_qFSJZM_5VXyW-xfG7UrcTSEE,19071
357
- alita_sdk-0.3.359.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
358
- alita_sdk-0.3.359.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
359
- alita_sdk-0.3.359.dist-info/RECORD,,
355
+ alita_sdk-0.3.360.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
356
+ alita_sdk-0.3.360.dist-info/METADATA,sha256=Y-VuZWNlusthSXN5C6oGtaH619yAib7Xil-fAVAq0MU,19071
357
+ alita_sdk-0.3.360.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
358
+ alita_sdk-0.3.360.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
359
+ alita_sdk-0.3.360.dist-info/RECORD,,