Skip to content
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/replace week olas #182

Open
wants to merge 3 commits into
base: feat/ceramic-cli
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In order to run a local demo service based on the IEKit:
2. Fetch the IEKit.

```bash
autonomy fetch valory/impact_evaluator:0.1.0:bafybeicdmqmqulnel2x4k7kgr3hmdnhm7gjfjap23unxhxuk3s3e52guzu --service
autonomy fetch valory/impact_evaluator:0.1.0:bafybeic7wqopcnvkwoteb4pvfq7lfcbw5wvlvvtuaw4yvspghj6vna5ray --service
```

3. Build the Docker image of the service agents
Expand Down
14 changes: 7 additions & 7 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
"connection/valory/twitter/0.1.0": "bafybeidcalgczvpoq6l2uh7kkfblwxmytm6bicmsxub7pevu2k46sp7mky",
"connection/valory/openai/0.1.0": "bafybeigyehjbahya5mp7vyp5tjvn36rey4btvzskp3ql3mgxp3zu6gwq5a",
"connection/valory/farcaster/0.1.0": "bafybeibbdas7lxbipksodaphjms3uop7vnzjqkroktjq2g6wbvgtlldaxi",
"connection/valory/tweepy/0.1.0": "bafybeiajlogdtu3qqoqqh3pftxob7biopnhsauhmskkom4sqblfozsklzu",
"connection/valory/tweepy/0.1.0": "bafybeicz3swgbkegder6mrptuq5ghkgzw2fw7bgnp37fmnk3ckccxvh3qq",
"skill/valory/dynamic_nft_abci/0.1.0": "bafybeihxqueloy3vpevun72wgikkrgmsgpnm3khxb7tt43hdol32imt6by",
"skill/valory/twitter_scoring_abci/0.1.0": "bafybeigyvtr5nhqrlasgy2nxfy5nx7lrmv7tizh55xnewb3z7hlobdc7aq",
"skill/valory/twitter_scoring_abci/0.1.0": "bafybeicrtus6nveu5aaajzw7nlhmxndufv77x7rmqbr7m4fi3d6zqyuu2q",
"skill/valory/ceramic_read_abci/0.1.0": "bafybeihmqflb7aaofxpmvqfwoipzxbwe7jyefddwxgozjdvocamisrfezi",
"skill/valory/ceramic_write_abci/0.1.0": "bafybeibovogo3fzi3clu2eurlrq7nct5bxej3ktd255ajosk55igq4dlqe",
"skill/valory/impact_evaluator_abci/0.1.0": "bafybeiahefujrd4usf4bvsa6oo5hv3u5mmh7bbkeyvmg4jb4ha6q3crwnq",
"skill/valory/impact_evaluator_abci/0.1.0": "bafybeibpvj66fhw2cxcscfpmneumaawfroj373prtemae4sfowelke2qwu",
"skill/valory/generic_scoring_abci/0.1.0": "bafybeihn7dp3ck5rhuyar35xllb3f7uyblnz4yfnrpgrmtoyu4kxxsavkm",
"skill/valory/twitter_write_abci/0.1.0": "bafybeiaofknda4gzs6xks53ta5xwhgs2dvyvfqypdk2ey7if6egjpgarna",
"skill/valory/llm_abci/0.1.0": "bafybeicljcawuikys472glztza4mfj7ccl2eqxcbptysl7tdexik6w6zvm",
"skill/valory/decision_making_abci/0.1.0": "bafybeih7uhlaqfr6mxaiiwujk27afwiml3reia3af53z6c3fioaehvqbsq",
"skill/valory/olas_week_abci/0.1.0": "bafybeiayeqzb3u6e4culfuzenkhtwlgnzttpvahdeqlekfdottm2rmrj4i",
"skill/valory/olas_week_abci/0.1.0": "bafybeia3obwouroyqo5f575qijgvfka77e6ncl6m6b36cqm6tcbrlvyi3y",
"skill/valory/mech_interact_abci/0.1.0": "bafybeicj4c6brjtijdqywn3knejwl4o5ynzi4jcc4sinezeyj7lbgxbu5q",
"skill/valory/farcaster_write_abci/0.1.0": "bafybeibqepsbwfbrlpp6lqauyb2zlapo5j35omuhcwv4s2cmnfl7ujmcc4",
"skill/valory/farcaster_test_abci/0.1.0": "bafybeibgcz7cxdrkkbzwsfn7webtktxh55m63umlb3brh2wx7qwckbmlua",
"agent/valory/impact_evaluator/0.1.0": "bafybeicfzcda2sqqvbxj53jzgyrkyy52xkunc6xzibzub5brbzpt4dkv3i",
"agent/valory/impact_evaluator/0.1.0": "bafybeiaon2hcjyeset7bk235lwzfb6tbr62ltydipjseztuz4qqm4nggxu",
"agent/valory/farcaster_test/0.1.0": "bafybeifcwix6xwyee5wo37jjfazfshsf3h3srmspple4mruyyqz2dsimf4",
"service/valory/impact_evaluator/0.1.0": "bafybeicdmqmqulnel2x4k7kgr3hmdnhm7gjfjap23unxhxuk3s3e52guzu",
"service/valory/impact_evaluator_local/0.1.0": "bafybeigxwceytf46gxajolitjh3mmpae4sbl3ku5y2kpirtpjxd264tb4i"
"service/valory/impact_evaluator/0.1.0": "bafybeic7wqopcnvkwoteb4pvfq7lfcbw5wvlvvtuaw4yvspghj6vna5ray",
"service/valory/impact_evaluator_local/0.1.0": "bafybeifpwm2g6g5aafewpnarqbkqr466zft4refgxz5glilnpytq2bp3hu"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
Expand Down
6 changes: 3 additions & 3 deletions packages/valory/agents/impact_evaluator/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ protocols:
skills:
- valory/abstract_abci:0.1.0:bafybeibzxex6md6xp5eibvp23cmkk7xgdyd44r5lxhfhlquwe3nb22ujgy
- valory/abstract_round_abci:0.1.0:bafybeih2soag6gy472x7vbbxmetmr532jqzm2efcapymi3725as33fvjvu
- valory/impact_evaluator_abci:0.1.0:bafybeiahefujrd4usf4bvsa6oo5hv3u5mmh7bbkeyvmg4jb4ha6q3crwnq
- valory/impact_evaluator_abci:0.1.0:bafybeibpvj66fhw2cxcscfpmneumaawfroj373prtemae4sfowelke2qwu
- valory/generic_scoring_abci:0.1.0:bafybeihn7dp3ck5rhuyar35xllb3f7uyblnz4yfnrpgrmtoyu4kxxsavkm
- valory/twitter_scoring_abci:0.1.0:bafybeigyvtr5nhqrlasgy2nxfy5nx7lrmv7tizh55xnewb3z7hlobdc7aq
- valory/twitter_scoring_abci:0.1.0:bafybeicrtus6nveu5aaajzw7nlhmxndufv77x7rmqbr7m4fi3d6zqyuu2q
- valory/ceramic_read_abci:0.1.0:bafybeihmqflb7aaofxpmvqfwoipzxbwe7jyefddwxgozjdvocamisrfezi
- valory/ceramic_write_abci:0.1.0:bafybeibovogo3fzi3clu2eurlrq7nct5bxej3ktd255ajosk55igq4dlqe
- valory/dynamic_nft_abci:0.1.0:bafybeihxqueloy3vpevun72wgikkrgmsgpnm3khxb7tt43hdol32imt6by
Expand All @@ -56,7 +56,7 @@ skills:
- valory/twitter_write_abci:0.1.0:bafybeiaofknda4gzs6xks53ta5xwhgs2dvyvfqypdk2ey7if6egjpgarna
- valory/decision_making_abci:0.1.0:bafybeih7uhlaqfr6mxaiiwujk27afwiml3reia3af53z6c3fioaehvqbsq
- valory/llm_abci:0.1.0:bafybeicljcawuikys472glztza4mfj7ccl2eqxcbptysl7tdexik6w6zvm
- valory/olas_week_abci:0.1.0:bafybeiayeqzb3u6e4culfuzenkhtwlgnzttpvahdeqlekfdottm2rmrj4i
- valory/olas_week_abci:0.1.0:bafybeia3obwouroyqo5f575qijgvfka77e6ncl6m6b36cqm6tcbrlvyi3y
- valory/mech_interact_abci:0.1.0:bafybeicj4c6brjtijdqywn3knejwl4o5ynzi4jcc4sinezeyj7lbgxbu5q
default_ledger: ethereum
required_ledgers:
Expand Down
19 changes: 11 additions & 8 deletions packages/valory/connections/tweepy/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,44 +137,47 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pragma: no cover
:param kwargs: keyword arguments passed to component base
"""
super().__init__(*args, **kwargs)
self.twitter_read_credentials = deque(
self.configuration.config.get("twitter_read_credentials", [])
twitter_read_credentials = self.configuration.config.get(
"twitter_read_credentials", []
)
self.twitter_write_credentials = deque(
self.configuration.config.get("twitter_write_credentials", [])
twitter_write_credentials = self.configuration.config.get(
"twitter_write_credentials", []
)
self.use_staging_api = self.configuration.config.get("use_staging_api", False)
self.staging_api = self.configuration.config["staging_api"]
self.ipfs_tool = IPFSTool()

if not self.twitter_read_credentials:
if not twitter_read_credentials:
self.logger.warning(
"No Twitter read credentials have been set. The service will not be able to read tweets."
)

try:
jsonschema.validate(
instance=self.twitter_read_credentials, schema=CREDENTIALS_SCHEMA
instance=twitter_read_credentials, schema=CREDENTIALS_SCHEMA
)
except jsonschema.exceptions.ValidationError as e:
raise ValueError(
f"Twitter read credentials do not follow the required schema:\n{e}"
) from e

if not self.twitter_write_credentials:
if not twitter_write_credentials:
self.logger.warning(
"No Twitter write credentials have been set. The service will not be able to write tweets."
)

try:
jsonschema.validate(
instance=self.twitter_write_credentials, schema=CREDENTIALS_SCHEMA
instance=twitter_write_credentials, schema=CREDENTIALS_SCHEMA
)
except jsonschema.exceptions.ValidationError as e:
raise ValueError(
f"Twitter write credentials do not follow the required schema:\n{e}"
) from e

self.twitter_read_credentials = deque(twitter_read_credentials)
self.twitter_write_credentials = deque(twitter_write_credentials)

self.dialogues = SrrDialogues(connection_id=PUBLIC_ID)

def main(self) -> None:
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/connections/tweepy/connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeicrwqrdownfmeyvvzu45fllxouiwvtynrzs5fhbpt3wndyyhn66eu
connection.py: bafybeida6vznywho622atwu6esrspco32ndv62pk2q2sjpwo2m5iswmtpm
connection.py: bafybeif5oktrf6fbyyp2yrqy4greusqg5pvpe4ouyrnklcd6xrak4kwr6a
readme.md: bafybeib5oflnp3gymrottersu6qrnitjmaifl2gvbvjq7kbmsdbihhzfaa
fingerprint_ignore_patterns: []
connections: []
protocols:
- valory/srr:0.1.0:bafybeihrixgptxuqpf2s4nujypwlv5aed2nboozq5kl4c26cxw6r7si2x4
class_name: LlamaConnection
class_name: TweepyConnection
config:
twitter_read_credentials: []
twitter_write_credentials: []
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/impact_evaluator/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeign56hilwuoa6bgos3uqabss4gew4vadkik7vhj3ucpqw6nxtqtpe
fingerprint_ignore_patterns: []
agent: valory/impact_evaluator:0.1.0:bafybeicfzcda2sqqvbxj53jzgyrkyy52xkunc6xzibzub5brbzpt4dkv3i
agent: valory/impact_evaluator:0.1.0:bafybeiaon2hcjyeset7bk235lwzfb6tbr62ltydipjseztuz4qqm4nggxu
number_of_agents: 4
deployment:
agent:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeign56hilwuoa6bgos3uqabss4gew4vadkik7vhj3ucpqw6nxtqtpe
fingerprint_ignore_patterns: []
agent: valory/impact_evaluator:0.1.0:bafybeicfzcda2sqqvbxj53jzgyrkyy52xkunc6xzibzub5brbzpt4dkv3i
agent: valory/impact_evaluator:0.1.0:bafybeiaon2hcjyeset7bk235lwzfb6tbr62ltydipjseztuz4qqm4nggxu
number_of_agents: 1
deployment:
agent:
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/impact_evaluator_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ skills:
- valory/abstract_round_abci:0.1.0:bafybeih2soag6gy472x7vbbxmetmr532jqzm2efcapymi3725as33fvjvu
- valory/ceramic_read_abci:0.1.0:bafybeihmqflb7aaofxpmvqfwoipzxbwe7jyefddwxgozjdvocamisrfezi
- valory/generic_scoring_abci:0.1.0:bafybeihn7dp3ck5rhuyar35xllb3f7uyblnz4yfnrpgrmtoyu4kxxsavkm
- valory/twitter_scoring_abci:0.1.0:bafybeigyvtr5nhqrlasgy2nxfy5nx7lrmv7tizh55xnewb3z7hlobdc7aq
- valory/twitter_scoring_abci:0.1.0:bafybeicrtus6nveu5aaajzw7nlhmxndufv77x7rmqbr7m4fi3d6zqyuu2q
- valory/ceramic_write_abci:0.1.0:bafybeibovogo3fzi3clu2eurlrq7nct5bxej3ktd255ajosk55igq4dlqe
- valory/dynamic_nft_abci:0.1.0:bafybeihxqueloy3vpevun72wgikkrgmsgpnm3khxb7tt43hdol32imt6by
- valory/registration_abci:0.1.0:bafybeiaxomjnv2h7ozc7mvmz5wysfinfgtqnniznpcdunijb5iiekv4mzi
Expand All @@ -36,7 +36,7 @@ skills:
- valory/decision_making_abci:0.1.0:bafybeih7uhlaqfr6mxaiiwujk27afwiml3reia3af53z6c3fioaehvqbsq
- valory/llm_abci:0.1.0:bafybeicljcawuikys472glztza4mfj7ccl2eqxcbptysl7tdexik6w6zvm
- valory/twitter_write_abci:0.1.0:bafybeiaofknda4gzs6xks53ta5xwhgs2dvyvfqypdk2ey7if6egjpgarna
- valory/olas_week_abci:0.1.0:bafybeiayeqzb3u6e4culfuzenkhtwlgnzttpvahdeqlekfdottm2rmrj4i
- valory/olas_week_abci:0.1.0:bafybeia3obwouroyqo5f575qijgvfka77e6ncl6m6b36cqm6tcbrlvyi3y
- valory/mech_interact_abci:0.1.0:bafybeicj4c6brjtijdqywn3knejwl4o5ynzi4jcc4sinezeyj7lbgxbu5q
behaviours:
main:
Expand Down
Loading
Loading