llm-ie 0.3.4__tar.gz → 0.3.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.
- {llm_ie-0.3.4 → llm_ie-0.3.5}/PKG-INFO +2 -1
- {llm_ie-0.3.4 → llm_ie-0.3.5}/pyproject.toml +2 -1
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/extractors.py +7 -1
- {llm_ie-0.3.4 → llm_ie-0.3.5}/README.md +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/__init__.py +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/PromptEditor_prompts/chat.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/PromptEditor_prompts/comment.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/PromptEditor_prompts/rewrite.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/PromptEditor_prompts/system.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/default_prompts/ReviewFrameExtractor_addition_review_prompt.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/default_prompts/ReviewFrameExtractor_revision_review_prompt.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/default_prompts/SentenceReviewFrameExtractor_addition_review_prompt.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/default_prompts/SentenceReviewFrameExtractor_revision_review_prompt.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/BasicFrameExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/BinaryRelationExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/MultiClassRelationExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/ReviewFrameExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/SentenceCoTFrameExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/SentenceFrameExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/SentenceReviewFrameExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/data_types.py +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/engines.py +0 -0
- {llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/prompt_editor.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: llm-ie
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: An LLM-powered tool that transforms everyday language into robust information extraction pipelines.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Enshuo (David) Hsu
|
|
@@ -10,6 +10,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
12
|
Requires-Dist: colorama (>=0.4.6,<0.5.0)
|
|
13
|
+
Requires-Dist: json_repair (>=0.30,<0.31)
|
|
13
14
|
Requires-Dist: nltk (>=3.8,<4.0)
|
|
14
15
|
Description-Content-Type: text/markdown
|
|
15
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "llm-ie"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.5"
|
|
4
4
|
description = "An LLM-powered tool that transforms everyday language into robust information extraction pipelines."
|
|
5
5
|
authors = ["Enshuo (David) Hsu"]
|
|
6
6
|
license = "MIT"
|
|
@@ -15,6 +15,7 @@ exclude = [
|
|
|
15
15
|
python = "^3.11"
|
|
16
16
|
nltk = "^3.8"
|
|
17
17
|
colorama = "^0.4.6"
|
|
18
|
+
json_repair = "^0.30"
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
[build-system]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import abc
|
|
2
2
|
import re
|
|
3
3
|
import json
|
|
4
|
+
import json_repair
|
|
4
5
|
import inspect
|
|
5
6
|
import importlib.resources
|
|
6
7
|
import warnings
|
|
@@ -117,7 +118,12 @@ class Extractor:
|
|
|
117
118
|
dict_obj = json.loads(dict_str)
|
|
118
119
|
out.append(dict_obj)
|
|
119
120
|
except json.JSONDecodeError:
|
|
120
|
-
|
|
121
|
+
dict_obj = json_repair.repair_json(dict_str, skip_json_loads=True, return_objects=True)
|
|
122
|
+
if dict_obj:
|
|
123
|
+
warnings.warn(f'JSONDecodeError detected, fixed with repair_json:\n{dict_str}', RuntimeWarning)
|
|
124
|
+
out.append(dict_obj)
|
|
125
|
+
else:
|
|
126
|
+
warnings.warn(f'JSONDecodeError could not be fixed:\n{dict_str}', RuntimeWarning)
|
|
121
127
|
return out
|
|
122
128
|
|
|
123
129
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/BasicFrameExtractor_prompt_guide.txt
RENAMED
|
File without changes
|
{llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/BinaryRelationExtractor_prompt_guide.txt
RENAMED
|
File without changes
|
|
File without changes
|
{llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/ReviewFrameExtractor_prompt_guide.txt
RENAMED
|
File without changes
|
|
File without changes
|
{llm_ie-0.3.4 → llm_ie-0.3.5}/src/llm_ie/asset/prompt_guide/SentenceFrameExtractor_prompt_guide.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|