A fun and structured package that generates light-hearted, humorous roasts based on a public username or handle from social media. The output is formatted consistently with a roast, a playful insult, and a balanced compliment—all while ensuring a non-offensive, entertaining experience.
Install the package via pip:
pip install trollmakerfrom trollmaker import trollmaker
response = trollmaker(user_input="username_to_roast")
print(response)By default, the package uses ChatLLM7 (from langchain_llm7). You can easily replace it with other LLMs like OpenAI, Anthropic, or Google Vertex AI.
from langchain_openai import ChatOpenAI
from trollmaker import trollmaker
llm = ChatOpenAI()
response = trollmaker(user_input="username_to_roast", llm=llm)
print(response)from langchain_anthropic import ChatAnthropic
from trollmaker import trollmaker
llm = ChatAnthropic()
response = trollmaker(user_input="username_to_roast", llm=llm)
print(response)from langchain_google_genai import ChatGoogleGenerativeAI
from trollmaker import trollmaker
llm = ChatGoogleGenerativeAI()
response = trollmaker(user_input="username_to_roast", llm=llm)
print(response)| Parameter | Type | Description |
|---|---|---|
user_input |
str |
The username or handle to generate a roast for. |
api_key |
Optional[str] |
Optional LLM7 API key (defaults to LLM7_API_KEY env var). |
llm |
Optional[BaseChatModel] |
Optional custom LLM (e.g., ChatOpenAI, ChatAnthropic). If not provided, defaults to ChatLLM7. |
- Takes a username/handle as input.
- Uses LLM7 (or a custom LLM) to generate a structured roast.
- Ensures the output follows a consistent format (roast + insult + compliment).
- Returns a humorous yet non-offensive response.
- Default LLM7 Free Tier is sufficient for most use cases.
- For higher rate limits, set
LLM7_API_KEYvia environment variable or pass it directly:trollmaker(user_input="username", api_key="your_api_key")
- Get a free LLM7 API key at https://token.llm7.io/.
For bugs, feature requests, or questions, open an issue here: 🔗 https://github.com/chigwell/trollmaker/issues
👤 Eugene Evstafev 📧 hi@euegne.plus 🔗 GitHub: chigwell