-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
feat: dad jokes #2092
Conversation
There was a problem hiding this 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!
if (!providerConfig?.provider?.baseUrl) { | ||
throw new Error("Dad Joke API url is required"); | ||
} | ||
|
||
const baseUrl = | ||
providerConfig.provider.baseUrl || | ||
"https://icanhazdadjoke.com"; |
There was a problem hiding this comment.
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:
- Removing the existence check since there's a default URL, or
- 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.
export interface dadJokeConfig { | ||
provider: { | ||
apiKey: string; | ||
baseUrl?: string; | ||
options?: string; | ||
}; | ||
} |
There was a problem hiding this comment.
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.
text: "When does a joke become a dad joke? When the punchline becomes apparent.", | ||
}, | ||
}, | ||
], | ||
outcome: "When it becomes a groan-up.", |
There was a problem hiding this comment.
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.
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. |
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