cat-llm 0.0.36__py3-none-any.whl → 0.0.37__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.36
3
+ Version: 0.0.37
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
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
20
20
  Classifier: Programming Language :: Python :: Implementation :: PyPy
21
21
  Requires-Python: >=3.8
22
22
  Requires-Dist: pandas
23
+ Requires-Dist: pkg-resources
23
24
  Requires-Dist: tqdm
24
25
  Description-Content-Type: text/markdown
25
26
 
@@ -1,5 +1,5 @@
1
- catllm/CERAD_functions.py,sha256=3eGLrJAYkUt47eappuf0EECSNK1OmjofHQ1jMsNEWeg,19641
2
- catllm/__about__.py,sha256=xSQKWBq3GkAJZfrOyxQHQpuNDgMmxUTiAryYKvsN1KM,404
1
+ catllm/CERAD_functions.py,sha256=NEf8HX1MNMjlMGuS42MaEcVE7XbQR9nGRYyPLQf91IU,19961
2
+ catllm/__about__.py,sha256=WFqW7Tej2l4jCqQSDnklndjw7xQvVxk0mnWP4OXCnzw,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.36.dist-info/METADATA,sha256=ri1Cqd4xGLB6G2hAOXsPyaZgt2MaNqGynSxK2sR4m2E,17232
12
- cat_llm-0.0.36.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
- cat_llm-0.0.36.dist-info/licenses/LICENSE,sha256=YYp5RSBpti1KKIJO0aV0GTRgQNLIsB7TEYivC3QkCOo,788
14
- cat_llm-0.0.36.dist-info/RECORD,,
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,,
catllm/CERAD_functions.py CHANGED
@@ -165,14 +165,13 @@ def cerad_drawn_score(
165
165
  if provide_reference:
166
166
  prompt.append({
167
167
  "type": "image_url",
168
- "image_url": {"url": reference_image, "detail": "high"}
168
+ "image_url": {"url": encoded_ref_image, "detail": "high"}
169
169
  })
170
170
 
171
171
  prompt.append({
172
172
  "type": "image_url",
173
173
  "image_url": {"url": encoded_image, "detail": "high"}
174
174
  })
175
- print(prompt)
176
175
 
177
176
  elif model_source == "Anthropic":
178
177
  prompt = [
@@ -190,16 +189,29 @@ def cerad_drawn_score(
190
189
  f"Example:\n"
191
190
  f"{example_JSON}"
192
191
  ),
193
- },
194
- {
192
+ }
193
+ ]
194
+
195
+ if provide_reference:
196
+ prompt.append({
197
+ "type": "image",
198
+ "source": {
199
+ "type": "base64",
200
+ "media_type": "image/png",
201
+ "data": encoded_ref
202
+ }
203
+ }
204
+ )
205
+
206
+ prompt.append({
195
207
  "type": "image",
196
208
  "source": {
197
209
  "type": "base64",
198
210
  "media_type": "image/jpeg",
199
211
  "data": encoded
200
212
  }
201
- }
202
- ]
213
+ }
214
+ )
203
215
 
204
216
  elif model_source == "Mistral":
205
217
  prompt = [
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.36"
4
+ __version__ = "0.0.37"
5
5
  __author__ = "Chris Soria"
6
6
  __email__ = "chrissoria@berkeley.edu"
7
7
  __title__ = "cat-llm"