llm-to-json 0.0.13__tar.gz → 0.0.18__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.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llm-to-json
3
- Version: 0.0.13
3
+ Version: 0.0.18
4
4
  Summary: Tiny wrapper exposing Prompture helpers to convert LLM output into JSON.
5
5
  Author-email: Juan Denis <juan@vene.co>
6
6
  License: MIT
7
7
  Keywords: llm,json,prompt,structured-output
8
- Requires-Python: >=3.9
8
+ Requires-Python: >=3.10
9
9
  Description-Content-Type: text/markdown
10
10
  Requires-Dist: prompture>=0.0.1
11
11
 
@@ -0,0 +1,13 @@
1
+ # packages/llm_to_json/__init__.py
2
+ try:
3
+ from prompture import extract_and_jsonify as _extract_and_jsonify
4
+ from prompture.drivers.mock_driver import MockDriver
5
+ except Exception:
6
+ from prompture.core import extract_and_jsonify as _extract_and_jsonify
7
+ from prompture.drivers.mock_driver import MockDriver
8
+
9
+ def from_llm_text(text: str, schema: dict, driver: dict | None = None):
10
+ if driver is None:
11
+ driver = MockDriver()
12
+ result = _extract_and_jsonify(driver, text, schema)
13
+ return result["json_object"]
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llm-to-json
3
- Version: 0.0.13
3
+ Version: 0.0.18
4
4
  Summary: Tiny wrapper exposing Prompture helpers to convert LLM output into JSON.
5
5
  Author-email: Juan Denis <juan@vene.co>
6
6
  License: MIT
7
7
  Keywords: llm,json,prompt,structured-output
8
- Requires-Python: >=3.9
8
+ Requires-Python: >=3.10
9
9
  Description-Content-Type: text/markdown
10
10
  Requires-Dist: prompture>=0.0.1
11
11
 
@@ -1,5 +1,6 @@
1
1
  README.md
2
2
  pyproject.toml
3
+ llm_to_json/__init__.py
3
4
  llm_to_json.egg-info/PKG-INFO
4
5
  llm_to_json.egg-info/SOURCES.txt
5
6
  llm_to_json.egg-info/dependency_links.txt
@@ -0,0 +1 @@
1
+ llm_to_json
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "llm-to-json"
7
- version = "0.0.13"
7
+ version = "0.0.18"
8
8
  description = "Tiny wrapper exposing Prompture helpers to convert LLM output into JSON."
9
9
  readme = "README.md"
10
- requires-python = ">=3.9"
10
+ requires-python = ">=3.10"
11
11
  keywords = [ "llm", "json", "prompt", "structured-output",]
12
12
  dependencies = [ "prompture>=0.0.1",]
13
13
  [[project.authors]]
@@ -16,3 +16,7 @@ email = "juan@vene.co"
16
16
 
17
17
  [project.license]
18
18
  text = "MIT"
19
+
20
+ [tool.setuptools.packages.find]
21
+ where = [ ".",]
22
+ include = [ "llm_to_json*",]
File without changes
File without changes