Metadata-Version: 2.1
Name: llmgen
Version: 0.3.1
Summary: Effortlessly generate LLM APIs by simply defining input and output schemas.
Author: koswu
Author-email: koswu@outlook.com
Requires-Python: >=3.8.1,<4.0.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: docstring-parser (>=0.16,<0.17)
Requires-Dist: langchain (>=0.2.11,<0.3.0)
Requires-Dist: langchain-openai (>=0.1.19,<0.2.0)
Requires-Dist: pydantic (>=2.8.2,<3.0.0)
Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
Description-Content-Type: text/markdown

# llmgen

[![PyPI](https://img.shields.io/pypi/v/llmgen?label=pypi%20package)](https://pypi.org/project/llmgen/)

Effortlessly generate LLM APIs by simply defining input and output schemas (by pydantic).


## Quick Start

Example:

```python
from llmgen import OpenAiApiFactory

factory = OpenAiApiFactory(
    api_key="your api key here",
)
ai_impl = llm.get_impl_decorator()

@ai_impl
def make_joke(theme: str) -> str
    """generate a random short joke based on theme""" # just describe your api in docstring
    ...

# call it just like you implmented it. 

res = make_joke('cat')
print(res)

# >>> "Why was the cat sitting on the computer? It wanted to keep an eye on the mouse!"

```

checkout /demo to see more example.


