-
Notifications
You must be signed in to change notification settings - Fork 566
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
okx trading #93
base: main
Are you sure you want to change the base?
okx trading #93
Conversation
Thank you for your Pull Request. I will review it tomorrow and provide some suggestions regarding structure and standards. |
niceee |
Hey, thanks again for your contribution. To ensure everyone can benefit from your skills, we still need to do a few things. Considering that CEX is an important category of skills, we classify CEX trading skills as "first-class skills." It can have its own folder within the skills directory and top-level configuration in the agent. You need to implement these improvements; if you have specific projects in mind, you can reference the implementation in the
Once you complete these tasks, we can easily configure the agent to use CEX skills. Since this is a first-class skill, there are quite a few places that need modifications. |
skills/xyberx/_init_.py
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.
Looks good
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.
Nice
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.
Nice
@@ -657,3 +658,23 @@ def save(self, db: Session) -> None: | |||
db.add(self) | |||
|
|||
db.commit() | |||
|
|||
def initialize_agent(): |
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.
not here, add cex_config and cex_skills in the model Agent in this file.
like "enso_skills" and enso_config
@@ -0,0 +1,13 @@ | |||
from langchain_core.tools import BaseTool | |||
from skills.crestal.search_web3_services import search_web3_services |
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.
please remove the unused skill, only keep your new skill.
from skills.crestal.search_web3_services import search_web3_services | ||
from skills.crestal.trade_on_okx import TradeOnOkx # Import the new skill | ||
|
||
def get_common_skill(name: str) -> BaseTool: |
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.
In addition to the name, you can also pass in cex_config. Then, in the app/core/engine.py
initialize_agent function, imitate enso or Twitter to initialize the skills for this category.
@@ -0,0 +1,70 @@ | |||
rom .base import CEXBaseSkill | |||
|
|||
class TradeOnOkx(CEXBaseSkill): |
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.
_run and _arun is required for a skill.
args_schema is required too, if there is no param, please use an empty pydantic object, for example see twitter/mentions.py
@@ -0,0 +1,13 @@ | |||
from langchain_core.tools import BaseTool |
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.
CEX should be cex, use lowercase in the folder name.
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.
Ok. Approved your request
Pull Request Template
Description
Please include a summary of the changes and the related issue.
Type of Change
Checklist
Related Issue
Closes #[issue number]