Skip to content

Commit

Permalink
Merge pull request #236 from valory-xyz/fix/wio-context
Browse files Browse the repository at this point in the history
Fix/wio context
  • Loading branch information
dvilelaf authored Nov 22, 2024
2 parents be946f7 + e8b5dd0 commit cb8bdcd
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 28 deletions.
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:bafybeidcyuswnxxxht6jiy5uj47tigaspcubt46dczc7aqh6rchhgl3egq --service
autonomy fetch valory/impact_evaluator:0.1.0:bafybeigf4v5aspbyr4neprdpnlmyk7pndwjtm3s2aqgl7szoegxfuokurm --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,26 +12,26 @@
"contract/valory/mech_marketplace/0.1.0": "bafybeifsq7velt7qeftuft6gsdl7sn5axjli7gcyelymwlsmtlydizp23y",
"contract/valory/staking/0.1.0": "bafybeic5uoebjmfhfwrbopnzl6awjxbwrkkrogbpxu67n5lh5cmrpskgdq",
"connection/valory/twitter/0.1.0": "bafybeiffqsvt3i37sd5qdsmpzf5i4hm37uosbobyogg5oyosovjs66buni",
"connection/valory/openai/0.1.0": "bafybeifz2n6s6u3zvvryhhxpkvn6guyp2jwpagtyjducvgwoldtmz7ea64",
"connection/valory/openai/0.1.0": "bafybeib6bm45cfb7o4ixmf5iswzyb2mf6m5y6rogbt6romerhdrzc6vkya",
"connection/valory/farcaster/0.1.0": "bafybeibbdas7lxbipksodaphjms3uop7vnzjqkroktjq2g6wbvgtlldaxi",
"skill/valory/dynamic_nft_abci/0.1.0": "bafybeianbjebbb2xkjrowirzoxkbgg6ugkqvivt6ehzvntyvat4wpzqgju",
"skill/valory/twitter_scoring_abci/0.1.0": "bafybeibdziydhsk47j7kphgkogzecbcxboouwgbfim3levf2c3oovvloje",
"skill/valory/ceramic_read_abci/0.1.0": "bafybeigz7rzfls3niv3urfb4z4vwr525ooxveelgg3djpvkg5jzetxlm2u",
"skill/valory/ceramic_write_abci/0.1.0": "bafybeic6c3iub3nsr5tmr7g5vzoixbin6w64ewudfiq6u4r2fiqwbg753i",
"skill/valory/impact_evaluator_abci/0.1.0": "bafybeicrusnfgdkf4xi4m4l4kyvl2fww6hgv2sukbap7d45majpagrikt4",
"skill/valory/impact_evaluator_abci/0.1.0": "bafybeibinbc7z5rjleev7ptqnk67jeuufdkmkrzgme3o2em6x6d75ut77i",
"skill/valory/generic_scoring_abci/0.1.0": "bafybeibgttqow3dbtpm5si7dhkfqcv64twvuoosfj5ha53u7qb7ihupp6y",
"skill/valory/twitter_write_abci/0.1.0": "bafybeibp7zai2qwvfjd5fgpayx44x5c2zshbukpobvz2la7ws2l5f5fjde",
"skill/valory/llm_abci/0.1.0": "bafybeib2k62hilwglfad33bzxkjlviw5bxwiw7z3rjvweyeamatdjznpeq",
"skill/valory/llm_abci/0.1.0": "bafybeicezihjsqnyfgowf2plosv6dzs5q3qlcoyhyqjftsi4qcsonhwpnm",
"skill/valory/decision_making_abci/0.1.0": "bafybeieshkhwnqijyhqdw2z7ejnnal5c3crth2sdgujwbfgozdecllgeiq",
"skill/valory/olas_week_abci/0.1.0": "bafybeifnc2642fhqsncuqwype465xbdfnwlrsdna3pikhxvupw4mdfkd3i",
"skill/valory/olas_week_abci/0.1.0": "bafybeiem2vz56ydmckpwriud4pt6w3iap5pepieqaqwmy4ghdqaaa53xs4",
"skill/valory/mech_interact_abci/0.1.0": "bafybeicpskytv7osu6bdpmcweemlsb4f3m6gldzpyoxgawkczsmvlrzgma",
"skill/valory/farcaster_write_abci/0.1.0": "bafybeigx2wyujnojer7er7g2eufm5lojon2dckotvsgwb6tn5iyiwdfgsu",
"skill/valory/farcaster_test_abci/0.1.0": "bafybeielv62wl7hrnmbnqdtjfj5uz6onm46awmuzfpwotxa4ex4tqme7am",
"skill/valory/staking_abci/0.1.0": "bafybeia25btekbiwi7tep6wzjlojc5g4msrxtfkhunuzlopjbjziactrje",
"agent/valory/impact_evaluator/0.1.0": "bafybeidnh7lxvkctfnwgez3nneqp6sf5hexhsclnnc5ifkvegjied4kkci",
"agent/valory/impact_evaluator/0.1.0": "bafybeibbuev3ybvfjgmu5lvxv7h32educpee3ybbzwpl6fdqpcim4d2vni",
"agent/valory/farcaster_test/0.1.0": "bafybeicm25cyzmnnqxfschr3qpwfamiecc6zbog2brzxuxzlbv7wsykxlu",
"service/valory/impact_evaluator/0.1.0": "bafybeidcyuswnxxxht6jiy5uj47tigaspcubt46dczc7aqh6rchhgl3egq",
"service/valory/impact_evaluator_local/0.1.0": "bafybeigexb2vwxo3mh46xa4ez4zoasxkjnbgf6x7jzn63ilkxlelg3rwae"
"service/valory/impact_evaluator/0.1.0": "bafybeigf4v5aspbyr4neprdpnlmyk7pndwjtm3s2aqgl7szoegxfuokurm",
"service/valory/impact_evaluator_local/0.1.0": "bafybeihdntggvjsiaxfgi25bnmqxltziaegj54yfsct6dodajpkubrdaiq"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
Expand Down
8 changes: 4 additions & 4 deletions packages/valory/agents/impact_evaluator/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ connections:
- valory/http_client:0.23.0:bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u
- valory/ledger:0.19.0:bafybeigntoericenpzvwejqfuc3kqzo2pscs76qoygg5dbj6f4zxusru5e
- valory/p2p_libp2p_client:0.1.0:bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e
- valory/openai:0.1.0:bafybeifz2n6s6u3zvvryhhxpkvn6guyp2jwpagtyjducvgwoldtmz7ea64
- valory/openai:0.1.0:bafybeib6bm45cfb7o4ixmf5iswzyb2mf6m5y6rogbt6romerhdrzc6vkya
- valory/twitter:0.1.0:bafybeiffqsvt3i37sd5qdsmpzf5i4hm37uosbobyogg5oyosovjs66buni
contracts:
- valory/dynamic_contribution:0.1.0:bafybeidlvppnbass74mammqf6r6sn24pt7obnig3gaafnmlwcvf65yn2ny
Expand All @@ -45,7 +45,7 @@ protocols:
skills:
- valory/abstract_abci:0.1.0:bafybeieo7pe5wqjphs5izpz5aujjbubymlxub62b3rhx6yglu65ibalffu
- valory/abstract_round_abci:0.1.0:bafybeibiw4oqwqvo4jccwz5fb73iardzychgvcl66tceiildohoju2ikti
- valory/impact_evaluator_abci:0.1.0:bafybeicrusnfgdkf4xi4m4l4kyvl2fww6hgv2sukbap7d45majpagrikt4
- valory/impact_evaluator_abci:0.1.0:bafybeibinbc7z5rjleev7ptqnk67jeuufdkmkrzgme3o2em6x6d75ut77i
- valory/generic_scoring_abci:0.1.0:bafybeibgttqow3dbtpm5si7dhkfqcv64twvuoosfj5ha53u7qb7ihupp6y
- valory/twitter_scoring_abci:0.1.0:bafybeibdziydhsk47j7kphgkogzecbcxboouwgbfim3levf2c3oovvloje
- valory/ceramic_read_abci:0.1.0:bafybeigz7rzfls3niv3urfb4z4vwr525ooxveelgg3djpvkg5jzetxlm2u
Expand All @@ -57,8 +57,8 @@ skills:
- valory/transaction_settlement_abci:0.1.0:bafybeigh2vkt74jrad5gtsczrgqcuhcqe7jkgjy7jdw56yamlzwwnaymjy
- valory/twitter_write_abci:0.1.0:bafybeibp7zai2qwvfjd5fgpayx44x5c2zshbukpobvz2la7ws2l5f5fjde
- valory/decision_making_abci:0.1.0:bafybeieshkhwnqijyhqdw2z7ejnnal5c3crth2sdgujwbfgozdecllgeiq
- valory/llm_abci:0.1.0:bafybeib2k62hilwglfad33bzxkjlviw5bxwiw7z3rjvweyeamatdjznpeq
- valory/olas_week_abci:0.1.0:bafybeifnc2642fhqsncuqwype465xbdfnwlrsdna3pikhxvupw4mdfkd3i
- valory/llm_abci:0.1.0:bafybeicezihjsqnyfgowf2plosv6dzs5q3qlcoyhyqjftsi4qcsonhwpnm
- valory/olas_week_abci:0.1.0:bafybeiem2vz56ydmckpwriud4pt6w3iap5pepieqaqwmy4ghdqaaa53xs4
- valory/mech_interact_abci:0.1.0:bafybeicpskytv7osu6bdpmcweemlsb4f3m6gldzpyoxgawkczsmvlrzgma
- valory/staking_abci:0.1.0:bafybeia25btekbiwi7tep6wzjlojc5g4msrxtfkhunuzlopjbjziactrje
default_ledger: ethereum
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/connections/openai/connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protocols:
class_name: OpenaiConnection
config:
engine: text-davinci-003
max_tokens: 500
max_tokens: 1500
openai_api_key: null
temperature: 0.7
use_openai_staging_api: false
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:bafybeidnh7lxvkctfnwgez3nneqp6sf5hexhsclnnc5ifkvegjied4kkci
agent: valory/impact_evaluator:0.1.0:bafybeibbuev3ybvfjgmu5lvxv7h32educpee3ybbzwpl6fdqpcim4d2vni
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:bafybeidnh7lxvkctfnwgez3nneqp6sf5hexhsclnnc5ifkvegjied4kkci
agent: valory/impact_evaluator:0.1.0:bafybeibbuev3ybvfjgmu5lvxv7h32educpee3ybbzwpl6fdqpcim4d2vni
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 @@ -34,9 +34,9 @@ skills:
- valory/termination_abci:0.1.0:bafybeifi2uodnrjsrivj53g3sjutocmyusbx6mlsb6oanqdyt2mfbyvusy
- valory/transaction_settlement_abci:0.1.0:bafybeigh2vkt74jrad5gtsczrgqcuhcqe7jkgjy7jdw56yamlzwwnaymjy
- valory/decision_making_abci:0.1.0:bafybeieshkhwnqijyhqdw2z7ejnnal5c3crth2sdgujwbfgozdecllgeiq
- valory/llm_abci:0.1.0:bafybeib2k62hilwglfad33bzxkjlviw5bxwiw7z3rjvweyeamatdjznpeq
- valory/llm_abci:0.1.0:bafybeicezihjsqnyfgowf2plosv6dzs5q3qlcoyhyqjftsi4qcsonhwpnm
- valory/twitter_write_abci:0.1.0:bafybeibp7zai2qwvfjd5fgpayx44x5c2zshbukpobvz2la7ws2l5f5fjde
- valory/olas_week_abci:0.1.0:bafybeifnc2642fhqsncuqwype465xbdfnwlrsdna3pikhxvupw4mdfkd3i
- valory/olas_week_abci:0.1.0:bafybeiem2vz56ydmckpwriud4pt6w3iap5pepieqaqwmy4ghdqaaa53xs4
- valory/mech_interact_abci:0.1.0:bafybeicpskytv7osu6bdpmcweemlsb4f3m6gldzpyoxgawkczsmvlrzgma
- valory/staking_abci:0.1.0:bafybeia25btekbiwi7tep6wzjlojc5g4msrxtfkhunuzlopjbjziactrje
behaviours:
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/skills/llm_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fingerprint:
tests/test_rounds.py: bafybeicoiykxooup743nzzzfzc3m4uvsab5bljeipgcoo2hke54fcab3xa
fingerprint_ignore_patterns: []
connections:
- valory/openai:0.1.0:bafybeifz2n6s6u3zvvryhhxpkvn6guyp2jwpagtyjducvgwoldtmz7ea64
- valory/openai:0.1.0:bafybeib6bm45cfb7o4ixmf5iswzyb2mf6m5y6rogbt6romerhdrzc6vkya
contracts: []
protocols:
- valory/llm:1.0.0:bafybeihj2orqapokafg7co3wlogwgf6cckaaj2bz3nuv4rm3opkoyhrlp4
Expand Down
12 changes: 4 additions & 8 deletions packages/valory/skills/olas_week_abci/behaviours.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@


