Skip to content

Commit

Permalink
chore: Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoreira-valory committed Jul 10, 2023
1 parent 45ecc81 commit 29764ee
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 38 deletions.
14 changes: 9 additions & 5 deletions packages/packages.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"dev": {
"skill/valory/market_creation_manager_abci/0.1.0": "bafybeif54eume4ubl5efupmtefnfjq2wq32meljl3itjvohzxwgmrsrcxy"
"skill/valory/market_creation_manager_abci/0.1.0": "bafybeibx7rarfk3lxur3r2oqgi7ehasusrv2dvxesvclh2xxtghxmpg64i",
"skill/valory/market_creator_abci/0.1.0": "bafybeidljqhclwb47swxrtwwigd5k7ghrwbobsi6zyv2tacpaw6iv7buwy"
},
"third_party": {
"protocol/valory/contract_api/1.0.0": "bafybeidv6wxpjyb2sdyibnmmum45et4zcla6tl63bnol6ztyoqvpl4spmy",
Expand All @@ -17,11 +18,14 @@
"connection/valory/ledger/0.19.0": "bafybeicgfupeudtmvehbwziqfxiz6ztsxr5rxzvalzvsdsspzz73o5fzfi",
"connection/valory/http_client/0.23.0": "bafybeidykl4elwbcjkqn32wt5h4h7tlpeqovrcq3c5bcplt6nhpznhgczi",
"contract/valory/service_registry/0.1.0": "bafybeibdy55edqs3djptv77ljkmbf6m3zizhutmvwgj3hpsagvmzhr4jbm",
"contract/valory/gnosis_safe/0.1.0": "bafybeif5fdwoxq5mscrurtuimadmtctyxxeeui45u4g6leqobzls7bsl3u",
"contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeiaa6fgwtykrti6i7sbt22raavpsbobsq2xgem4nkbcg744agnmkae",
"contract/valory/multisend/0.1.0": "bafybeict2k3vf3c4fvzosaq5kku2ivtzsskbomrujmmoicut7eg52onnje",
"skill/valory/abstract_abci/0.1.0": "bafybeiff2dqnkeorf343fmb3547fhiznvdw4ewbwl4rqluek2cv6ibl5hi",
"skill/valory/abstract_round_abci/0.1.0": "bafybeihlcferdpjhcorbrgp3zplikxkuxmlx3x7mc4g5sjxxm2mgzryfia",
"skill/valory/transaction_settlement_abci/0.1.0": "bafybeihuzoxkhnpep4zcekdq463hopohj3i7rkxvbc2ywmmcyppi3knbxy",
"skill/valory/registration_abci/0.1.0": "bafybeie4suynydmpq2myqkdzhiqoro2hr4zexd5a2o4rvch7yefw65kjvq",
"skill/valory/reset_pause_abci/0.1.0": "bafybeiaickab63rqbu3kywnwyrfaa4362ai7rbvhghehxnvqk54eiaaegm",
"skill/valory/termination_abci/0.1.0": "bafybeieqpy3nu7qoy6ztfxetgiuevmgcpylufou3ngh5nw2vsgsvghid54"
"skill/valory/transaction_settlement_abci/0.1.0": "bafybeiapapnnfwuto7gu2izdyciir7tbegktizccoe5ya63gp2gyt4p4ki",
"skill/valory/registration_abci/0.1.0": "bafybeift43mkwgakbx4j76lrp6ixqgk33wgy6wti7uoq2evny6h2pewkti",
"skill/valory/reset_pause_abci/0.1.0": "bafybeibs25kzoyxcxdnczdvvhnllratimhwuuytgu4zybzkmpglkice4um",
"skill/valory/termination_abci/0.1.0": "bafybeiabozz2ta2hizq5u2lnkrp3v345unb6xug7ncls6ad4st57lg5seq"
}
}
12 changes: 6 additions & 6 deletions packages/valory/skills/market_creation_manager_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeifotgt5johrebg3iaokvi5jkfiy3mk5dtkfyuersobinhzxp3ilba
behaviours.py: bafybeict44b2iksswnyb7pvf3qo3yzeptcruaibx5i5doo33yuopmxl4l4
behaviours.py: bafybeicrm6p2uplmvbva6burejq6je7j2c7w6hcb4l67gwgl4kiktvbwgy
dialogues.py: bafybeignhvmpiyjyby5ls726hkeawtw6q4ob6br7bqtwf5ujk2z6mlkyiq
fsm_specification.yaml: bafybeiglkfuldn2z6lzf7qtffeaw3tk4ly4y33ayellrvkkxp3g4hjtbxi
fsm_specification.yaml: bafybeig3ro2adoi6wd2xoxkp4dxvqe4kypatvw4nw7wrhuzbfvyp2anlca
handlers.py: bafybeihteow3fq4pt23ivbdoxsnyilvyvtr5uakz42dkyltvgik5zkrshe
models.py: bafybeihi2p5s6iy73wpsnny6sk4wpgjw7ck7nru3cvxrqhezxy7i5padxa
payloads.py: bafybeigykom4sregmkss4mmce3dastujg5nokcv5x4msu667ty4sjf4io4
rounds.py: bafybeifunvzqnthlmxj7vsywffpwl4laflt6gvlbcrrykltikx5hkatzpu
models.py: bafybeigqixvhbcjzlcdeueut6fq2s2da2fhnx5kr4j7ln64vyqplcyrdde
payloads.py: bafybeiezykfzgehmemkkmca5umpwush4b7rre5xrp5gbf3mv6plksmwjzi
rounds.py: bafybeigkgfscocq74yirgu7oevfg2qbo2uuyr2qotyxcdowqyxbkux335u
tests/__init__.py: bafybeic3534aro4pdtsdcuxywzlgkccczx2elhnwisiq3r6okvnrdu4aia
fingerprint_ignore_patterns: []
connections: []
contracts: []
protocols: []
skills:
- valory/abstract_round_abci:0.1.0
- valory/abstract_round_abci:0.1.0:bafybeihlcferdpjhcorbrgp3zplikxkuxmlx3x7mc4g5sjxxm2mgzryfia
behaviours:
main:
args: {}
Expand Down
27 changes: 13 additions & 14 deletions packages/valory/skills/market_creator_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ description: The scaffold skill is a scaffold for your own skill implementation.
license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
README.md: bafybeicg5eg7f4fhaxflzaz6h73xklax6cfggg6d4sjl27tcs3rjqgflza
__init__.py: bafybeihlgffzmngu3ydky57kchhrdsfakmvpbq5mcmyrsdnolfnimftktm
behaviours.py: bafybeig3klyi5thvogwcdrqqzswaad3c3xihq5wa4op6dnkrtxfpedlorq
composition.py: bafybeie67y75ajuijisina4pm6l557vx2wu5tftr6a62d6mctgg3mh2r4q
README.md: bafybeiaa46uuvl2cbxvgdqrqhfh5te6z2iinqktaoz3sycjd6wpar2nfhy
__init__.py: bafybeiggomi7fnpsyytwm2fxkkukphinbtcostnbcwyldqv5fumajpyh4m
behaviours.py: bafybeicfytvkypyyb2zqfq4fcma6l3sdebzfj2utoyipfh5tk7jjoxzdwe
composition.py: bafybeiamj2il5sioaejefddsmm73zurwmgohszzuolf6uf5jja6g2ogfjy
dialogues.py: bafybeigabhaykiyzbluu4mk6bbrmqhzld2kyp32pg24bvjmzrrb74einwm
fsm_specification.yaml: bafybeicvtoez7ahmyl25h66edgjywx5ymxtqnyexzq73ouyu2p6smi3uoa
handlers.py: bafybeieied5iol2p7t4rgpkxlonfuc6jhtjdaktpkpgobsfc3xyawptuwa
models.py: bafybeibniz6je7wwa5lr3oxlgkw55mb36hl46mn7bozjguqrblw4hvbbhm
tests/__init__.py: bafybeihlgffzmngu3ydky57kchhrdsfakmvpbq5mcmyrsdnolfnimftktm
handlers.py: bafybeifcsb46xvr5rhl72qc2pywgckucktf27fba6uisvzqsnueafuht7a
models.py: bafybeifenf3zhpbf2f33i44btbzrrtc6bltv4edxjmhwg77bvb2on4rcnu
tests/__init__.py: bafybeicpj455mv4zlxsmos5exxjtddczwmpfa7rw6m4epdd2fssv5nbw7u
fingerprint_ignore_patterns: []
connections:
- valory/ledger:0.19.0:bafybeicgfupeudtmvehbwziqfxiz6ztsxr5rxzvalzvsdsspzz73o5fzfi
Expand All @@ -24,13 +24,12 @@ protocols:
- valory/contract_api:1.0.0:bafybeidv6wxpjyb2sdyibnmmum45et4zcla6tl63bnol6ztyoqvpl4spmy
- valory/ledger_api:1.0.0:bafybeibo4bdtcrxi2suyzldwoetjar6pqfzm6vt5xal22ravkkcvdmtksi
skills:
- valory/abstract_round_abci:0.1.0:bafybeiarzpxsy7ulitk5obs4zajhll2m77motjn5st7mi6qvjtkoirfikq
- valory/oracle_deployment_abci:0.1.0:bafybeidttc7dz4ipc3nqc4624p4uor5ubql7mvze7qrsl4djwpz25rjtcq
- valory/price_estimation_abci:0.1.0:bafybeig4q2ugqkiyvvgwn647t6hl2sqzvxpcaoph4utbqhowxgvtl54w7u
- valory/registration_abci:0.1.0:bafybeie4suynydmpq2myqkdzhiqoro2hr4zexd5a2o4rvch7yefw65kjvq
- valory/reset_pause_abci:0.1.0:bafybeiaickab63rqbu3kywnwyrfaa4362ai7rbvhghehxnvqk54eiaaegm
- valory/termination_abci:0.1.0:bafybeieqpy3nu7qoy6ztfxetgiuevmgcpylufou3ngh5nw2vsgsvghid54
- valory/transaction_settlement_abci:0.1.0:bafybeihuzoxkhnpep4zcekdq463hopohj3i7rkxvbc2ywmmcyppi3knbxy
- valory/abstract_round_abci:0.1.0:bafybeihlcferdpjhcorbrgp3zplikxkuxmlx3x7mc4g5sjxxm2mgzryfia
- valory/market_creation_manager_abci:0.1.0:bafybeibx7rarfk3lxur3r2oqgi7ehasusrv2dvxesvclh2xxtghxmpg64i
- valory/registration_abci:0.1.0:bafybeift43mkwgakbx4j76lrp6ixqgk33wgy6wti7uoq2evny6h2pewkti
- valory/reset_pause_abci:0.1.0:bafybeibs25kzoyxcxdnczdvvhnllratimhwuuytgu4zybzkmpglkice4um
- valory/termination_abci:0.1.0:bafybeiabozz2ta2hizq5u2lnkrp3v345unb6xug7ncls6ad4st57lg5seq
- valory/transaction_settlement_abci:0.1.0:bafybeiapapnnfwuto7gu2izdyciir7tbegktizccoe5ya63gp2gyt4p4ki
behaviours:
main:
args: {}
Expand Down
38 changes: 25 additions & 13 deletions scripts/market_creator_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,20 @@
INSTRUCTIONS
* Read the input under the label "INPUT" delimited by three backticks.
* The "INPUT" specifies a list of recent news headlines and short descriptions.
* Based on the "INPUT" and your training data you must provide a list of binary questions suitable to create prediction markets.
- Each question must be unknown at the present time, but its answer will be known in a period between 3 to 12 months.
- All questions must be different and not overlap semantically.
- The questions must be specific and reflect deterministic, measurable facts whose answer will be known for sure.
- Do not include questions whose response is subjective.
* The "INPUT" specifies a list of recent news headlines, their date, and short descriptions.
* Based on the "INPUT" and your training data, you must provide a list of binary questions, valid answers and resolution dates to create prediction markets.
Each market must satisfy the following conditions:
- The outcome of the market is unknown at the present date.
- The outcome of the market must be known by its resolution date.
- The outcome of the market must be related to a deterministic, measurable or verifiable fact.
- Questions whose answer is known at the present date are invalid.
- Questions whose answer is subjective or opinionated are invalid.
- Questions with relative dates are invalid.
- Questions about moral values, subjective opinions and not facts are invalid.
- Questions in which none of the answers are valid will resolve as invalid.
- Questions with multiple valid answers are invalid.
- Questions must not incentive to commit an immoral violent action.
* The created markets must be different and not overlap semantically.
* You must provide your response in the format specified under "OUTPUT_FORMAT".
* Do not include any other contents in your response.
Expand All @@ -49,8 +57,8 @@
* The JSON array must be of length 10.
* Each entry of the JSON array must be a JSON object containing the fields:
- question: The binary question to open a prediction market.
- answers: The binary answers to the question.
- period: The expected period for the real answer to the question to be known.
- answers: The possible answers to the question.
- resolution_date: The resolution date for the outcome of the market to be verified.
* Output only the JSON object. Do not include any other contents in your response.
"""

Expand All @@ -76,13 +84,15 @@ def run(**kwargs) -> Tuple[str, Optional[Dict[str, Any]]]:
}

today = datetime.date.today()
from_date = today - datetime.timedelta(days=7)
to_date = today

params = {
"q": "arts OR business OR finance OR cryptocurrency OR politics OR science OR technology OR sports OR weather OR entertainment",
"language": "en",
"sortBy": "popularity",
"from": today - datetime.timedelta(days=7),
"to": today,
"from": from_date,
"to": to_date,
}

response = requests.get(newsapi_url, params=params, headers=newsapi_headers)
Expand All @@ -97,11 +107,13 @@ def run(**kwargs) -> Tuple[str, Optional[Dict[str, Any]]]:
for article in articles:
title = article['title']
content = article['content']
input_news += f"- {title}\n {content}\n\n"

date = article['publishedAt']
input_news += f"- ({date}) {title}\n {content}\n\n"

market_creation_prompt = MARKET_CREATION_PROMPT.format(
input_news=input_news
input_news=input_news,
from_date=from_date,
to_date=to_date
)

print(market_creation_prompt)
Expand Down

0 comments on commit 29764ee

Please sign in to comment.