llm-to-json 0.0.0__tar.gz → 0.0.17__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,27 +1,29 @@
1
- Metadata-Version: 2.4
2
- Name: llm-to-json
3
- Version: 0.0.0
4
- Summary: Tiny wrapper exposing Prompture helpers to convert LLM output into JSON.
5
- Author-email: Juan Denis <juan@vene.co>
6
- License: MIT
7
- Keywords: llm,json,prompt,structured-output
8
- Requires-Python: >=3.9
9
- Description-Content-Type: text/markdown
10
- Requires-Dist: prompture>=0.0.1
11
-
12
- # llm-to-json
13
-
14
- Tiny wrapper around `prompture` with a minimal, easy-to-use API for converting LLM output (or raw text) into JSON according to a schema.
15
-
16
- Install:
17
- ```bash
18
- pip install llm-to-json
19
- ```
20
-
21
- Usage:
22
-
23
- ```python
24
- from llm_to_json import from_llm_text
25
- schema = {"name": "string", "age": "int"}
26
- print(from_llm_text("Name: Juan Age: 30", schema))
27
- ```
1
+ Metadata-Version: 2.4
2
+ Name: llm-to-json
3
+ Version: 0.0.17
4
+ Summary: Tiny wrapper exposing Prompture helpers to convert LLM output into JSON.
5
+ Author-email: Juan Denis <juan@vene.co>
6
+ License: MIT
7
+ Keywords: llm,json,prompt,structured-output
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: prompture>=0.0.1
11
+
12
+ # llm-to-json
13
+
14
+ Tiny wrapper around `prompture` with a minimal, easy-to-use API for converting LLM output (or raw text) into JSON according to a schema.
15
+
16
+ Install:
17
+ ```bash
18
+ pip install llm-to-json
19
+ ```
20
+
21
+ Usage:
22
+
23
+ ```python
24
+ from llm_to_json import from_llm_text
25
+ schema = {"name": "string", "age": "int"}
26
+ print(from_llm_text("Name: Juan Age: 30", schema))
27
+ ```
28
+
29
+ For full docs and advanced features, see the main project: Prompture — https://github.com/jhd3197/prompture
@@ -1,16 +1,18 @@
1
- # llm-to-json
2
-
3
- Tiny wrapper around `prompture` with a minimal, easy-to-use API for converting LLM output (or raw text) into JSON according to a schema.
4
-
5
- Install:
6
- ```bash
7
- pip install llm-to-json
8
- ```
9
-
10
- Usage:
11
-
12
- ```python
13
- from llm_to_json import from_llm_text
14
- schema = {"name": "string", "age": "int"}
15
- print(from_llm_text("Name: Juan Age: 30", schema))
16
- ```
1
+ # llm-to-json
2
+
3
+ Tiny wrapper around `prompture` with a minimal, easy-to-use API for converting LLM output (or raw text) into JSON according to a schema.
4
+
5
+ Install:
6
+ ```bash
7
+ pip install llm-to-json
8
+ ```
9
+
10
+ Usage:
11
+
12
+ ```python
13
+ from llm_to_json import from_llm_text
14
+ schema = {"name": "string", "age": "int"}
15
+ print(from_llm_text("Name: Juan Age: 30", schema))
16
+ ```
17
+
18
+ For full docs and advanced features, see the main project: Prompture — https://github.com/jhd3197/prompture
@@ -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,27 +1,29 @@
1
- Metadata-Version: 2.4
2
- Name: llm-to-json
3
- Version: 0.0.0
4
- Summary: Tiny wrapper exposing Prompture helpers to convert LLM output into JSON.
5
- Author-email: Juan Denis <juan@vene.co>
6
- License: MIT
7
- Keywords: llm,json,prompt,structured-output
8
- Requires-Python: >=3.9
9
- Description-Content-Type: text/markdown
10
- Requires-Dist: prompture>=0.0.1
11
-
12
- # llm-to-json
13
-
14
- Tiny wrapper around `prompture` with a minimal, easy-to-use API for converting LLM output (or raw text) into JSON according to a schema.
15
-
16
- Install:
17
- ```bash
18
- pip install llm-to-json
19
- ```
20
-
21
- Usage:
22
-
23
- ```python
24
- from llm_to_json import from_llm_text
25
- schema = {"name": "string", "age": "int"}
26
- print(from_llm_text("Name: Juan Age: 30", schema))
27
- ```
1
+ Metadata-Version: 2.4
2
+ Name: llm-to-json
3
+ Version: 0.0.17
4
+ Summary: Tiny wrapper exposing Prompture helpers to convert LLM output into JSON.
5
+ Author-email: Juan Denis <juan@vene.co>
6
+ License: MIT
7
+ Keywords: llm,json,prompt,structured-output
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: prompture>=0.0.1
11
+
12
+ # llm-to-json
13
+
14
+ Tiny wrapper around `prompture` with a minimal, easy-to-use API for converting LLM output (or raw text) into JSON according to a schema.
15
+
16
+ Install:
17
+ ```bash
18
+ pip install llm-to-json
19
+ ```
20
+
21
+ Usage:
22
+
23
+ ```python
24
+ from llm_to_json import from_llm_text
25
+ schema = {"name": "string", "age": "int"}
26
+ print(from_llm_text("Name: Juan Age: 30", schema))
27
+ ```
28
+
29
+ For full docs and advanced features, see the main project: Prompture — https://github.com/jhd3197/prompture
@@ -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
@@ -0,0 +1,22 @@
1
+ [build-system]
2
+ requires = [ "setuptools>=61.0", "wheel",]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "llm-to-json"
7
+ version = "0.0.17"
8
+ description = "Tiny wrapper exposing Prompture helpers to convert LLM output into JSON."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ keywords = [ "llm", "json", "prompt", "structured-output",]
12
+ dependencies = [ "prompture>=0.0.1",]
13
+ [[project.authors]]
14
+ name = "Juan Denis"
15
+ email = "juan@vene.co"
16
+
17
+ [project.license]
18
+ text = "MIT"
19
+
20
+ [tool.setuptools.packages.find]
21
+ where = [ ".",]
22
+ include = [ "llm_to_json*",]
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,20 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=61.0", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "llm-to-json"
7
- version = "0.0.0"
8
- description = "Tiny wrapper exposing Prompture helpers to convert LLM output into JSON."
9
- readme = "README.md"
10
- requires-python = ">=3.9"
11
- license = { text = "MIT" }
12
- keywords = ["llm", "json", "prompt", "structured-output"]
13
- authors = [
14
- { name="Juan Denis", email="juan@vene.co" }
15
- ]
16
-
17
- # IMPORTANT: dependencies MUST be an array (list of strings)
18
- dependencies = [
19
- "prompture>=0.0.1"
20
- ]