Metadata-Version: 2.1
Name: docchain
Version: 0.0.5
Summary: 
Author: Artem Kolesnikov
Author-email: tyomo4ka@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: fsspec (>=2023.4.0,<2024.0.0)
Requires-Dist: jsonschema (>=4.17.3,<5.0.0)
Requires-Dist: langchain (>=0.0.158,<0.0.159)
Requires-Dist: openai (>=0.27.6,<0.28.0)
Requires-Dist: pydantic (>=1.10.7,<2.0.0)
Description-Content-Type: text/markdown

# DocChain

This package can be used to generate complex structured documents from Specs using LLMm models.

`Document` is an abstraction that represent generated data, e.g. it could be any text data in
markdown or HTML, configuration in JSON, YAML or other formats, Python objects or classes, or any
other data that can be generated by LLMs.

`Spec` contains document requirements. It holds general information about the generated document.

`Section` is a composite part of a Document. Document itself is a Section. Such design allows
inclusion of Documents inside another documents.

`Generator` generates Document from the provided Spec. Each generator can be configured with a list
of steps that are executed before or after generation.

`Middleware` is a callable that can modify Spec or the generated Documents. It acts the same as
middleware in an HTTP framework, it can be used for variety of tasks. E.g. transforming, formatting
or linting generated document ot its parts.

## TODO

- [ ] Store stats in an SQLite database.
- [ ] Blocks for HTML, Markdown, Python, one line Python, templates.
- [ ] Add middleware to plan steps.

