-
Notifications
You must be signed in to change notification settings - Fork 173
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: Decentralized Inference for rig #171
base: main
Are you sure you want to change the base?
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.
Hey, we appreciate this integration in this PR! Wanna quickly note that the failing test case is not due to this project, but due to the API keys to test other providers are not available on your github repo. This is an oversight in our intergration testing on our end that we'll address Q1 '25.
You will have to address the failing fmt
CI, checkout our CONTRIBUTING.md for more instructions!
Make sure you include an example in the examples
repo. A good one to copy is the agent_with_grok.rs
one as it tests every major feature. I tested this locally and got basic completion working, but could not get any tools to work, might need to check that.
It seems like a lot of this API sits on top of the openai integration. It might be suitable to actually reuse a lot of the openai models and implementations. Theoretically, you could add extra params similar to how additional_params
works for the chain_id
and the response onchain_data
. I'm not entirely certain if the goal of this platform is for direct openai compatibility or if they plan deviating in the future, but at the very least, some set of openai models could be used to simplify this integration.
tl;dr
- Address the changes I've suggested
- Consider some amount of OpenAI reuse
- Add an example (based on
agent_with_grok
) - Test all features (basically just have
agent_with_grok
but run with eternalai).
Let me know if you have any specific questions are if you need help in any step, I'd be happy to help! Also feel free to reach out to me on our Discord as well!
rig-core/src/providers/mod.rs
Outdated
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.
You can add Eternal AI
to the docstring on line 9 (I realize we forgot xAI there too).
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.
yes, I will
DONE
rig-core/src/providers/eternalai.rs
Outdated
/// .temperature(0.0) | ||
/// .build(); | ||
/// ``` | ||
pub fn agent(&mut self, model: &str, chain_id: Option<&str>) -> AgentBuilder<CompletionModel> { |
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.
pub fn agent(&mut self, model: &str, chain_id: Option<&str>) -> AgentBuilder<CompletionModel> { | |
pub fn agent(&self, model: &str, chain_id: Option<&str>) -> AgentBuilder<CompletionModel> { |
There's no need for &mut self
unless there was a specific reason here (if so, leave a comment).
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.
haha, this is an typo mistake from my IDE. I just made a new updating code.
DONE
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.
I also added rig-core/examples/agent_with_eternalai.rs as a example like your suggestion
Also, quick notes:
|
Add onchain-verifiable, decentralized inference for rig with onchain Llama, onchain Hermes, and onchain Intellect.