ONE_DAY = 86400.0
ADDRESS_REGEX = r"0x[a-fA-F0-9]{40}"
TAGLINE = "I'm linking my wallet to @Autonolas Contribute:"
DEFAULT_TWEET_POINTS = 100
TWEET_QUALITY_TO_POINTS = {"LOW": 1, "AVERAGE": 2, "HIGH": 3}
TWEET_RELATIONSHIP_TO_POINTS = {"LOW": 100, "AVERAGE": 200, "HIGH": 300}
HTTP_OK = 200
HTTP_TOO_MANY_REQUESTS = 429
MAX_TWEET_CHARS = 280
HIGHLIGHT_REGEX = r"☴.*\n"
Expand Down Expand Up @@ -605,7 +599,7 @@ def _get_tweets(

break

self.context.logger.info(f"Got {len(tweets)} new tweets")
self.context.logger.info(f"Got {len(tweets)} new tweets: {tweets.keys()}")

return {
"tweets": list(tweets.values()),
Expand Down Expand Up @@ -714,7 +708,9 @@ def evaluate_summary(
)
data = llm_response_message.value
self.openai_calls.increase_call_count()
self.context.logger.info(f"Got summary: {repr(data)}")
self.context.logger.info(
f"Got summary for week {week_number} year {year_abbreviation}:\n{repr(data)}"
)
summary = build_thread(data, week_number, year_abbreviation)
self.context.logger.info(f"Parsed summary: {summary}")
return summary
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/olas_week_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeibvgxh4baqhxapbbryg7qlglf4czricwqqs34gjs5vwwppg5nuvsq
behaviours.py: bafybeihx4qh5rci6jkcecxqsvkukxglq7qxd365k6il2mmv2fo62p7jnwq
behaviours.py: bafybeieox4cuml2mkczsoirpu3ws32miarbtxlxwavsapqg2ja2j7izb2e
dialogues.py: bafybeia7zebqkgbubzenskcrgjocgyd2pc3q5yxcjddte4emys32qt6xpm
fsm_specification.yaml: bafybeienycmc4m3wurhlsuj7hfumrsx5id3qfdn6eisoze4gdzeeojlrbu
handlers.py: bafybeialoqm2byetvqqrjujhk3qzgdgsrzmhakmzwdop2cr24kswipl6ti
Expand All @@ -25,7 +25,7 @@ fingerprint:
tests/test_rounds.py: bafybeiei2srj4ggs3pln7vxxt4walhrtsegveimxdcbckyng2i6wv53vy4
fingerprint_ignore_patterns: []
connections:
- valory/openai:0.1.0:bafybeifz2n6s6u3zvvryhhxpkvn6guyp2jwpagtyjducvgwoldtmz7ea64
- valory/openai:0.1.0:bafybeib6bm45cfb7o4ixmf5iswzyb2mf6m5y6rogbt6romerhdrzc6vkya
contracts: []
protocols:
- valory/llm:1.0.0:bafybeihj2orqapokafg7co3wlogwgf6cckaaj2bz3nuv4rm3opkoyhrlp4
Expand Down

0 comments on commit cb8bdcd

Please sign in to comment.