-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: news-plugin #1248
base: develop
Are you sure you want to change the base?
feat: news-plugin #1248
Conversation
@odilitime @shakkernerd added README.md documentation, updated output format & tested. |
gm @odilitime @shakkernerd , anything I can fix or do to help get this plugin merged? thanks. |
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.
LGTM. Just some small change requests
agent/src/index.ts
Outdated
import { zgPlugin } from "@ai16z/plugin-0g"; | ||
import { bootstrapPlugin } from "@ai16z/plugin-bootstrap"; | ||
import createGoatPlugin from "@ai16z/plugin-goat"; | ||
// import { intifacePlugin } from "@ai16z/plugin-intiface"; | ||
import { intifacePlugin } from "@ai16z/plugin-intiface"; |
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.
Do we need this? 👀
name: "CURRENT_NEWS", | ||
similes: ["NEWS", "GET_NEWS", "GET_CURRENT_NEWS"], | ||
validate: async (_runtime: IAgentRuntime, _message: Memory) => { | ||
return true; |
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.
Could validate NEWS_API_KEY here:
e.g. return runtime.getSetting("NEWS_API_KEY")
agent/src/index.ts
Outdated
@@ -482,6 +483,7 @@ export async function createAgent( | |||
// character.plugins are handled when clients are added | |||
plugins: [ | |||
bootstrapPlugin, | |||
newsPlugin, |
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.
Hello! Would you mind removing it from the default plugin configuration? If people need it, they can add it themselves. Also, we should only add the plugin if the environment variable is set. 😊
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.
@tcm390 all done and ready for review. thank you.
3e479be
to
9a9d0ff
Compare
9a9d0ff
to
be682b5
Compare
@ileana-pr kindly resolve the conflicts on this. |
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@shakkernerd conflicts resolved. Thanks much. |
Relates to:
AI Agent Dev School Video #2: https://www.youtube.com/watch?v=XenGeAcPAQo&t=3383s
Risks
Low
Background
Shaw shows us how to create a simple plugin that returns the latest news on a specific topic. This is an example code of a completed currentNewsAction. It can be modified and expanded for added functionality.
What does this PR do?
Adds an example of the news plugin described by Shaw.
What kind of change is this?
Features
It will help future students to see an example of the code and more experienced devs to add functionality to a useful plugin.
Documentation changes needed?
none, but I can add documentation
Testing
I tested the plugin with C3PO character and was able to retrieve news on different topics.
Formatting of the output can use some improvement.
Where should a reviewer start?
news.ts
Detailed testing steps