Metadata-Version: 2.1
Name: llmkgext
Version: 0.0.3
Summary: A knowledge graph generator using LLMs.
Home-page: https://github.com/8W9aG/llm-kg
Author: Will Sackfield
Author-email: will.sackfield@gmail.com
License: MIT
Keywords: kg,knowledge,graph,llm
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: timefhuman>=0.1.4
Requires-Dist: nltk>=3.9.1
Requires-Dist: instructor>=1.10.0
Requires-Dist: groq>=0.30.0
Requires-Dist: pydantic>=2.11.7
Requires-Dist: textblob>=0.19.0

# llm-kg

<a href="https://pypi.org/project/llmkgext/">
    <img alt="PyPi" src="https://img.shields.io/pypi/v/llmkgext">
</a>

A knowledge graph generator using LLMs.

## Dependencies :globe_with_meridians:

Python 3.11.6:

- [timefhuman](https://github.com/alvinwan/timefhuman)
- [nltk](https://www.nltk.org/)
- [instructor](https://python.useinstructor.com/)
- [groq](https://github.com/groq/groq-python)
- [pydantic](https://docs.pydantic.dev/latest/)
- [textblob](https://textblob.readthedocs.io/en/dev/)

## Raison D'être :thought_balloon:

`llm-kg` is a package that uses LLMs to extract knowledge graphs from freeform text.

## Architecture :triangular_ruler:

`llm-kg` calls an LLM using Groq to turn text into a series of triples.

## Installation :inbox_tray:

This is a python package hosted on pypi, so to install simply run the following command:

`pip install llmkgext`

or install using this local repository:

`python setup.py install --old-and-unmanageable`

## Usage example :eyes:

The use of `llmkgext` is entirely through code due to it being a library. It has exactly the same semantics as a requests session:

```python
from llmkgext import extract


triples = extract("Rodrigo Martins Vaz, known as Rodrigo (born 24 May 1971), is a retired Brazilian footballer.")
print(triples)
```

## License :memo:

The project is available under the [MIT License](LICENSE).
