ara-cli 0.1.9.71__py3-none-any.whl → 0.1.9.72__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.
ara_cli/prompt_handler.py CHANGED
@@ -12,6 +12,7 @@ from re import findall
12
12
  import re
13
13
  import shutil
14
14
  import glob
15
+ import logging
15
16
 
16
17
 
17
18
  class LLMSingleton:
@@ -78,9 +79,25 @@ def send_prompt(prompt):
78
79
  if "provider" in config_parameters:
79
80
  del config_parameters["provider"]
80
81
 
82
+ filtered_prompt = list(filter(
83
+ lambda msg: (
84
+ msg.get('content') and
85
+ isinstance(msg['content'], list) and
86
+ any(
87
+ item.get('type') == 'text' and
88
+ item.get('text', '').strip() != ''
89
+ for item in msg['content']
90
+ )
91
+ ) or (
92
+ isinstance(msg.get('content'), str) and
93
+ msg['content'].strip() != ''
94
+ ),
95
+ prompt
96
+ ))
97
+
81
98
  completion = litellm.completion(
82
99
  **config_parameters,
83
- messages=prompt,
100
+ messages=filtered_prompt,
84
101
  stream=True
85
102
  )
86
103
  for chunk in completion:
@@ -355,10 +372,19 @@ def prepend_system_prompt(message_list):
355
372
 
356
373
 
357
374
  def append_images_to_message(message, image_data_list):
375
+ logger = logging.getLogger(__name__)
376
+
377
+ logger.debug(f"append_images_to_message called with image_data_list length: {len(image_data_list) if image_data_list else 0}")
378
+
358
379
  if not image_data_list:
380
+ logger.debug("No images to append, returning original message")
359
381
  return message
382
+
360
383
  message_content = message["content"]
384
+ logger.debug(f"Original message content: {message_content}")
385
+
361
386
  message["content"] = message_content + image_data_list
387
+ logger.debug(f"Updated message content with {len(image_data_list)} images")
362
388
 
363
389
  return message
364
390
 
ara_cli/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  # version.py
2
- __version__ = "0.1.9.71" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
2
+ __version__ = "0.1.9.72" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ara_cli
3
- Version: 0.1.9.71
3
+ Version: 0.1.9.72
4
4
  Requires-Dist: litellm
5
5
  Requires-Dist: llama-index
6
6
  Requires-Dist: llama-index-llms-openai
@@ -25,13 +25,13 @@ ara_cli/list_filter.py,sha256=qKGwwQsrWe7L5FbdxEbBYD1bbbi8c-RMypjXqXvLbgs,5291
25
25
  ara_cli/output_suppressor.py,sha256=nwiHaQLwabOjMoJOeUESBnZszGMxrQZfJ3N2OvahX7Y,389
26
26
  ara_cli/prompt_chat.py,sha256=kd_OINDQFit6jN04bb7mzgY259JBbRaTaNp9F-webkc,1346
27
27
  ara_cli/prompt_extractor.py,sha256=6l1Or7wuFNUDqbMg-NDXpFX-WMi2XV7YGH6hGDvow2o,7557
28
- ara_cli/prompt_handler.py,sha256=ukYWR_AMDd8nfGkeUKyYQ8PO_-PfO8x9tV1kNcNWOT4,17672
28
+ ara_cli/prompt_handler.py,sha256=v0254EUk1A2h0y1NmpkllVH6v6Q6i0Yh9qXkQMBXVY4,18544
29
29
  ara_cli/prompt_rag.py,sha256=ydlhe4CUqz0jdzlY7jBbpKaf_5fjMrAZKnriKea3ZAg,7485
30
30
  ara_cli/run_file_lister.py,sha256=XbrrDTJXp1LFGx9Lv91SNsEHZPP-PyEMBF_P4btjbDA,2360
31
31
  ara_cli/tag_extractor.py,sha256=4krQyvmLR2ffhe7N7lWC7QjaxXcb90HaQdmjnBiD8ak,2523
32
32
  ara_cli/template_manager.py,sha256=flMO3yXMUIgBxCgLdRtIhxezPDs5kfh3IASySSa1IKI,6669
33
33
  ara_cli/update_config_prompt.py,sha256=Oy9vNTw6UhDohyTEfSKkqE5ifEMPlmWNYkKHgUrK_pY,4607
34
- ara_cli/version.py,sha256=EyUSNmWg71ZqSwLCGsMkHZC9sx8se2ACVTOoCek_sn0,146
34
+ ara_cli/version.py,sha256=EeE9cgmnRIG8uXViIRiujIL8NEX4pIBGBfOof3tGM-c,146
35
35
  ara_cli/artefact_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  ara_cli/artefact_models/artefact_load.py,sha256=dNcwZDW2Dk0bts9YnPZ0ESmWD2NbsLIvl4Z-qQeGmTQ,401
37
37
  ara_cli/artefact_models/artefact_mapping.py,sha256=8aD0spBjkJ8toMAmFawc6UTUxB6-tEEViZXv2I-r88Q,1874
@@ -151,8 +151,8 @@ tests/test_list_filter.py,sha256=fJA3d_SdaOAUkE7jn68MOVS0THXGghy1fye_64Zvo1U,796
151
151
  tests/test_tag_extractor.py,sha256=nSiAYlTKZ7TLAOtcJpwK5zTWHhFYU0tI5xKnivLc1dU,2712
152
152
  tests/test_template_manager.py,sha256=q-LMHRG4rHkD6ON6YW4cpZxUx9hul6Or8wVVRC2kb-8,4099
153
153
  tests/test_update_config_prompt.py,sha256=xsqj1WTn4BsG5Q2t-sNPfu7EoMURFcS-hfb5VSXUnJc,6765
154
- ara_cli-0.1.9.71.dist-info/METADATA,sha256=EloNN_cqYAUedL2f6JFADIE1mBXJSXD8nknW5Ggc9Y8,415
155
- ara_cli-0.1.9.71.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
156
- ara_cli-0.1.9.71.dist-info/entry_points.txt,sha256=v4h7MzysTgSIDYfEo3oj4Kz_8lzsRa3hq-KJHEcLVX8,45
157
- ara_cli-0.1.9.71.dist-info/top_level.txt,sha256=WM4cLHT5DYUaWzLtRj-gu3yVNFpGQ6lLRI3FMmC-38I,14
158
- ara_cli-0.1.9.71.dist-info/RECORD,,
154
+ ara_cli-0.1.9.72.dist-info/METADATA,sha256=IJcjoYAVthNFzAuL15h343sheK02UrnbDUJVTD3_2Xs,415
155
+ ara_cli-0.1.9.72.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
156
+ ara_cli-0.1.9.72.dist-info/entry_points.txt,sha256=v4h7MzysTgSIDYfEo3oj4Kz_8lzsRa3hq-KJHEcLVX8,45
157
+ ara_cli-0.1.9.72.dist-info/top_level.txt,sha256=WM4cLHT5DYUaWzLtRj-gu3yVNFpGQ6lLRI3FMmC-38I,14
158
+ ara_cli-0.1.9.72.dist-info/RECORD,,