fish-joke-generator
Generate hilarious fish-themed jokes with AI SDK tools. Use with Vercel AI SDK agents to add humor, or call directly for puns, dad jokes, and ocean humor. Perfect for chatbots and entertainment.
Invalid AI SDK tool structure (missing description or execute)
Last checked: 12/29/2025, 9:21:15 AM
Test fish-joke-generator (default) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install fish-joke-generatorpnpm add fish-joke-generatorimport { default } from 'fish-joke-generator';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { default } from 'fish-joke-generator';
const result = await generateText({
model: openai('gpt-4o'),
tools: { default },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
No schema available for this tool.
Use the Fish Joke Generator tool in your AI SDK agent with just a few lines of code.
npm install fish-joke-generator
import { generateText } from 'ai'; import { openai } from '@ai-sdk/openai'; import { getFishJokeTool } from 'fish-joke-generator'; const result = await generateText({ model: openai('gpt-4'), prompt: 'Tell me a funny fish joke', tools: { getFishJoke: getFishJokeTool(), }, maxSteps: 5, }); console.log(result.text);
import { getRandomFishJoke } from 'fish-joke-generator'; const joke = getRandomFishJoke(); console.log(`${joke.setup}\n${joke.punchline}`);
getFishJokeTool()Returns a tool for AI SDK that generates fish jokes.
Parameters:
category (optional): 'pun' | 'dad' | 'ocean' | 'random'rating (optional): 'family-friendly' | 'groan-worthy' | 'fin-tastic'Example:
import { generateText } from 'ai'; import { openai } from '@ai-sdk/openai'; import { getFishJokeTool } from 'fish-joke-generator'; const result = await generateText({ model: openai('gpt-4'), prompt: 'Tell me a groan-worthy fish pun', tools: { getFishJoke: getFishJokeTool(), }, });
getMultipleFishJokesTool()Returns a tool for AI SDK that generates multiple fish jokes.
Parameters:
count: number of jokes to generatecategory (optional): 'pun' | 'dad' | 'ocean' | 'random'Example:
import { generateText } from 'ai'; import { openai } from '@ai-sdk/openai'; import { getMultipleFishJokesTool } from 'fish-joke-generator'; const result = await generateText({ model: openai('gpt-4'), prompt: 'Give me 3 ocean-themed fish jokes', tools: { getMultipleFishJokes: getMultipleFishJokesTool(), }, });
getRandomFishJoke(category?)Get a random fish joke without using the AI SDK.
import { getRandomFishJoke } from 'fish-joke-generator'; const joke = getRandomFishJoke('pun'); console.log(joke.setup); // "What do you call a fish with no eyes?" console.log(joke.punchline); // "A fsh!"
createFishJoker(options?)Create a fish joker instance with custom options.
import { createFishJoker } from 'fish-joke-generator'; const joker = createFishJoker(); // Get a single joke const joke = joker.getJoke('dad'); // Get multiple jokes const jokes = joker.getJokes(5, 'ocean'); // Get all jokes from a category const allPuns = joker.getJokesByCategory('pun'); // Format a joke console.log(joker.formatJoke(joke, 'question-answer'));
interface FishJoke { setup: string; punchline: string; category: 'pun' | 'dad' | 'ocean' | 'random'; rating?: 'family-friendly' | 'groan-worthy' | 'fin-tastic'; } type JokeCategory = 'pun' | 'dad' | 'ocean' | 'random'; interface JokeOptions { rating?: 'family-friendly' | 'groan-worthy' | 'fin-tastic'; includeCategory?: boolean; format?: 'standard' | 'one-liner' | 'question-answer'; }
Puns:
Dad Jokes:
Ocean Humor:
Have a fin-tastic fish joke to add? Contributions are welcome! Please submit a Pull Request.
MIT
Made with ❤️ and 🐟 for the AI SDK community
Downloads/month
1,034
Quality Score