-
Notifications
You must be signed in to change notification settings - Fork 19
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/ nevermined #196
Feat/ nevermined #196
Conversation
packages/valory/skills/decision_maker_abci/behaviours/purchase_subscription.py
Outdated
Show resolved
Hide resolved
packages/valory/skills/decision_maker_abci/behaviours/purchase_subscription.py
Outdated
Show resolved
Hide resolved
packages/valory/skills/decision_maker_abci/behaviours/purchase_subscription.py
Outdated
Show resolved
Hide resolved
packages/valory/skills/decision_maker_abci/behaviours/purchase_subscription.py
Outdated
Show resolved
Hide resolved
# Conflicts: # packages/packages.json # packages/valory/agents/trader/aea-config.yaml # packages/valory/services/trader/service.yaml # packages/valory/skills/decision_maker_abci/behaviours/round_behaviour.py # packages/valory/skills/decision_maker_abci/fsm_specification.yaml # packages/valory/skills/decision_maker_abci/rounds.py # packages/valory/skills/decision_maker_abci/skill.yaml # packages/valory/skills/trader_abci/fsm_specification.yaml # packages/valory/skills/trader_abci/skill.yaml # packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml
@property | ||
def subscription_params(self) -> Dict[str, Any]: | ||
"""Get the subscription params.""" | ||
return self.params.mech_to_subscription_params |
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.
Maybe add some sanity checks for the contents of these parameters when retrieving them (just in case). Their keys are being accessed unsafely below.
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.
This is one of them as well, its better to have them as you suggest as a dataclass or something similar.
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.
@@ -192,6 +193,16 @@ models: | |||
"openai-gpt-3.5-turbo", "openai-gpt-4", "stabilityai-stable-diffusion-v1-5", | |||
"stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1", | |||
"stabilityai-stable-diffusion-768-v2-1"]} | |||
use_nevermined: ${bool:true} | |||
mech_to_subscription_params: ${list:[["base_url", "https://marketplace-api.gnosis.nevermined.app/api/v1/metadata/assets/ddo"], |
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.
Maybe mech_subscription_params
?
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 are various fixes to be made to the subscription params, I suggest we handle them in a future version
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.
approval_params = {} | ||
approval_params["token"] = self.payment_token | ||
approval_params["spender"] = self.lock_payment_condition_address | ||
approval_params["amount"] = self.price # type: ignore | ||
return approval_params |
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.
can be inferred from the did
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.
This PR integrates the trader with nevermined.