cat-llm 0.0.37__py3-none-any.whl → 0.0.38__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cat-llm
3
- Version: 0.0.37
3
+ Version: 0.0.38
4
4
  Summary: A tool for categorizing text data and images using LLMs and vision models
5
5
  Project-URL: Documentation, https://github.com/chrissoria/cat-llm#readme
6
6
  Project-URL: Issues, https://github.com/chrissoria/cat-llm/issues
@@ -368,10 +368,10 @@ Processes each image individually, evaluating the drawn shapes based on CERAD cr
368
368
  - `user_model` (str, default="gpt-4o"): Specific model to use
369
369
  - `creativity` (float, default=0): Temperature/randomness setting (0.0-1.0)
370
370
  - `reference_in_image` (bool, default=False): Whether a reference shape is present in the image for comparison
371
- - `provide_reference` (bool, default=False): Whether to provide a reference example image or description
371
+ - `provide_reference` (bool, default=False): Whether to provide a reference example image (built in reference image)
372
372
  - `safety` (bool, default=False): Enable safety checks and save results at each API call step
373
373
  - `filename` (str, default="categorized_data.csv"): Filename for CSV output
374
- - `model_source` (str, default="OpenAI"): Model provider ("OpenAI", "Anthropic", "Perplexity", "Mistral")
374
+ - `model_source` (str, default="OpenAI"): Model provider ("OpenAI", "Anthropic", "Mistral")
375
375
 
376
376
  **Returns:**
377
377
  - `pandas.DataFrame`: DataFrame with image paths, CERAD scores, and analysis details
@@ -1,5 +1,5 @@
1
- catllm/CERAD_functions.py,sha256=NEf8HX1MNMjlMGuS42MaEcVE7XbQR9nGRYyPLQf91IU,19961
2
- catllm/__about__.py,sha256=WFqW7Tej2l4jCqQSDnklndjw7xQvVxk0mnWP4OXCnzw,404
1
+ catllm/CERAD_functions.py,sha256=O2q36tDyTfx2VTaIb_aj4FZj1kOUOcHbHjXT1QLzFa0,20167
2
+ catllm/__about__.py,sha256=8OdI51U4Os6bh-_fY-0OtVldFeKxgKbsA4THA6Egh8M,404
3
3
  catllm/__init__.py,sha256=BpAG8nPhM3ZQRd0WqkubI_36-VCOs4eCYtGVgzz48Bs,337
4
4
  catllm/image_functions.py,sha256=7nw0HDvacYUVo_VLcy-6Pi8QcmDbPtKVKPJITAK19RQ,31311
5
5
  catllm/text_functions.py,sha256=K6oetWYk25PwsllWSZP4cFrz7kyxJg0plPRvpmQkCsU,16846
@@ -8,7 +8,7 @@ catllm/images/cube.png,sha256=nFec3e5bmRe4zrBCJ8QK-HcJLrG7u7dYdKhmdMfacfE,77275
8
8
  catllm/images/diamond.png,sha256=rJDZKtsnBGRO8FPA0iHuA8FvHFGi9PkI_DWSFdw6iv0,99568
9
9
  catllm/images/overlapping_pentagons.png,sha256=VO5plI6eoVRnjfqinn1nNzsCP2WQhuQy71V0EASouW4,71208
10
10
  catllm/images/rectangles.png,sha256=2XM16HO9EYWj2yHgN4bPXaCwPfl7iYQy0tQUGaJX9xg,40692
11
- cat_llm-0.0.37.dist-info/METADATA,sha256=DTJBwpMhd7VU54SoTRplhN1ZsCR_efye6RdA2yL2VKw,17261
12
- cat_llm-0.0.37.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
- cat_llm-0.0.37.dist-info/licenses/LICENSE,sha256=YYp5RSBpti1KKIJO0aV0GTRgQNLIsB7TEYivC3QkCOo,788
14
- cat_llm-0.0.37.dist-info/RECORD,,
11
+ cat_llm-0.0.38.dist-info/METADATA,sha256=SmlnMw-RQX_S9VM_tNJprF85yWydYqRfQ3yUt7miyMo,17259
12
+ cat_llm-0.0.38.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
+ cat_llm-0.0.38.dist-info/licenses/LICENSE,sha256=YYp5RSBpti1KKIJO0aV0GTRgQNLIsB7TEYivC3QkCOo,788
14
+ cat_llm-0.0.38.dist-info/RECORD,,
catllm/CERAD_functions.py CHANGED
@@ -229,12 +229,18 @@ def cerad_drawn_score(
229
229
  f"Example:\n"
230
230
  f"{example_JSON}"
231
231
  ),
232
- },
233
- {
234
- "type": "image_url",
235
- "image_url": f"data:image/jpeg;base64,{encoded}"
236
232
  }
237
233
  ]
234
+ if provide_reference:
235
+ prompt.append({
236
+ "type": "image_url",
237
+ "image_url": f"data:image/{ext};base64,{encoded_ref}"
238
+ })
239
+
240
+ prompt.append({
241
+ "type": "image_url",
242
+ "image_url": f"data:image/{ext};base64,{encoded_image}"
243
+ })
238
244
 
239
245
  if model_source == "OpenAI":
240
246
  from openai import OpenAI
catllm/__about__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Christopher Soria <chrissoria@berkeley.edu>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.0.37"
4
+ __version__ = "0.0.38"
5
5
  __author__ = "Chris Soria"
6
6
  __email__ = "chrissoria@berkeley.edu"
7
7
  __title__ = "cat-llm"