Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llmgen

PyPI

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

Quick Start

Example:

from llmgen import OpenAiApiFactory

factory = OpenAiApiFactory(
    api_key="your api key here",
)

@llm.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.

About

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

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages