Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dad jokes #2092

Closed
wants to merge 7 commits into from
Closed

feat: dad jokes #2092

wants to merge 7 commits into from

Conversation

pann0x
Copy link

@pann0x pann0x commented Jan 10, 2025

this is essentially another "weather plugin" with any api keys required.

I made this for development purposes only with the intention that it could help other developers like me get started.

This really helped me better understand what a provider and evaluator was, and set a little baseline for my dev career. Hope this helps out whoever needs it.

my discord: pann0x
x: pann0x

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pann0x! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!

@odilitime odilitime added the Plugin_new Mark PRs that are a new plugin label Jan 10, 2025
@pann0x pann0x closed this Jan 11, 2025
@pann0x pann0x reopened this Jan 11, 2025
Comment on lines +13 to +19
if (!providerConfig?.provider?.baseUrl) {
throw new Error("Dad Joke API url is required");
}

const baseUrl =
providerConfig.provider.baseUrl ||
"https://icanhazdadjoke.com";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appears to be contradictory logic in the URL handling. The code first checks that providerConfig?.provider?.baseUrl exists (throwing if it doesn't), but then provides a fallback URL "https://icanhazdadjoke.com" anyway. Consider either:

  1. Removing the existence check since there's a default URL, or
  2. Removing the default URL if a configured URL is truly required

This will make the intended behavior more clear and eliminate unreachable code paths.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +3 to +9
export interface dadJokeConfig {
provider: {
apiKey: string;
baseUrl?: string;
options?: string;
};
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The apiKey field in dadJokeConfig is marked as required but isn't used in the provider implementation. Since the API appears to be public and keyless, this field should either be removed or marked as optional with ? to match the actual requirements.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +21 to +25
text: "When does a joke become a dad joke? When the punchline becomes apparent.",
},
},
],
outcome: "When it becomes a groan-up.",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example outcome appears to be mismatched with the setup joke. The setup asks "When does a joke become a dad joke? When the punchline becomes apparent" but the outcome shows "When it becomes a groan-up". For consistency, the outcome should be "When the punchline becomes apparent" to match the setup joke's punchline.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@odilitime
Copy link
Collaborator

Hello,

We are changing our plugin development strategy to be more scalable. We have moved the plugins out into their own repos and we're looking for people to either maintain those or own them on their own Github.

If you'd like to be a maintainer, file an issue in the plugin repo and join our Discord https://discord.gg/elizaos to coordinate.

If you'd like to control the plugin on your own Github, please add an issue to the plugin repo pointing to your repo, and add a modification to the registry. Submit a PR to edit the registry here: https://github.com/elizaos-plugins/registry

Closing this PR for now. Let us know if you have any questions.

@odilitime odilitime closed this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plugin_new Mark PRs that are a new plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants