From 73c0d88af6ba091052b180df134d06e9d3bc2103 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 13:02:41 +0200 Subject: [PATCH 01/10] feat: apply tool fixes --- .../component.yaml | 2 +- .../prediction_request_reasoning.py | 205 +++++++++--------- .../prediction_request_sme/component.yaml | 2 +- .../prediction_request_sme.py | 1 + packages/packages.json | 43 ++-- packages/valory/agents/mech/aea-config.yaml | 38 ++-- .../prediction_request_claude/component.yaml | 2 +- .../prediction_request_claude.py | 106 +++++---- .../valory/customs/prepare_tx/component.yaml | 6 +- .../valory/customs/prepare_tx/prepare_tx.py | 116 ++++++++-- .../valory/customs/short_maker/__init__.py | 19 ++ .../valory/customs/short_maker/component.yaml | 14 ++ packages/valory/services/mech/service.yaml | 2 +- packages/valory/skills/mech_abci/skill.yaml | 16 +- .../skills/subscription_abci/skill.yaml | 6 +- .../skills/task_execution/behaviours.py | 1 + .../valory/skills/task_execution/skill.yaml | 6 +- .../skills/task_execution/utils/benchmarks.py | 3 + .../skills/task_submission_abci/behaviours.py | 5 +- .../skills/task_submission_abci/skill.yaml | 10 +- 20 files changed, 373 insertions(+), 230 deletions(-) create mode 100644 packages/valory/customs/short_maker/__init__.py create mode 100644 packages/valory/customs/short_maker/component.yaml diff --git a/packages/napthaai/customs/prediction_request_reasoning/component.yaml b/packages/napthaai/customs/prediction_request_reasoning/component.yaml index eee9c36a..25117154 100644 --- a/packages/napthaai/customs/prediction_request_reasoning/component.yaml +++ b/packages/napthaai/customs/prediction_request_reasoning/component.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeib36ew6vbztldut5xayk5553rylrq7yv4cpqyhwc5ktvd4cx67vwu - prediction_request_reasoning.py: bafybeifjm24tqil3nan37dbg4u7qm3xw3jxfu5eleg3cojmka67dwaclpa + prediction_request_reasoning.py: bafybeid3umzaz7qzxyf4pda6ffmayyhmr7fjx35bk4qzpsi33rtanddrem fingerprint_ignore_patterns: [] entry_point: prediction_request_reasoning.py callable: run diff --git a/packages/napthaai/customs/prediction_request_reasoning/prediction_request_reasoning.py b/packages/napthaai/customs/prediction_request_reasoning/prediction_request_reasoning.py index 14d61757..0cfd948c 100644 --- a/packages/napthaai/customs/prediction_request_reasoning/prediction_request_reasoning.py +++ b/packages/napthaai/customs/prediction_request_reasoning/prediction_request_reasoning.py @@ -681,114 +681,117 @@ def extract_question(prompt: str) -> str: def run(**kwargs) -> Tuple[str, Optional[str], Optional[Dict[str, Any]], Any]: """Run the task""" - with OpenAIClientManager(kwargs["api_keys"]["openai"]): - tool = kwargs["tool"] - prompt = extract_question(kwargs["prompt"]) - num_urls = kwargs.get("num_urls", DEFAULT_NUM_URLS[tool]) - counter_callback = kwargs.get("counter_callback", None) - api_keys = kwargs.get("api_keys", {}) - google_api_key = api_keys.get("google_api_key", None) - google_engine_id = api_keys.get("google_engine_id", None) - temperature = kwargs.get("temperature", DEFAULT_OPENAI_SETTINGS["temperature"]) - max_tokens = kwargs.get("max_tokens", DEFAULT_OPENAI_SETTINGS["max_tokens"]) - engine = kwargs.get("model", TOOL_TO_ENGINE[tool]) - print(f"ENGINE: {engine}") - if tool not in ALLOWED_TOOLS: - raise ValueError(f"Tool {tool} is not supported.") - - ( - additional_information, - queries, - counter_callback, - ) = fetch_additional_information( - client=client, - prompt=prompt, - engine=engine, - google_api_key=google_api_key, - google_engine_id=google_engine_id, - counter_callback=counter_callback, - source_links=kwargs.get("source_links", None), - num_urls=num_urls, - temperature=temperature, - max_tokens=max_tokens, - ) + try: + with OpenAIClientManager(kwargs["api_keys"]["openai"]): + tool = kwargs["tool"] + prompt = extract_question(kwargs["prompt"]) + num_urls = kwargs.get("num_urls", DEFAULT_NUM_URLS[tool]) + counter_callback = kwargs.get("counter_callback", None) + api_keys = kwargs.get("api_keys", {}) + google_api_key = api_keys.get("google_api_key", None) + google_engine_id = api_keys.get("google_engine_id", None) + temperature = kwargs.get("temperature", DEFAULT_OPENAI_SETTINGS["temperature"]) + max_tokens = kwargs.get("max_tokens", DEFAULT_OPENAI_SETTINGS["max_tokens"]) + engine = kwargs.get("model", TOOL_TO_ENGINE[tool]) + print(f"ENGINE: {engine}") + if tool not in ALLOWED_TOOLS: + raise ValueError(f"Tool {tool} is not supported.") + + ( + additional_information, + queries, + counter_callback, + ) = fetch_additional_information( + client=client, + prompt=prompt, + engine=engine, + google_api_key=google_api_key, + google_engine_id=google_engine_id, + counter_callback=counter_callback, + source_links=kwargs.get("source_links", None), + num_urls=num_urls, + temperature=temperature, + max_tokens=max_tokens, + ) - # Adjust the additional_information to fit within the token budget - adjusted_info = adjust_additional_information( - prompt=PREDICTION_PROMPT, - additional_information=additional_information, - model=engine, - ) + # Adjust the additional_information to fit within the token budget + adjusted_info = adjust_additional_information( + prompt=PREDICTION_PROMPT, + additional_information=additional_information, + model=engine, + ) - # Reasoning prompt - reasoning_prompt = REASONING_PROMPT.format( - user_prompt=prompt, formatted_docs=adjusted_info - ) + # Reasoning prompt + reasoning_prompt = REASONING_PROMPT.format( + user_prompt=prompt, formatted_docs=adjusted_info + ) - # Do reasoning - messages = [ - {"role": "system", "content": SYSTEM_PROMPT}, - { - "role": "user", - "content": reasoning_prompt, - }, - ] + # Do reasoning + messages = [ + {"role": "system", "content": SYSTEM_PROMPT}, + { + "role": "user", + "content": reasoning_prompt, + }, + ] - # Reasoning - response_reasoning = client.chat.completions.create( - model=engine, - messages=messages, - temperature=temperature, - max_tokens=max_tokens, - n=1, - timeout=150, - stop=None, - ) + # Reasoning + response_reasoning = client.chat.completions.create( + model=engine, + messages=messages, + temperature=temperature, + max_tokens=max_tokens, + n=1, + timeout=150, + stop=None, + ) - # Extract the reasoning - reasoning = response_reasoning.choices[0].message.content + # Extract the reasoning + reasoning = response_reasoning.choices[0].message.content - # Prediction prompt - prediction_prompt = PREDICTION_PROMPT.format( - user_prompt=prompt, reasoning=reasoning - ) + # Prediction prompt + prediction_prompt = PREDICTION_PROMPT.format( + user_prompt=prompt, reasoning=reasoning + ) - # Make the prediction - messages = [ - {"role": "system", "content": SYSTEM_PROMPT}, - { - "role": "user", - "content": prediction_prompt, - }, - ] + # Make the prediction + messages = [ + {"role": "system", "content": SYSTEM_PROMPT}, + { + "role": "user", + "content": prediction_prompt, + }, + ] - response = client.chat.completions.create( - model=engine, - messages=messages, - temperature=temperature, - max_tokens=max_tokens, - n=1, - timeout=150, - stop=None, - functions=[Results.openai_schema], - function_call={'name':'Results'} - ) - results = str(Results.from_response(response)) - - pairs = str(results).split() - result_dict = {} - for pair in pairs: - key, value = pair.split("=") - result_dict[key] = float(value) # Convert value to float - results = result_dict - results = json.dumps(results) - if counter_callback is not None: - counter_callback( - input_tokens=response_reasoning.usage.prompt_tokens - + response.usage.prompt_tokens, - output_tokens=response_reasoning.usage.completion_tokens - + response.usage.completion_tokens, + response = client.chat.completions.create( model=engine, - token_counter=count_tokens, + messages=messages, + temperature=temperature, + max_tokens=max_tokens, + n=1, + timeout=150, + stop=None, + functions=[Results.openai_schema], + function_call={'name':'Results'} ) - return results, reasoning_prompt + "////" + prediction_prompt, None, counter_callback + results = str(Results.from_response(response)) + + pairs = str(results).split() + result_dict = {} + for pair in pairs: + key, value = pair.split("=") + result_dict[key] = float(value) # Convert value to float + results = result_dict + results = json.dumps(results) + if counter_callback is not None: + counter_callback( + input_tokens=response_reasoning.usage.prompt_tokens + + response.usage.prompt_tokens, + output_tokens=response_reasoning.usage.completion_tokens + + response.usage.completion_tokens, + model=engine, + token_counter=count_tokens, + ) + return results, reasoning_prompt + "////" + prediction_prompt, None, counter_callback + except Exception as e: + return f"Invalid response. The following issue was encountered: {str(e)}", "", None, None \ No newline at end of file diff --git a/packages/nickcom007/customs/prediction_request_sme/component.yaml b/packages/nickcom007/customs/prediction_request_sme/component.yaml index 9b3ad3ea..7a3724bb 100644 --- a/packages/nickcom007/customs/prediction_request_sme/component.yaml +++ b/packages/nickcom007/customs/prediction_request_sme/component.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeibbn67pnrrm4qm3n3kbelvbs3v7fjlrjniywmw2vbizarippidtvi - prediction_request_sme.py: bafybeiesilq7jxjzwtvhrc4m3om5fpqqzimxtkf3s3hw7l2rmfna2uhjuy + prediction_request_sme.py: bafybeiahteuasjn632fvfqt4to772yreohzuorwlvqgrj4dqcfl662lnyi fingerprint_ignore_patterns: [] entry_point: prediction_request_sme.py callable: run diff --git a/packages/nickcom007/customs/prediction_request_sme/prediction_request_sme.py b/packages/nickcom007/customs/prediction_request_sme/prediction_request_sme.py index bbe5f03e..511cd57a 100644 --- a/packages/nickcom007/customs/prediction_request_sme/prediction_request_sme.py +++ b/packages/nickcom007/customs/prediction_request_sme/prediction_request_sme.py @@ -482,6 +482,7 @@ def run(**kwargs) -> Tuple[str, Optional[str], Optional[Dict[str, Any]], Any]: "Moderation flagged the prompt as in violation of terms.", prediction_prompt, None, + counter_callback, ) messages = [ {"role": "system", "content": sme_introduction}, diff --git a/packages/packages.json b/packages/packages.json index 81d6ee26..1a8185db 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -1,7 +1,7 @@ { "dev": { "custom/valory/native_transfer_request/0.1.0": "bafybeid22vi5xtavqhq5ir2kq6nakckm3tl72wcgftsq35ak3cboyn6eea", - "custom/valory/prediction_request_claude/0.1.0": "bafybeidmtovzewf3be6wzdsoozdyin2hvq2efw233arohv243f52jzapli", + "custom/valory/prediction_request_claude/0.1.0": "bafybeifbootge455l6jrz252zd63hxsikkdntroebv5r4lknuh2vbkpwzq", "custom/valory/openai_request/0.1.0": "bafybeigew6ukd53n3z352wmr5xu6or3id7nsqn7vb47bxs4pg4qtkmbdiu", "custom/valory/prediction_request_embedding/0.1.0": "bafybeifdhbbxmwf4q6pjhanubgrzhy7hetupyoekjyxvnubcccqxlkaqu4", "custom/valory/resolve_market/0.1.0": "bafybeiaag2e7rsdr3bwg6mlmfyom4vctsdapohco7z45pxhzjymepz3rya", @@ -11,11 +11,12 @@ "custom/jhehemann/prediction_sum_url_content/0.1.0": "bafybeibgyldsxjqh6wekmpftxo66xk2ufsltigfe76ccvxsmdu3ba3w2eu", "custom/psouranis/optimization_by_prompting/0.1.0": "bafybeieb6czcv7hwc5bsosyx67gmibt43q4uh6uozjnrfm5lic2mdtrcay", "custom/nickcom007/sme_generation_request/0.1.0": "bafybeieqlvcmdmybq7km6ycg3h7nzlnzlcizm3pjcra67rthtddxiqatd4", - "custom/nickcom007/prediction_request_sme/0.1.0": "bafybeiadh3pypp5uwvj7ghawmrxezm6wnfxok4y2dzmqo6jkkybcq7ky3m", + "custom/nickcom007/prediction_request_sme/0.1.0": "bafybeifmcbw7odtm46xjryzr4c575tfs3sgtb6bq25ywmut33chbz3gkqa", "custom/napthaai/resolve_market_reasoning/0.1.0": "bafybeigutlttyivlf6yxdeesclv3dwxq6h7yj3varq63b6ujno3q6ytoje", "custom/napthaai/prediction_request_rag/0.1.0": "bafybeibp3hfeywllhmepvqyah763go4i5vtvo4wwihy6h4x7sylsjm5cam", - "custom/napthaai/prediction_request_reasoning/0.1.0": "bafybeihrq7vvup2jztclucyrveb3nlgeb2pe5afgrxglgb7ji6b5jv5vtm", - "custom/valory/prepare_tx/0.1.0": "bafybeighlfdmykwbar6wuipeo66blv2vcckxyspvw2oscsjctowly5taf4", + "custom/napthaai/prediction_request_reasoning/0.1.0": "bafybeiexotxqt3o4mmbjr7gp74hhcsbfhvldlrcqbj573oliljqxeilh44", + "custom/valory/prepare_tx/0.1.0": "bafybeibxhhdpbdd3ma2jsu76egq56v2cjrx332fwjqbzgs6uvyqjqxcru4", + "custom/valory/short_maker/0.1.0": "bafybeif63rt4lkopu3rc3l7sg6tebrrwg2lxqufjx6dx4hoda5yzax43fa", "protocol/valory/acn_data_share/0.1.0": "bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq", "protocol/valory/websocket_client/0.1.0": "bafybeih43mnztdv3v2hetr2k3gezg7d3yj4ur7cxdvcyaqhg65e52s5sf4", "contract/valory/agent_mech/0.1.0": "bafybeidsau5x2vjofpcdzxkg7airwkrdag65ohtxcby2ut27tfjizgnrnm", @@ -23,13 +24,13 @@ "contract/valory/hash_checkpoint/0.1.0": "bafybeigv2bceirhy72yajxzibi4a5wrcfptfbkjbzzko6pqdq2f4dzr3xa", "connection/valory/websocket_client/0.1.0": "bafybeiflmystocxaqblhpzqlcop2vkhsknpzjx2jomohomaxamwskeokzm", "skill/valory/contract_subscription/0.1.0": "bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4", - "skill/valory/mech_abci/0.1.0": "bafybeihzip2inpeeygbqexpx4gcjwoiteqhytlmcu7funrfil4bhdgpb74", - "skill/valory/task_submission_abci/0.1.0": "bafybeiedymlwwaipot4za5bqp7wyu5izj2t3o5gwy3mzsbywtioapc75ni", - "skill/valory/task_execution/0.1.0": "bafybeihfusmz5vrtgsbveh3hvlgsrmrfyumcxulrnrcfmoraifwr3dzxhy", + "skill/valory/mech_abci/0.1.0": "bafybeiao3zhznxdey5b4azhyjyvr7dyczxcjqm3akbc3ma2r4edhd2gcdy", + "skill/valory/task_submission_abci/0.1.0": "bafybeicjy2saxrlg5ezeissbccb57mt3jfxmn3oli754hipm5mo4nra5ri", + "skill/valory/task_execution/0.1.0": "bafybeiapj6qhwzqrr7biebnwn2e2ugqsby2ml7z25fbhmdjnf3u4yp6bem", "skill/valory/websocket_client/0.1.0": "bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta", - "skill/valory/subscription_abci/0.1.0": "bafybeicsxdt3mv6idkn5gyaqljvgywgbo57zim6jlpip55fqqlr5rzhsxq", - "agent/valory/mech/0.1.0": "bafybeihotgdvdxsthgb3xb2bb4ac6dtjc5lnidzlpyt6bhzmmqtl255dsa", - "service/valory/mech/0.1.0": "bafybeidau7tk5hxagj4og4nflfm5prwdijegqdfxb6nmdqnimlp3f5rrze" + "skill/valory/subscription_abci/0.1.0": "bafybeihn6lbkxemurkiefbequprq5u5zzef77wleyjs7zzpf4aq3dtf4vm", + "agent/valory/mech/0.1.0": "bafybeifcb2o44phvd4o7de56qvfdkdrmxi4tq3jcp2dvf4pfkndwtuck6m", + "service/valory/mech/0.1.0": "bafybeihac7vg75uqizjzjqws7c4zgwi3y6lisgsztbmrwsbqu4ldydpb24" }, "third_party": { "protocol/valory/default/1.0.0": "bafybeifqcqy5hfbnd7fjv4mqdjrtujh2vx3p2xhe33y67zoxa6ph7wdpaq", @@ -41,21 +42,21 @@ "protocol/valory/acn/1.1.0": "bafybeidluaoeakae3exseupaea4i3yvvk5vivyt227xshjlffywwxzcxqe", "protocol/valory/ipfs/0.1.0": "bafybeiftxi2qhreewgsc5wevogi7yc5g6hbcbo4uiuaibauhv3nhfcdtvm", "protocol/valory/tendermint/0.1.0": "bafybeig4mi3vmlv5zpbjbfuzcgida6j5f2nhrpedxicmrrfjweqc5r7cra", - "contract/valory/service_registry/0.1.0": "bafybeiby5x4wfdywlenmoudbykdxohpq2nifqxfep5niqgxrjyrekyahzy", - "contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeie6ynnoavvk2fpbn426nlp32sxrj7pz5esgebtlezy4tmx5gjretm", - "contract/valory/gnosis_safe/0.1.0": "bafybeictjc7saviboxbsdcey3trvokrgo7uoh76mcrxecxhlvcrp47aqg4", + "contract/valory/service_registry/0.1.0": "bafybeicbxmbzt757lbmyh6762lrkcrp3oeum6dk3z7pvosixasifsk6xlm", + "contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeib6podeifufgmawvicm3xyz3uaplbcrsptjzz4unpseh7qtcpar74", + "contract/valory/gnosis_safe/0.1.0": "bafybeibq77mgzhyb23blf2eqmia3kc6io5karedfzhntvpcebeqdzrgyqa", "contract/valory/multisend/0.1.0": "bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y", "connection/valory/http_client/0.23.0": "bafybeih5vzo22p2umhqo52nzluaanxx7kejvvpcpdsrdymckkyvmsim6gm", - "connection/valory/abci/0.1.0": "bafybeifbnhe4f2bll3a5o3hqji3dqx4soov7hr266rdz5vunxgzo5hggbq", - "connection/valory/ipfs/0.1.0": "bafybeiflaxrnepfn4hcnq5pieuc7ki7d422y3iqb54lv4tpgs7oywnuhhq", + "connection/valory/abci/0.1.0": "bafybeiclexb6cnsog5yjz2qtvqyfnf7x5m7tpp56hblhk3pbocbvgjzhze", + "connection/valory/ipfs/0.1.0": "bafybeihndk6hohj3yncgrye5pw7b7w2kztj3avby5u5mfk2fpjh7hqphii", "connection/valory/ledger/0.19.0": "bafybeic3ft7l7ca3qgnderm4xupsfmyoihgi27ukotnz7b5hdczla2enya", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e", "connection/valory/http_server/0.22.0": "bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m", - "skill/valory/transaction_settlement_abci/0.1.0": "bafybeid57tozt5f3kgzmu22nbr3c3oy4p7bi2bu66rqsgnlylq6xgh2ixe", - "skill/valory/termination_abci/0.1.0": "bafybeie6h7j4hyhgj2wte64n3xyudxq4pgqcqjmslxi5tff4mb6vce2tay", - "skill/valory/abstract_round_abci/0.1.0": "bafybeigjrepaqpb3m7zunmt4hryos4vto4yyj3u6iyofdb2fotwho3bqvm", - "skill/valory/reset_pause_abci/0.1.0": "bafybeicm7onl72rfnn33pbvzwjpkl5gafeieyobfcnyresxz7kunjwmqea", - "skill/valory/registration_abci/0.1.0": "bafybeif3ln6eg53ebrfe6uicjew4uqp2ynyrcxkw5wi4jm3ixqv3ykte4a", - "skill/valory/abstract_abci/0.1.0": "bafybeihljirk3d4rgvmx2nmz3p2mp27iwh2o5euce5gccwjwrpawyjzuaq" + "skill/valory/transaction_settlement_abci/0.1.0": "bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom", + "skill/valory/termination_abci/0.1.0": "bafybeiejcthb2uvpjxgon5wxdzua3tm6ud66nrbrctzocwmbjuwwwx2rg4", + "skill/valory/abstract_round_abci/0.1.0": "bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai", + "skill/valory/reset_pause_abci/0.1.0": "bafybeiatxhn6r7wd35frh4h4i4twkpk5kkadbbnfgwnz6vampsspt5yy2i", + "skill/valory/registration_abci/0.1.0": "bafybeigpv56crn7hz6cqpicou7ulpz3by5uphcy6vm2rkqe5gkwuybcpe4", + "skill/valory/abstract_abci/0.1.0": "bafybeihat4giyc4bz6zopvahcj4iw53356pbtwfn7p4d5yflwly2qhahum" } } \ No newline at end of file diff --git a/packages/valory/agents/mech/aea-config.yaml b/packages/valory/agents/mech/aea-config.yaml index f2dfa58b..9fbc28b8 100644 --- a/packages/valory/agents/mech/aea-config.yaml +++ b/packages/valory/agents/mech/aea-config.yaml @@ -7,21 +7,21 @@ aea_version: '>=1.37.0, <2.0.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- valory/abci:0.1.0:bafybeifbnhe4f2bll3a5o3hqji3dqx4soov7hr266rdz5vunxgzo5hggbq +- valory/abci:0.1.0:bafybeiclexb6cnsog5yjz2qtvqyfnf7x5m7tpp56hblhk3pbocbvgjzhze - valory/http_client:0.23.0:bafybeih5vzo22p2umhqo52nzluaanxx7kejvvpcpdsrdymckkyvmsim6gm - valory/http_server:0.22.0:bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m -- valory/ipfs:0.1.0:bafybeiflaxrnepfn4hcnq5pieuc7ki7d422y3iqb54lv4tpgs7oywnuhhq +- valory/ipfs:0.1.0:bafybeihndk6hohj3yncgrye5pw7b7w2kztj3avby5u5mfk2fpjh7hqphii - valory/ledger:0.19.0:bafybeic3ft7l7ca3qgnderm4xupsfmyoihgi27ukotnz7b5hdczla2enya - valory/p2p_libp2p_client:0.1.0:bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e - valory/websocket_client:0.1.0:bafybeiflmystocxaqblhpzqlcop2vkhsknpzjx2jomohomaxamwskeokzm contracts: - valory/agent_mech:0.1.0:bafybeidsau5x2vjofpcdzxkg7airwkrdag65ohtxcby2ut27tfjizgnrnm - valory/agent_registry:0.1.0:bafybeiargayav6yiztdnwzejoejstcx4idssch2h4f5arlgtzj3tgsgfmu -- valory/gnosis_safe:0.1.0:bafybeictjc7saviboxbsdcey3trvokrgo7uoh76mcrxecxhlvcrp47aqg4 -- valory/gnosis_safe_proxy_factory:0.1.0:bafybeie6ynnoavvk2fpbn426nlp32sxrj7pz5esgebtlezy4tmx5gjretm +- valory/gnosis_safe:0.1.0:bafybeibq77mgzhyb23blf2eqmia3kc6io5karedfzhntvpcebeqdzrgyqa +- valory/gnosis_safe_proxy_factory:0.1.0:bafybeib6podeifufgmawvicm3xyz3uaplbcrsptjzz4unpseh7qtcpar74 - valory/hash_checkpoint:0.1.0:bafybeigv2bceirhy72yajxzibi4a5wrcfptfbkjbzzko6pqdq2f4dzr3xa - valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y -- valory/service_registry:0.1.0:bafybeiby5x4wfdywlenmoudbykdxohpq2nifqxfep5niqgxrjyrekyahzy +- valory/service_registry:0.1.0:bafybeicbxmbzt757lbmyh6762lrkcrp3oeum6dk3z7pvosixasifsk6xlm protocols: - open_aea/signing:1.0.0:bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi - valory/abci:0.1.0:bafybeiaqmp7kocbfdboksayeqhkbrynvlfzsx4uy4x6nohywnmaig4an7u @@ -35,17 +35,17 @@ protocols: - valory/tendermint:0.1.0:bafybeig4mi3vmlv5zpbjbfuzcgida6j5f2nhrpedxicmrrfjweqc5r7cra - valory/websocket_client:0.1.0:bafybeih43mnztdv3v2hetr2k3gezg7d3yj4ur7cxdvcyaqhg65e52s5sf4 skills: -- valory/abstract_abci:0.1.0:bafybeihljirk3d4rgvmx2nmz3p2mp27iwh2o5euce5gccwjwrpawyjzuaq -- valory/abstract_round_abci:0.1.0:bafybeigjrepaqpb3m7zunmt4hryos4vto4yyj3u6iyofdb2fotwho3bqvm +- valory/abstract_abci:0.1.0:bafybeihat4giyc4bz6zopvahcj4iw53356pbtwfn7p4d5yflwly2qhahum +- valory/abstract_round_abci:0.1.0:bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai - valory/contract_subscription:0.1.0:bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4 -- valory/mech_abci:0.1.0:bafybeihzip2inpeeygbqexpx4gcjwoiteqhytlmcu7funrfil4bhdgpb74 -- valory/registration_abci:0.1.0:bafybeif3ln6eg53ebrfe6uicjew4uqp2ynyrcxkw5wi4jm3ixqv3ykte4a -- valory/reset_pause_abci:0.1.0:bafybeicm7onl72rfnn33pbvzwjpkl5gafeieyobfcnyresxz7kunjwmqea -- valory/subscription_abci:0.1.0:bafybeicsxdt3mv6idkn5gyaqljvgywgbo57zim6jlpip55fqqlr5rzhsxq -- valory/task_execution:0.1.0:bafybeihfusmz5vrtgsbveh3hvlgsrmrfyumcxulrnrcfmoraifwr3dzxhy -- valory/task_submission_abci:0.1.0:bafybeiedymlwwaipot4za5bqp7wyu5izj2t3o5gwy3mzsbywtioapc75ni -- valory/termination_abci:0.1.0:bafybeie6h7j4hyhgj2wte64n3xyudxq4pgqcqjmslxi5tff4mb6vce2tay -- valory/transaction_settlement_abci:0.1.0:bafybeid57tozt5f3kgzmu22nbr3c3oy4p7bi2bu66rqsgnlylq6xgh2ixe +- valory/mech_abci:0.1.0:bafybeiao3zhznxdey5b4azhyjyvr7dyczxcjqm3akbc3ma2r4edhd2gcdy +- valory/registration_abci:0.1.0:bafybeigpv56crn7hz6cqpicou7ulpz3by5uphcy6vm2rkqe5gkwuybcpe4 +- valory/reset_pause_abci:0.1.0:bafybeiatxhn6r7wd35frh4h4i4twkpk5kkadbbnfgwnz6vampsspt5yy2i +- valory/subscription_abci:0.1.0:bafybeihn6lbkxemurkiefbequprq5u5zzef77wleyjs7zzpf4aq3dtf4vm +- valory/task_execution:0.1.0:bafybeiapj6qhwzqrr7biebnwn2e2ugqsby2ml7z25fbhmdjnf3u4yp6bem +- valory/task_submission_abci:0.1.0:bafybeicjy2saxrlg5ezeissbccb57mt3jfxmn3oli754hipm5mo4nra5ri +- valory/termination_abci:0.1.0:bafybeiejcthb2uvpjxgon5wxdzua3tm6ud66nrbrctzocwmbjuwwwx2rg4 +- valory/transaction_settlement_abci:0.1.0:bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom - valory/websocket_client:0.1.0:bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta default_ledger: ethereum required_ledgers: @@ -80,7 +80,7 @@ dependencies: aiohttp: version: <4.0.0,>=3.8.5 anthropic: - version: ==0.3.11 + version: ==0.21.3 beautifulsoup4: version: ==4.12.2 google-api-python-client: @@ -105,6 +105,8 @@ dependencies: version: ==0.5.1 readability-lxml: version: ==0.8.1 + lxml: + version: ==5.1.0 docstring-parser: version: ==0.15 faiss-cpu: @@ -117,6 +119,10 @@ dependencies: version: ==0.4.13 markdownify: version: ==0.11.6 + moviepy: + version: ==1.0.3 + replicate: + version: ==0.15.7 default_connection: null --- public_id: valory/websocket_client:0.1.0:bafybeiexove4oqyhoae5xmk2hilskthosov5imdp65olpgj3cfrepbouyy diff --git a/packages/valory/customs/prediction_request_claude/component.yaml b/packages/valory/customs/prediction_request_claude/component.yaml index beef306f..7b46487e 100644 --- a/packages/valory/customs/prediction_request_claude/component.yaml +++ b/packages/valory/customs/prediction_request_claude/component.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeibbn67pnrrm4qm3n3kbelvbs3v7fjlrjniywmw2vbizarippidtvi - prediction_request_claude.py: bafybeihwoeu7vhwqibzif46mtgw4jgbiphp3qfo3da4aeqe4nnbrzs3bqu + prediction_request_claude.py: bafybeielszpjlapsn33tpmvmy24gygsa2mhyopd4ywoouycd7mhldwr53q fingerprint_ignore_patterns: [] entry_point: prediction_request_claude.py callable: run diff --git a/packages/valory/customs/prediction_request_claude/prediction_request_claude.py b/packages/valory/customs/prediction_request_claude/prediction_request_claude.py index 6e76050d..369151c5 100644 --- a/packages/valory/customs/prediction_request_claude/prediction_request_claude.py +++ b/packages/valory/customs/prediction_request_claude/prediction_request_claude.py @@ -177,10 +177,10 @@ def extract_text( if num_words: return " ".join(text.split()[:num_words]) - + # remove newlines and extra spaces text = " ".join(text.split()) - + return text @@ -247,7 +247,14 @@ def fetch_additional_information( prompt=url_query_prompt, stop_sequences=STOP_SEQUENCES, ) - json_data = json.loads(completion.completion) + try: + json_data = json.loads(completion.completion) + except json.JSONDecodeError: + json_data = {} + + if "queries" not in json_data: + json_data["queries"] = [prompt] + if not source_links: urls = get_urls_from_queries( json_data["queries"], @@ -280,52 +287,55 @@ def fetch_additional_information( def run(**kwargs) -> Tuple[str, Optional[str], Optional[Dict[str, Any]], Any]: """Run the task""" - tool = kwargs["tool"] - prompt = kwargs["prompt"] - anthropic = Anthropic(api_key=kwargs["api_keys"]["anthropic"]) - num_urls = kwargs.get("num_urls", NUM_URLS_EXTRACT) - num_words = kwargs.get("num_words", DEFAULT_NUM_WORDS) - counter_callback = kwargs.get("counter_callback", None) - api_keys = kwargs.get("api_keys", {}) - google_api_key = api_keys.get("google_api_key", None) - google_engine_id = api_keys.get("google_engine_id", None) - - if tool not in ALLOWED_TOOLS: - raise ValueError(f"Tool {tool} is not supported.") - - engine = TOOL_TO_ENGINE[tool] - - if tool == "claude-prediction-online": - additional_information, counter_callback = fetch_additional_information( - prompt=prompt, - engine=engine, - anthropic=anthropic, - google_api_key=google_api_key, - google_engine=google_engine_id, - num_urls=num_urls, - num_words=num_words, - counter_callback=counter_callback, - source_links=kwargs.get("source_links", None), + try: + tool = kwargs["tool"] + prompt = kwargs["prompt"] + anthropic = Anthropic(api_key=kwargs["api_keys"]["anthropic"]) + num_urls = kwargs.get("num_urls", NUM_URLS_EXTRACT) + num_words = kwargs.get("num_words", DEFAULT_NUM_WORDS) + counter_callback = kwargs.get("counter_callback", None) + api_keys = kwargs.get("api_keys", {}) + google_api_key = api_keys.get("google_api_key", None) + google_engine_id = api_keys.get("google_engine_id", None) + + if tool not in ALLOWED_TOOLS: + raise ValueError(f"Tool {tool} is not supported.") + + engine = TOOL_TO_ENGINE[tool] + + if tool == "claude-prediction-online": + additional_information, counter_callback = fetch_additional_information( + prompt=prompt, + engine=engine, + anthropic=anthropic, + google_api_key=google_api_key, + google_engine=google_engine_id, + num_urls=num_urls, + num_words=num_words, + counter_callback=counter_callback, + source_links=kwargs.get("source_links", None), + ) + else: + additional_information = "" + prediction_prompt = PREDICTION_PROMPT.format( + user_prompt=prompt, additional_information=additional_information ) - else: - additional_information = "" - prediction_prompt = PREDICTION_PROMPT.format( - user_prompt=prompt, additional_information=additional_information - ) - prediction_prompt = f"{HUMAN_PROMPT}{prediction_prompt}{AI_PROMPT}{ASSISTANT_TEXT}" + prediction_prompt = f"{HUMAN_PROMPT}{prediction_prompt}{AI_PROMPT}{ASSISTANT_TEXT}" - completion = anthropic.completions.create( - model=engine, - max_tokens_to_sample=300, - prompt=prediction_prompt, - stop_sequences=STOP_SEQUENCES, - ) - if counter_callback is not None: - counter_callback( + completion = anthropic.completions.create( model=engine, - input_prompt=prediction_prompt, - output_prompt=completion.completion, - token_counter=count_tokens, + max_tokens_to_sample=300, + prompt=prediction_prompt, + stop_sequences=STOP_SEQUENCES, ) - - return completion.completion, prediction_prompt, None, counter_callback + if counter_callback is not None: + counter_callback( + model=engine, + input_prompt=prediction_prompt, + output_prompt=completion.completion, + token_counter=count_tokens, + ) + + return completion.completion, prediction_prompt, None, counter_callback + except Exception as e: + return f"Invalid response. The following issue was encountered: {str(e)}", "", None, None diff --git a/packages/valory/customs/prepare_tx/component.yaml b/packages/valory/customs/prepare_tx/component.yaml index 18daab42..8f0fc550 100644 --- a/packages/valory/customs/prepare_tx/component.yaml +++ b/packages/valory/customs/prepare_tx/component.yaml @@ -7,8 +7,10 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeieynbsr6aijx2totfi5iw6thjwgzko526zcs5plgvgrq2lufso2sy - prepare_tx.py: bafybeichg7r54hcaqvrxecpzssm7iqrc5kjli33m6hqlnsrojqng7jqvsa + prepare_tx.py: bafybeid6t7rorf54bri436tncd6tnijp2v3wai4ebyehlj3v7bsmdrnx2u fingerprint_ignore_patterns: [] entry_point: prepare_tx.py callable: run -dependencies: {} +dependencies: + openai: + version: ==1.11.0 diff --git a/packages/valory/customs/prepare_tx/prepare_tx.py b/packages/valory/customs/prepare_tx/prepare_tx.py index 62f72132..0892ad2c 100644 --- a/packages/valory/customs/prepare_tx/prepare_tx.py +++ b/packages/valory/customs/prepare_tx/prepare_tx.py @@ -21,31 +21,109 @@ This module implements a tool which prepares a transaction for the transaction settlement skill. Please note that the gnosis safe parameters are missing from the payload, e.g., `safe_tx_hash`, `safe_tx_gas`, etc. """ - import json + +from openai import OpenAI from typing import Any, Dict, Optional, Tuple +import ast + +ENGINE = "gpt-3.5-turbo" +MAX_TOKENS = 500 +TEMPERATURE = 0.7 +TOOL_PREFIX = "transfer-" + + +"""NOTE: In the case of native token transfers on evm chains we do not need any contract address or ABI. The only unknowns are the "recipient address" and the "value" to send for evm native transfers.""" + +NATIVE_TRANSFER_PROMPT = """You are an LLM inside a multi-agent system that takes in a prompt from a user requesting you to execute a native gas token (ETH) transfer to another public address on Ethereum. +The agent process you are sending your response to requires the unknown transaction parameters in the exact format below, written by you in your response as an input to sign/execute the transaction in the +agent process.The agent does not know the receiving address, “recipient_address", the value to send, “value”, or the denomination of the "value" given in wei "wei_value" which is converted by you without +use of any functions, the user prompt indicates to send. The unknown transaction parameters not known beforehand must be constructed by you from the user's prompt information. + +User Prompt: {user_prompt} + +only respond with the format below using curly brackets to encapsulate the variables within a json dictionary object and no other text: + +"to": recipient_address, +"value": value, +"wei_value": wei_value + +Do not respond with anything else other than the transaction object you constructed with the correct known variables the agent had before the request and the correct unknown values found in the user request prompt as input to the web3.py signing method. +""" + +client: Optional[OpenAI] = None +class OpenAIClientManager: + """Client context manager for OpenAI.""" + def __init__(self, api_key: str): + self.api_key = api_key -# a test value -VALUE = 1 -# a test address -TO_ADDRESS = "0xFDECa8497223DFa5aE2200D759f769e95dAadE01" + def __enter__(self) -> OpenAI: + global client + if client is None: + client = OpenAI(api_key=self.api_key) + return client + def __exit__(self, exc_type, exc_value, traceback) -> None: + global client + if client is not None: + client.close() + client = None -def prepare_tx( + +def make_request_openai_request( prompt: str, -) -> Tuple[Optional[str], Any, Optional[Dict[str, Any]], Any]: - """Perform native transfer.""" - transaction = json.dumps( - { - "value": VALUE, - "to_address": TO_ADDRESS, - } + engine: str = ENGINE, + max_tokens: Optional[int] = None, + temperature: Optional[float] = None, +) -> str: + """Make openai request.""" + max_tokens = max_tokens or MAX_TOKENS + temperature = temperature or TEMPERATURE + moderation_result = client.moderations.create(input=prompt) + if moderation_result.results[0].flagged: + return "Moderation flagged the prompt as in violation of terms." + + messages = [ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": prompt}, + ] + response = client.chat.completions.create( + model=engine, + messages=messages, + temperature=temperature, + max_tokens=max_tokens, + n=1, + timeout=120, + stop=None, ) - return transaction, prompt, None, None + return response.choices[0].message.content -AVAILABLE_TOOLS = {"prepare_tx": prepare_tx} +def native_transfer( + prompt: str, +) -> Tuple[str, Optional[str], Optional[Dict[str, Any]], Any]: + """Perform native transfer.""" + tool_prompt = NATIVE_TRANSFER_PROMPT.format(user_prompt=prompt) + response = make_request_openai_request(prompt=tool_prompt) + + try: + # parse the response to get the transaction object string itself + parsed_txs = ast.literal_eval(response) + except SyntaxError: + return response, None, None, None + + # build the transaction object, unknowns are referenced from parsed_txs + transaction = { + "to": str(parsed_txs["to"]), + "value": int(parsed_txs["wei_value"]), + } + return json.dumps(transaction), prompt, None, None + + +AVAILABLE_TOOLS = { + "native_transfer": native_transfer, +} def error_response(msg: str) -> Tuple[str, None, None, None]: @@ -56,6 +134,7 @@ def error_response(msg: str) -> Tuple[str, None, None, None]: def run(**kwargs) -> Tuple[str, Optional[str], Optional[Dict[str, Any]], Any]: """Run the task""" tool = kwargs.get("tool", None) + if tool is None: return error_response("No tool has been specified.") @@ -69,4 +148,9 @@ def run(**kwargs) -> Tuple[str, Optional[str], Optional[Dict[str, Any]], Any]: f"Tool {tool!r} is not in supported tools: {tuple(AVAILABLE_TOOLS.keys())}." ) - return transaction_builder(prompt) + api_key = kwargs.get("api_keys", {}).get("openai", None) + if api_key is None: + return error_response("No api key has been given.") + + with OpenAIClientManager(api_key): + return transaction_builder(prompt) diff --git a/packages/valory/customs/short_maker/__init__.py b/packages/valory/customs/short_maker/__init__.py new file mode 100644 index 00000000..af7fd1b4 --- /dev/null +++ b/packages/valory/customs/short_maker/__init__.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023-2024 Valory AG +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ------------------------------------------------------------------------------ +"""This module contains the implementation of the short_maker tool.""" \ No newline at end of file diff --git a/packages/valory/customs/short_maker/component.yaml b/packages/valory/customs/short_maker/component.yaml new file mode 100644 index 00000000..405ab64a --- /dev/null +++ b/packages/valory/customs/short_maker/component.yaml @@ -0,0 +1,14 @@ +name: short_maker +author: valory +version: 0.1.0 +type: custom +description: A tool to generate short videos from prompts. +license: Apache-2.0 +aea_version: '>=1.0.0, <2.0.0' +fingerprint: + __init__.py: bafybeidfwhwsyo4ffxse2oo5vi26rcyisgdwip5id2z5qzxrmxc7arzvb4 + short_maker.py: bafybeihrmouw6nnsogzcclip7qmbme42sly2fu5uvuudfkfuc4yia6rvva +fingerprint_ignore_patterns: [] +entry_point: short_maker.py +callable: run +dependencies: {} diff --git a/packages/valory/services/mech/service.yaml b/packages/valory/services/mech/service.yaml index f8f8a559..1390f0db 100644 --- a/packages/valory/services/mech/service.yaml +++ b/packages/valory/services/mech/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeif7ia4jdlazy6745ke2k2x5yoqlwsgwr6sbztbgqtwvs3ndm2p7ba fingerprint_ignore_patterns: [] -agent: valory/mech:0.1.0:bafybeihotgdvdxsthgb3xb2bb4ac6dtjc5lnidzlpyt6bhzmmqtl255dsa +agent: valory/mech:0.1.0:bafybeifcb2o44phvd4o7de56qvfdkdrmxi4tq3jcp2dvf4pfkndwtuck6m number_of_agents: 4 deployment: agent: diff --git a/packages/valory/skills/mech_abci/skill.yaml b/packages/valory/skills/mech_abci/skill.yaml index 7cc870da..5de23adc 100644 --- a/packages/valory/skills/mech_abci/skill.yaml +++ b/packages/valory/skills/mech_abci/skill.yaml @@ -20,13 +20,13 @@ contracts: [] protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: -- valory/abstract_round_abci:0.1.0:bafybeigjrepaqpb3m7zunmt4hryos4vto4yyj3u6iyofdb2fotwho3bqvm -- valory/registration_abci:0.1.0:bafybeif3ln6eg53ebrfe6uicjew4uqp2ynyrcxkw5wi4jm3ixqv3ykte4a -- valory/reset_pause_abci:0.1.0:bafybeicm7onl72rfnn33pbvzwjpkl5gafeieyobfcnyresxz7kunjwmqea -- valory/task_submission_abci:0.1.0:bafybeiedymlwwaipot4za5bqp7wyu5izj2t3o5gwy3mzsbywtioapc75ni -- valory/termination_abci:0.1.0:bafybeie6h7j4hyhgj2wte64n3xyudxq4pgqcqjmslxi5tff4mb6vce2tay -- valory/transaction_settlement_abci:0.1.0:bafybeid57tozt5f3kgzmu22nbr3c3oy4p7bi2bu66rqsgnlylq6xgh2ixe -- valory/subscription_abci:0.1.0:bafybeicsxdt3mv6idkn5gyaqljvgywgbo57zim6jlpip55fqqlr5rzhsxq +- valory/abstract_round_abci:0.1.0:bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai +- valory/registration_abci:0.1.0:bafybeigpv56crn7hz6cqpicou7ulpz3by5uphcy6vm2rkqe5gkwuybcpe4 +- valory/reset_pause_abci:0.1.0:bafybeiatxhn6r7wd35frh4h4i4twkpk5kkadbbnfgwnz6vampsspt5yy2i +- valory/task_submission_abci:0.1.0:bafybeicjy2saxrlg5ezeissbccb57mt3jfxmn3oli754hipm5mo4nra5ri +- valory/termination_abci:0.1.0:bafybeiejcthb2uvpjxgon5wxdzua3tm6ud66nrbrctzocwmbjuwwwx2rg4 +- valory/transaction_settlement_abci:0.1.0:bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom +- valory/subscription_abci:0.1.0:bafybeihn6lbkxemurkiefbequprq5u5zzef77wleyjs7zzpf4aq3dtf4vm behaviours: main: args: {} @@ -133,7 +133,7 @@ models: gas_price: null max_fee_per_gas: null max_priority_fee_per_gas: null - reset_tendermint_after: 10 + reset_tendermint_after: 100 retry_attempts: 400 retry_timeout: 3 round_timeout_seconds: 30.0 diff --git a/packages/valory/skills/subscription_abci/skill.yaml b/packages/valory/skills/subscription_abci/skill.yaml index e52d9a45..10633787 100644 --- a/packages/valory/skills/subscription_abci/skill.yaml +++ b/packages/valory/skills/subscription_abci/skill.yaml @@ -19,14 +19,14 @@ fingerprint_ignore_patterns: [] connections: [] contracts: - valory/agent_mech:0.1.0:bafybeidsau5x2vjofpcdzxkg7airwkrdag65ohtxcby2ut27tfjizgnrnm -- valory/gnosis_safe:0.1.0:bafybeictjc7saviboxbsdcey3trvokrgo7uoh76mcrxecxhlvcrp47aqg4 +- valory/gnosis_safe:0.1.0:bafybeibq77mgzhyb23blf2eqmia3kc6io5karedfzhntvpcebeqdzrgyqa - valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y protocols: - valory/acn_data_share:0.1.0:bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq - valory/contract_api:1.0.0:bafybeidgu7o5llh26xp3u3ebq3yluull5lupiyeu6iooi2xyymdrgnzq5i skills: -- valory/abstract_round_abci:0.1.0:bafybeigjrepaqpb3m7zunmt4hryos4vto4yyj3u6iyofdb2fotwho3bqvm -- valory/transaction_settlement_abci:0.1.0:bafybeid57tozt5f3kgzmu22nbr3c3oy4p7bi2bu66rqsgnlylq6xgh2ixe +- valory/abstract_round_abci:0.1.0:bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai +- valory/transaction_settlement_abci:0.1.0:bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom behaviours: main: args: {} diff --git a/packages/valory/skills/task_execution/behaviours.py b/packages/valory/skills/task_execution/behaviours.py index 1bc3ba0d..9e510739 100644 --- a/packages/valory/skills/task_execution/behaviours.py +++ b/packages/valory/skills/task_execution/behaviours.py @@ -396,6 +396,7 @@ def _prepare_task(self, task_data: Dict[str, Any]) -> None: executing_task = cast(Dict[str, Any], self._executing_task) executing_task["timeout_deadline"] = time.time() + self.params.task_deadline executing_task["tool"] = task_data["tool"] + executing_task["model"] = task_data.get("model", None) self._async_result = cast(Optional[Future], future) def _build_ipfs_message( diff --git a/packages/valory/skills/task_execution/skill.yaml b/packages/valory/skills/task_execution/skill.yaml index 89c74565..535275f5 100644 --- a/packages/valory/skills/task_execution/skill.yaml +++ b/packages/valory/skills/task_execution/skill.yaml @@ -7,19 +7,19 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeidqhvvlnthkbnmrdkdeyjyx2f2ab6z4xdgmagh7welqnh2v6wczx4 - behaviours.py: bafybeifkhzdmlrpfy7mixr4mvd2pk22xa3bx733c6xiukcckepkqp6x36q + behaviours.py: bafybeibspx4pipgcy4jqum4mse74hc5b4bfmushhiijxtbr3etw6bpx5pe dialogues.py: bafybeid4zxalqdlo5mw4yfbuf34hx4jp5ay5z6chm4zviwu4cj7fudtwca handlers.py: bafybeidbt5ezj74cgfogk3w4uw4si2grlnk5g54veyumw7g5yh6gdscywu models.py: bafybeid6befxrrbiaw7nduz4zgbm5nfc246fn2eb6rfmja6v5hmq4wtcwe utils/__init__.py: bafybeiccdijaigu6e5p2iruwo5mkk224o7ywedc7nr6xeu5fpmhjqgk24e - utils/benchmarks.py: bafybeicrk2mi22oss4gdt34bvn66lts3l2oic7pprtzhqu5npyxdf5s4g4 + utils/benchmarks.py: bafybeibhu3iq7zaw7ruzirglehyszcekiogfc7pzzmgjorhakjvbbvu7qi utils/cost_calculation.py: bafybeighafxied73w3mcmgziwfp3u2x6t4qlztw4kyekyq2ddgyhdge74q utils/ipfs.py: bafybeic7cbuv3tomi2xv7h2qowrqnpoufpanngzlgzljl4ptimpss3meqm utils/task.py: bafybeicb6nqd475ul6mz4hcexpva33ivkn4fygicgmlb4clu5cuzr34diy fingerprint_ignore_patterns: [] connections: - valory/ledger:0.19.0:bafybeic3ft7l7ca3qgnderm4xupsfmyoihgi27ukotnz7b5hdczla2enya -- valory/ipfs:0.1.0:bafybeiflaxrnepfn4hcnq5pieuc7ki7d422y3iqb54lv4tpgs7oywnuhhq +- valory/ipfs:0.1.0:bafybeihndk6hohj3yncgrye5pw7b7w2kztj3avby5u5mfk2fpjh7hqphii - valory/p2p_libp2p_client:0.1.0:bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e contracts: - valory/agent_mech:0.1.0:bafybeidsau5x2vjofpcdzxkg7airwkrdag65ohtxcby2ut27tfjizgnrnm diff --git a/packages/valory/skills/task_execution/utils/benchmarks.py b/packages/valory/skills/task_execution/utils/benchmarks.py index 224a0381..0dcd601c 100644 --- a/packages/valory/skills/task_execution/utils/benchmarks.py +++ b/packages/valory/skills/task_execution/utils/benchmarks.py @@ -37,6 +37,9 @@ class TokenCounterCallback: "gpt-4-0125-preview": {"input": 0.01, "output": 0.03}, "gpt-4-1106-preview": {"input": 0.01, "output": 0.03}, "claude-2": {"input": 0.008, "output": 0.024}, + "claude-3-haiku-20240307": {"input": 0.00025, "output": 0.00125}, + "claude-3-sonnet-20240229": {"input": 0.003, "output": 0.015}, + "claude-3-opus-20240229": {"input": 0.015, "output": 0.075}, } def __init__(self) -> None: diff --git a/packages/valory/skills/task_submission_abci/behaviours.py b/packages/valory/skills/task_submission_abci/behaviours.py index 409956cc..18dfa9ff 100644 --- a/packages/valory/skills/task_submission_abci/behaviours.py +++ b/packages/valory/skills/task_submission_abci/behaviours.py @@ -771,12 +771,11 @@ def get_payload_content(self) -> Generator[None, None, str]: all_txs.append(response_tx) update_usage_tx = yield from self.get_update_usage_tx() - if update_usage_tx is None: + if update_usage_tx is not None: # something went wrong, respond with ERROR payload for now # in case we cannot update the usage, we should not proceed with the rest of the txs - return TransactionPreparationRound.ERROR_PAYLOAD + all_txs.append(update_usage_tx) - all_txs.append(update_usage_tx) multisend_tx_str = yield from self._to_multisend(all_txs) if multisend_tx_str is None: # something went wrong, respond with ERROR payload for now diff --git a/packages/valory/skills/task_submission_abci/skill.yaml b/packages/valory/skills/task_submission_abci/skill.yaml index 01c3a167..70ff9768 100644 --- a/packages/valory/skills/task_submission_abci/skill.yaml +++ b/packages/valory/skills/task_submission_abci/skill.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeiholqak7ltw6bbmn2c5tn3j7xgzkdlfzp3kcskiqsvmxoih6m4muq - behaviours.py: bafybeifirwywbj433tyu45hhkuftlbxjg4hc7qsgtl3hppah77kcl7keye + behaviours.py: bafybeich2utoa25eyxhiv732pkzm3ol7dxi2qdeppzr7bc734jvfhfae4y dialogues.py: bafybeibmac3m5u5h6ucoyjr4dazay72dyga656wvjl6z6saapluvjo54ne fsm_specification.yaml: bafybeidtmsmpunr3t77pshd3k2s6dd6hlvhze6inu3gj7xyvlg4wi3tnuu handlers.py: bafybeibe5n7my2vd2wlwo73sbma65epjqc7kxgtittewlylcmvnmoxtxzq @@ -21,17 +21,17 @@ connections: [] contracts: - valory/agent_mech:0.1.0:bafybeidsau5x2vjofpcdzxkg7airwkrdag65ohtxcby2ut27tfjizgnrnm - valory/agent_registry:0.1.0:bafybeiargayav6yiztdnwzejoejstcx4idssch2h4f5arlgtzj3tgsgfmu -- valory/gnosis_safe:0.1.0:bafybeictjc7saviboxbsdcey3trvokrgo7uoh76mcrxecxhlvcrp47aqg4 +- valory/gnosis_safe:0.1.0:bafybeibq77mgzhyb23blf2eqmia3kc6io5karedfzhntvpcebeqdzrgyqa - valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y -- valory/service_registry:0.1.0:bafybeiby5x4wfdywlenmoudbykdxohpq2nifqxfep5niqgxrjyrekyahzy +- valory/service_registry:0.1.0:bafybeicbxmbzt757lbmyh6762lrkcrp3oeum6dk3z7pvosixasifsk6xlm - valory/hash_checkpoint:0.1.0:bafybeigv2bceirhy72yajxzibi4a5wrcfptfbkjbzzko6pqdq2f4dzr3xa protocols: - valory/acn_data_share:0.1.0:bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq - valory/contract_api:1.0.0:bafybeidgu7o5llh26xp3u3ebq3yluull5lupiyeu6iooi2xyymdrgnzq5i - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: -- valory/abstract_round_abci:0.1.0:bafybeigjrepaqpb3m7zunmt4hryos4vto4yyj3u6iyofdb2fotwho3bqvm -- valory/transaction_settlement_abci:0.1.0:bafybeid57tozt5f3kgzmu22nbr3c3oy4p7bi2bu66rqsgnlylq6xgh2ixe +- valory/abstract_round_abci:0.1.0:bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai +- valory/transaction_settlement_abci:0.1.0:bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom behaviours: main: args: {} From f0ad36bf6280d736704300569f5ff30ce27634d3 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 13:08:34 +0200 Subject: [PATCH 02/10] chore: revert accidental changes --- packages/packages.json | 20 +++++++++---------- packages/valory/agents/mech/aea-config.yaml | 16 +++++++-------- .../valory/customs/short_maker/__init__.py | 19 ------------------ .../valory/customs/short_maker/component.yaml | 14 ------------- packages/valory/services/mech/service.yaml | 2 +- packages/valory/skills/mech_abci/skill.yaml | 14 ++++++------- .../skills/subscription_abci/skill.yaml | 4 ++-- .../skills/task_submission_abci/skill.yaml | 4 ++-- 8 files changed, 30 insertions(+), 63 deletions(-) delete mode 100644 packages/valory/customs/short_maker/__init__.py delete mode 100644 packages/valory/customs/short_maker/component.yaml diff --git a/packages/packages.json b/packages/packages.json index 1a8185db..fc12335b 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -24,13 +24,13 @@ "contract/valory/hash_checkpoint/0.1.0": "bafybeigv2bceirhy72yajxzibi4a5wrcfptfbkjbzzko6pqdq2f4dzr3xa", "connection/valory/websocket_client/0.1.0": "bafybeiflmystocxaqblhpzqlcop2vkhsknpzjx2jomohomaxamwskeokzm", "skill/valory/contract_subscription/0.1.0": "bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4", - "skill/valory/mech_abci/0.1.0": "bafybeiao3zhznxdey5b4azhyjyvr7dyczxcjqm3akbc3ma2r4edhd2gcdy", - "skill/valory/task_submission_abci/0.1.0": "bafybeicjy2saxrlg5ezeissbccb57mt3jfxmn3oli754hipm5mo4nra5ri", + "skill/valory/mech_abci/0.1.0": "bafybeidzygcyammwwc3pnz2u3674elumbctsrzcvecov7h2gkk2espvtv4", + "skill/valory/task_submission_abci/0.1.0": "bafybeics3r7mll4wamkqmpdqfsn6g5oilo46ol4kr2unob4kae6f33bpz4", "skill/valory/task_execution/0.1.0": "bafybeiapj6qhwzqrr7biebnwn2e2ugqsby2ml7z25fbhmdjnf3u4yp6bem", "skill/valory/websocket_client/0.1.0": "bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta", - "skill/valory/subscription_abci/0.1.0": "bafybeihn6lbkxemurkiefbequprq5u5zzef77wleyjs7zzpf4aq3dtf4vm", - "agent/valory/mech/0.1.0": "bafybeifcb2o44phvd4o7de56qvfdkdrmxi4tq3jcp2dvf4pfkndwtuck6m", - "service/valory/mech/0.1.0": "bafybeihac7vg75uqizjzjqws7c4zgwi3y6lisgsztbmrwsbqu4ldydpb24" + "skill/valory/subscription_abci/0.1.0": "bafybeidoqeznyhbh3znaqbfdnftzq6fdh77m35qgftdwz46nz2iwda4yam", + "agent/valory/mech/0.1.0": "bafybeihwo2lymfygy7brtfjg7ajafmt7ulsnplccbnosejj22ubqccqj2m", + "service/valory/mech/0.1.0": "bafybeib23gw2gw5sx7ibbysklqlxi7hiuug62cuaih5wclpwvjsup6p23m" }, "third_party": { "protocol/valory/default/1.0.0": "bafybeifqcqy5hfbnd7fjv4mqdjrtujh2vx3p2xhe33y67zoxa6ph7wdpaq", @@ -52,11 +52,11 @@ "connection/valory/ledger/0.19.0": "bafybeic3ft7l7ca3qgnderm4xupsfmyoihgi27ukotnz7b5hdczla2enya", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e", "connection/valory/http_server/0.22.0": "bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m", - "skill/valory/transaction_settlement_abci/0.1.0": "bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom", - "skill/valory/termination_abci/0.1.0": "bafybeiejcthb2uvpjxgon5wxdzua3tm6ud66nrbrctzocwmbjuwwwx2rg4", - "skill/valory/abstract_round_abci/0.1.0": "bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai", - "skill/valory/reset_pause_abci/0.1.0": "bafybeiatxhn6r7wd35frh4h4i4twkpk5kkadbbnfgwnz6vampsspt5yy2i", - "skill/valory/registration_abci/0.1.0": "bafybeigpv56crn7hz6cqpicou7ulpz3by5uphcy6vm2rkqe5gkwuybcpe4", + "skill/valory/transaction_settlement_abci/0.1.0": "bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq", + "skill/valory/termination_abci/0.1.0": "bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44", + "skill/valory/abstract_round_abci/0.1.0": "bafybeih3enhagoql7kzpeyzzu2scpkif6y3ubakpralfnwxcvxexdyvy5i", + "skill/valory/reset_pause_abci/0.1.0": "bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam", + "skill/valory/registration_abci/0.1.0": "bafybeiek7zcsxbucjwzgqfftafhfrocvc7q4yxllh2q44jeemsjxg3rcfm", "skill/valory/abstract_abci/0.1.0": "bafybeihat4giyc4bz6zopvahcj4iw53356pbtwfn7p4d5yflwly2qhahum" } } \ No newline at end of file diff --git a/packages/valory/agents/mech/aea-config.yaml b/packages/valory/agents/mech/aea-config.yaml index 9fbc28b8..0bde7b03 100644 --- a/packages/valory/agents/mech/aea-config.yaml +++ b/packages/valory/agents/mech/aea-config.yaml @@ -36,16 +36,16 @@ protocols: - valory/websocket_client:0.1.0:bafybeih43mnztdv3v2hetr2k3gezg7d3yj4ur7cxdvcyaqhg65e52s5sf4 skills: - valory/abstract_abci:0.1.0:bafybeihat4giyc4bz6zopvahcj4iw53356pbtwfn7p4d5yflwly2qhahum -- valory/abstract_round_abci:0.1.0:bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai +- valory/abstract_round_abci:0.1.0:bafybeih3enhagoql7kzpeyzzu2scpkif6y3ubakpralfnwxcvxexdyvy5i - valory/contract_subscription:0.1.0:bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4 -- valory/mech_abci:0.1.0:bafybeiao3zhznxdey5b4azhyjyvr7dyczxcjqm3akbc3ma2r4edhd2gcdy -- valory/registration_abci:0.1.0:bafybeigpv56crn7hz6cqpicou7ulpz3by5uphcy6vm2rkqe5gkwuybcpe4 -- valory/reset_pause_abci:0.1.0:bafybeiatxhn6r7wd35frh4h4i4twkpk5kkadbbnfgwnz6vampsspt5yy2i -- valory/subscription_abci:0.1.0:bafybeihn6lbkxemurkiefbequprq5u5zzef77wleyjs7zzpf4aq3dtf4vm +- valory/mech_abci:0.1.0:bafybeidzygcyammwwc3pnz2u3674elumbctsrzcvecov7h2gkk2espvtv4 +- valory/registration_abci:0.1.0:bafybeiek7zcsxbucjwzgqfftafhfrocvc7q4yxllh2q44jeemsjxg3rcfm +- valory/reset_pause_abci:0.1.0:bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam +- valory/subscription_abci:0.1.0:bafybeidoqeznyhbh3znaqbfdnftzq6fdh77m35qgftdwz46nz2iwda4yam - valory/task_execution:0.1.0:bafybeiapj6qhwzqrr7biebnwn2e2ugqsby2ml7z25fbhmdjnf3u4yp6bem -- valory/task_submission_abci:0.1.0:bafybeicjy2saxrlg5ezeissbccb57mt3jfxmn3oli754hipm5mo4nra5ri -- valory/termination_abci:0.1.0:bafybeiejcthb2uvpjxgon5wxdzua3tm6ud66nrbrctzocwmbjuwwwx2rg4 -- valory/transaction_settlement_abci:0.1.0:bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom +- valory/task_submission_abci:0.1.0:bafybeics3r7mll4wamkqmpdqfsn6g5oilo46ol4kr2unob4kae6f33bpz4 +- valory/termination_abci:0.1.0:bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44 +- valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq - valory/websocket_client:0.1.0:bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta default_ledger: ethereum required_ledgers: diff --git a/packages/valory/customs/short_maker/__init__.py b/packages/valory/customs/short_maker/__init__.py deleted file mode 100644 index af7fd1b4..00000000 --- a/packages/valory/customs/short_maker/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# ------------------------------------------------------------------------------ -# -# Copyright 2023-2024 Valory AG -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# ------------------------------------------------------------------------------ -"""This module contains the implementation of the short_maker tool.""" \ No newline at end of file diff --git a/packages/valory/customs/short_maker/component.yaml b/packages/valory/customs/short_maker/component.yaml deleted file mode 100644 index 405ab64a..00000000 --- a/packages/valory/customs/short_maker/component.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: short_maker -author: valory -version: 0.1.0 -type: custom -description: A tool to generate short videos from prompts. -license: Apache-2.0 -aea_version: '>=1.0.0, <2.0.0' -fingerprint: - __init__.py: bafybeidfwhwsyo4ffxse2oo5vi26rcyisgdwip5id2z5qzxrmxc7arzvb4 - short_maker.py: bafybeihrmouw6nnsogzcclip7qmbme42sly2fu5uvuudfkfuc4yia6rvva -fingerprint_ignore_patterns: [] -entry_point: short_maker.py -callable: run -dependencies: {} diff --git a/packages/valory/services/mech/service.yaml b/packages/valory/services/mech/service.yaml index 1390f0db..dd4f5da6 100644 --- a/packages/valory/services/mech/service.yaml +++ b/packages/valory/services/mech/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeif7ia4jdlazy6745ke2k2x5yoqlwsgwr6sbztbgqtwvs3ndm2p7ba fingerprint_ignore_patterns: [] -agent: valory/mech:0.1.0:bafybeifcb2o44phvd4o7de56qvfdkdrmxi4tq3jcp2dvf4pfkndwtuck6m +agent: valory/mech:0.1.0:bafybeihwo2lymfygy7brtfjg7ajafmt7ulsnplccbnosejj22ubqccqj2m number_of_agents: 4 deployment: agent: diff --git a/packages/valory/skills/mech_abci/skill.yaml b/packages/valory/skills/mech_abci/skill.yaml index 5de23adc..3d2a2682 100644 --- a/packages/valory/skills/mech_abci/skill.yaml +++ b/packages/valory/skills/mech_abci/skill.yaml @@ -20,13 +20,13 @@ contracts: [] protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: -- valory/abstract_round_abci:0.1.0:bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai -- valory/registration_abci:0.1.0:bafybeigpv56crn7hz6cqpicou7ulpz3by5uphcy6vm2rkqe5gkwuybcpe4 -- valory/reset_pause_abci:0.1.0:bafybeiatxhn6r7wd35frh4h4i4twkpk5kkadbbnfgwnz6vampsspt5yy2i -- valory/task_submission_abci:0.1.0:bafybeicjy2saxrlg5ezeissbccb57mt3jfxmn3oli754hipm5mo4nra5ri -- valory/termination_abci:0.1.0:bafybeiejcthb2uvpjxgon5wxdzua3tm6ud66nrbrctzocwmbjuwwwx2rg4 -- valory/transaction_settlement_abci:0.1.0:bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom -- valory/subscription_abci:0.1.0:bafybeihn6lbkxemurkiefbequprq5u5zzef77wleyjs7zzpf4aq3dtf4vm +- valory/abstract_round_abci:0.1.0:bafybeih3enhagoql7kzpeyzzu2scpkif6y3ubakpralfnwxcvxexdyvy5i +- valory/registration_abci:0.1.0:bafybeiek7zcsxbucjwzgqfftafhfrocvc7q4yxllh2q44jeemsjxg3rcfm +- valory/reset_pause_abci:0.1.0:bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam +- valory/task_submission_abci:0.1.0:bafybeics3r7mll4wamkqmpdqfsn6g5oilo46ol4kr2unob4kae6f33bpz4 +- valory/termination_abci:0.1.0:bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44 +- valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq +- valory/subscription_abci:0.1.0:bafybeidoqeznyhbh3znaqbfdnftzq6fdh77m35qgftdwz46nz2iwda4yam behaviours: main: args: {} diff --git a/packages/valory/skills/subscription_abci/skill.yaml b/packages/valory/skills/subscription_abci/skill.yaml index 10633787..499db604 100644 --- a/packages/valory/skills/subscription_abci/skill.yaml +++ b/packages/valory/skills/subscription_abci/skill.yaml @@ -25,8 +25,8 @@ protocols: - valory/acn_data_share:0.1.0:bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq - valory/contract_api:1.0.0:bafybeidgu7o5llh26xp3u3ebq3yluull5lupiyeu6iooi2xyymdrgnzq5i skills: -- valory/abstract_round_abci:0.1.0:bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai -- valory/transaction_settlement_abci:0.1.0:bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom +- valory/abstract_round_abci:0.1.0:bafybeih3enhagoql7kzpeyzzu2scpkif6y3ubakpralfnwxcvxexdyvy5i +- valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq behaviours: main: args: {} diff --git a/packages/valory/skills/task_submission_abci/skill.yaml b/packages/valory/skills/task_submission_abci/skill.yaml index 70ff9768..3eb917a6 100644 --- a/packages/valory/skills/task_submission_abci/skill.yaml +++ b/packages/valory/skills/task_submission_abci/skill.yaml @@ -30,8 +30,8 @@ protocols: - valory/contract_api:1.0.0:bafybeidgu7o5llh26xp3u3ebq3yluull5lupiyeu6iooi2xyymdrgnzq5i - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: -- valory/abstract_round_abci:0.1.0:bafybeieehcc2jqker6jmflxc4nnfcdc7k3s5zs2zbruwenb363dgt4xhai -- valory/transaction_settlement_abci:0.1.0:bafybeibnsqrkzfm2sbjvtn7a7bsv7irikqv653nn7lfpc7mi43zijrhvom +- valory/abstract_round_abci:0.1.0:bafybeih3enhagoql7kzpeyzzu2scpkif6y3ubakpralfnwxcvxexdyvy5i +- valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq behaviours: main: args: {} From e7b6aa939138a9f886a4b91231982fc05159516c Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 13:14:14 +0200 Subject: [PATCH 03/10] chore: merge conflicts --- packages/packages.json | 4 ++-- packages/valory/agents/mech/aea-config.yaml | 4 ++-- .../valory/customs/prediction_request_claude/component.yaml | 2 +- packages/valory/customs/prepare_tx/component.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 77ecee66..44a8107b 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -1,7 +1,7 @@ { "dev": { "custom/valory/native_transfer_request/0.1.0": "bafybeid22vi5xtavqhq5ir2kq6nakckm3tl72wcgftsq35ak3cboyn6eea", - "custom/valory/prediction_request_claude/0.1.0": "bafybeidmtovzewf3be6wzdsoozdyin2hvq2efw233arohv243f52jzapli", + "custom/valory/prediction_request_claude/0.1.0": "bafybeifexjmen7vqqfra4by4o3ogsdzkwvnd2hsopwkqo5pd6rghhistjq", "custom/valory/openai_request/0.1.0": "bafybeigew6ukd53n3z352wmr5xu6or3id7nsqn7vb47bxs4pg4qtkmbdiu", "custom/valory/prediction_request_embedding/0.1.0": "bafybeifdhbbxmwf4q6pjhanubgrzhy7hetupyoekjyxvnubcccqxlkaqu4", "custom/valory/resolve_market/0.1.0": "bafybeiaag2e7rsdr3bwg6mlmfyom4vctsdapohco7z45pxhzjymepz3rya", @@ -15,7 +15,7 @@ "custom/napthaai/resolve_market_reasoning/0.1.0": "bafybeigutlttyivlf6yxdeesclv3dwxq6h7yj3varq63b6ujno3q6ytoje", "custom/napthaai/prediction_request_rag/0.1.0": "bafybeibp3hfeywllhmepvqyah763go4i5vtvo4wwihy6h4x7sylsjm5cam", "custom/napthaai/prediction_request_reasoning/0.1.0": "bafybeiexotxqt3o4mmbjr7gp74hhcsbfhvldlrcqbj573oliljqxeilh44", - "custom/valory/prepare_tx/0.1.0": "bafybeibxhhdpbdd3ma2jsu76egq56v2cjrx332fwjqbzgs6uvyqjqxcru4", + "custom/valory/prepare_tx/0.1.0": "bafybeifnanct3pkknaxiffm7cq4rgenfii4grf3srhlj5clmwtxmvmyaay", "custom/valory/short_maker/0.1.0": "bafybeif63rt4lkopu3rc3l7sg6tebrrwg2lxqufjx6dx4hoda5yzax43fa", "protocol/valory/acn_data_share/0.1.0": "bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq", "protocol/valory/websocket_client/0.1.0": "bafybeih43mnztdv3v2hetr2k3gezg7d3yj4ur7cxdvcyaqhg65e52s5sf4", diff --git a/packages/valory/agents/mech/aea-config.yaml b/packages/valory/agents/mech/aea-config.yaml index abadfa9b..0bde7b03 100644 --- a/packages/valory/agents/mech/aea-config.yaml +++ b/packages/valory/agents/mech/aea-config.yaml @@ -7,10 +7,10 @@ aea_version: '>=1.37.0, <2.0.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- valory/abci:0.1.0:bafybeifbnhe4f2bll3a5o3hqji3dqx4soov7hr266rdz5vunxgzo5hggbq +- valory/abci:0.1.0:bafybeiclexb6cnsog5yjz2qtvqyfnf7x5m7tpp56hblhk3pbocbvgjzhze - valory/http_client:0.23.0:bafybeih5vzo22p2umhqo52nzluaanxx7kejvvpcpdsrdymckkyvmsim6gm - valory/http_server:0.22.0:bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m -- valory/ipfs:0.1.0:bafybeiflaxrnepfn4hcnq5pieuc7ki7d422y3iqb54lv4tpgs7oywnuhhq +- valory/ipfs:0.1.0:bafybeihndk6hohj3yncgrye5pw7b7w2kztj3avby5u5mfk2fpjh7hqphii - valory/ledger:0.19.0:bafybeic3ft7l7ca3qgnderm4xupsfmyoihgi27ukotnz7b5hdczla2enya - valory/p2p_libp2p_client:0.1.0:bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e - valory/websocket_client:0.1.0:bafybeiflmystocxaqblhpzqlcop2vkhsknpzjx2jomohomaxamwskeokzm diff --git a/packages/valory/customs/prediction_request_claude/component.yaml b/packages/valory/customs/prediction_request_claude/component.yaml index c7ebc725..2cfaadea 100644 --- a/packages/valory/customs/prediction_request_claude/component.yaml +++ b/packages/valory/customs/prediction_request_claude/component.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeibbn67pnrrm4qm3n3kbelvbs3v7fjlrjniywmw2vbizarippidtvi - prediction_request_claude.py: bafybeielszpjlapsn33tpmvmy24gygsa2mhyopd4ywoouycd7mhldwr53q + prediction_request_claude.py: bafybeiaibfrbouduwuzqlx4fa6qwsgwikfa2jilihsbnv3mtb5dy4y4peu fingerprint_ignore_patterns: [] entry_point: prediction_request_claude.py callable: run diff --git a/packages/valory/customs/prepare_tx/component.yaml b/packages/valory/customs/prepare_tx/component.yaml index 8f0fc550..d44cd037 100644 --- a/packages/valory/customs/prepare_tx/component.yaml +++ b/packages/valory/customs/prepare_tx/component.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeieynbsr6aijx2totfi5iw6thjwgzko526zcs5plgvgrq2lufso2sy - prepare_tx.py: bafybeid6t7rorf54bri436tncd6tnijp2v3wai4ebyehlj3v7bsmdrnx2u + prepare_tx.py: bafybeicrc7cvsq425umk6chgyohckss7djlelyqbnpffpe2ahf7iofl7qy fingerprint_ignore_patterns: [] entry_point: prepare_tx.py callable: run From a4dc21b226c3645affc43dbd8ebe52ddb5a11ec0 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 13:15:30 +0200 Subject: [PATCH 04/10] chore: adjust deps --- pyproject.toml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 84fd02ab..90213955 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,4 +68,4 @@ readability-lxml = "0.8.1" docstring-parser = "0.15" faiss-cpu = "1.7.4" pypdf2 = "^3.0.1" -lxml = {extras = ["html-clean"], version = "^5.2.0"} +lxml = {extras = ["html-clean"], version = "^5.1.0"} diff --git a/tox.ini b/tox.ini index 707ea6d9..80f75893 100644 --- a/tox.ini +++ b/tox.ini @@ -64,7 +64,7 @@ deps = pandas==2.1.1 tiktoken==0.5.1 python-dateutil==2.8.2 - lxml==5.2.0 + lxml==5.1.0 lxml-html-clean==0.1.0 [extra-deps] From 211fe973afbbc58d60947bcf36bde1c917c7211d Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 13:23:53 +0200 Subject: [PATCH 05/10] chore: revert accidental change --- packages/packages.json | 8 ++++---- packages/valory/agents/mech/aea-config.yaml | 4 ++-- packages/valory/services/mech/service.yaml | 2 +- packages/valory/skills/mech_abci/skill.yaml | 2 +- packages/valory/skills/task_submission_abci/behaviours.py | 5 +++-- packages/valory/skills/task_submission_abci/skill.yaml | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 44a8107b..38e4c2b5 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -24,13 +24,13 @@ "contract/valory/hash_checkpoint/0.1.0": "bafybeigv2bceirhy72yajxzibi4a5wrcfptfbkjbzzko6pqdq2f4dzr3xa", "connection/valory/websocket_client/0.1.0": "bafybeiflmystocxaqblhpzqlcop2vkhsknpzjx2jomohomaxamwskeokzm", "skill/valory/contract_subscription/0.1.0": "bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4", - "skill/valory/mech_abci/0.1.0": "bafybeidzygcyammwwc3pnz2u3674elumbctsrzcvecov7h2gkk2espvtv4", - "skill/valory/task_submission_abci/0.1.0": "bafybeics3r7mll4wamkqmpdqfsn6g5oilo46ol4kr2unob4kae6f33bpz4", + "skill/valory/mech_abci/0.1.0": "bafybeighsfwef33msfzkxbkkikfyvt3beijqlua37x667a6kfjcwzfug3u", + "skill/valory/task_submission_abci/0.1.0": "bafybeidmkzpqpvyol3636eeprkloy3z3t2nipmwvu6da3dtk2q4tjlab6u", "skill/valory/task_execution/0.1.0": "bafybeiapj6qhwzqrr7biebnwn2e2ugqsby2ml7z25fbhmdjnf3u4yp6bem", "skill/valory/websocket_client/0.1.0": "bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta", "skill/valory/subscription_abci/0.1.0": "bafybeidoqeznyhbh3znaqbfdnftzq6fdh77m35qgftdwz46nz2iwda4yam", - "agent/valory/mech/0.1.0": "bafybeihwo2lymfygy7brtfjg7ajafmt7ulsnplccbnosejj22ubqccqj2m", - "service/valory/mech/0.1.0": "bafybeib23gw2gw5sx7ibbysklqlxi7hiuug62cuaih5wclpwvjsup6p23m" + "agent/valory/mech/0.1.0": "bafybeigxga6vdyldycqw4njoovwtzizrwn7dnxrxrsmdvwufvyaxjx7zdu", + "service/valory/mech/0.1.0": "bafybeib6naivoysmeqjdsex42myxbsunjsmvyugwpdkddqbvefufzjxkwq" }, "third_party": { "protocol/valory/default/1.0.0": "bafybeifqcqy5hfbnd7fjv4mqdjrtujh2vx3p2xhe33y67zoxa6ph7wdpaq", diff --git a/packages/valory/agents/mech/aea-config.yaml b/packages/valory/agents/mech/aea-config.yaml index 0bde7b03..3e8ea603 100644 --- a/packages/valory/agents/mech/aea-config.yaml +++ b/packages/valory/agents/mech/aea-config.yaml @@ -38,12 +38,12 @@ skills: - valory/abstract_abci:0.1.0:bafybeihat4giyc4bz6zopvahcj4iw53356pbtwfn7p4d5yflwly2qhahum - valory/abstract_round_abci:0.1.0:bafybeih3enhagoql7kzpeyzzu2scpkif6y3ubakpralfnwxcvxexdyvy5i - valory/contract_subscription:0.1.0:bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4 -- valory/mech_abci:0.1.0:bafybeidzygcyammwwc3pnz2u3674elumbctsrzcvecov7h2gkk2espvtv4 +- valory/mech_abci:0.1.0:bafybeighsfwef33msfzkxbkkikfyvt3beijqlua37x667a6kfjcwzfug3u - valory/registration_abci:0.1.0:bafybeiek7zcsxbucjwzgqfftafhfrocvc7q4yxllh2q44jeemsjxg3rcfm - valory/reset_pause_abci:0.1.0:bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam - valory/subscription_abci:0.1.0:bafybeidoqeznyhbh3znaqbfdnftzq6fdh77m35qgftdwz46nz2iwda4yam - valory/task_execution:0.1.0:bafybeiapj6qhwzqrr7biebnwn2e2ugqsby2ml7z25fbhmdjnf3u4yp6bem -- valory/task_submission_abci:0.1.0:bafybeics3r7mll4wamkqmpdqfsn6g5oilo46ol4kr2unob4kae6f33bpz4 +- valory/task_submission_abci:0.1.0:bafybeidmkzpqpvyol3636eeprkloy3z3t2nipmwvu6da3dtk2q4tjlab6u - valory/termination_abci:0.1.0:bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44 - valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq - valory/websocket_client:0.1.0:bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta diff --git a/packages/valory/services/mech/service.yaml b/packages/valory/services/mech/service.yaml index dd4f5da6..68c12f44 100644 --- a/packages/valory/services/mech/service.yaml +++ b/packages/valory/services/mech/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeif7ia4jdlazy6745ke2k2x5yoqlwsgwr6sbztbgqtwvs3ndm2p7ba fingerprint_ignore_patterns: [] -agent: valory/mech:0.1.0:bafybeihwo2lymfygy7brtfjg7ajafmt7ulsnplccbnosejj22ubqccqj2m +agent: valory/mech:0.1.0:bafybeigxga6vdyldycqw4njoovwtzizrwn7dnxrxrsmdvwufvyaxjx7zdu number_of_agents: 4 deployment: agent: diff --git a/packages/valory/skills/mech_abci/skill.yaml b/packages/valory/skills/mech_abci/skill.yaml index 3d2a2682..121f89cf 100644 --- a/packages/valory/skills/mech_abci/skill.yaml +++ b/packages/valory/skills/mech_abci/skill.yaml @@ -23,7 +23,7 @@ skills: - valory/abstract_round_abci:0.1.0:bafybeih3enhagoql7kzpeyzzu2scpkif6y3ubakpralfnwxcvxexdyvy5i - valory/registration_abci:0.1.0:bafybeiek7zcsxbucjwzgqfftafhfrocvc7q4yxllh2q44jeemsjxg3rcfm - valory/reset_pause_abci:0.1.0:bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam -- valory/task_submission_abci:0.1.0:bafybeics3r7mll4wamkqmpdqfsn6g5oilo46ol4kr2unob4kae6f33bpz4 +- valory/task_submission_abci:0.1.0:bafybeidmkzpqpvyol3636eeprkloy3z3t2nipmwvu6da3dtk2q4tjlab6u - valory/termination_abci:0.1.0:bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44 - valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq - valory/subscription_abci:0.1.0:bafybeidoqeznyhbh3znaqbfdnftzq6fdh77m35qgftdwz46nz2iwda4yam diff --git a/packages/valory/skills/task_submission_abci/behaviours.py b/packages/valory/skills/task_submission_abci/behaviours.py index 18dfa9ff..409956cc 100644 --- a/packages/valory/skills/task_submission_abci/behaviours.py +++ b/packages/valory/skills/task_submission_abci/behaviours.py @@ -771,11 +771,12 @@ def get_payload_content(self) -> Generator[None, None, str]: all_txs.append(response_tx) update_usage_tx = yield from self.get_update_usage_tx() - if update_usage_tx is not None: + if update_usage_tx is None: # something went wrong, respond with ERROR payload for now # in case we cannot update the usage, we should not proceed with the rest of the txs - all_txs.append(update_usage_tx) + return TransactionPreparationRound.ERROR_PAYLOAD + all_txs.append(update_usage_tx) multisend_tx_str = yield from self._to_multisend(all_txs) if multisend_tx_str is None: # something went wrong, respond with ERROR payload for now diff --git a/packages/valory/skills/task_submission_abci/skill.yaml b/packages/valory/skills/task_submission_abci/skill.yaml index 3eb917a6..e93fc33d 100644 --- a/packages/valory/skills/task_submission_abci/skill.yaml +++ b/packages/valory/skills/task_submission_abci/skill.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeiholqak7ltw6bbmn2c5tn3j7xgzkdlfzp3kcskiqsvmxoih6m4muq - behaviours.py: bafybeich2utoa25eyxhiv732pkzm3ol7dxi2qdeppzr7bc734jvfhfae4y + behaviours.py: bafybeifirwywbj433tyu45hhkuftlbxjg4hc7qsgtl3hppah77kcl7keye dialogues.py: bafybeibmac3m5u5h6ucoyjr4dazay72dyga656wvjl6z6saapluvjo54ne fsm_specification.yaml: bafybeidtmsmpunr3t77pshd3k2s6dd6hlvhze6inu3gj7xyvlg4wi3tnuu handlers.py: bafybeibe5n7my2vd2wlwo73sbma65epjqc7kxgtittewlylcmvnmoxtxzq From edb6cb6a18fc05916442e3adaa8543993f1132a8 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 13:29:05 +0200 Subject: [PATCH 06/10] chore: add missing deps --- poetry.lock | 208 ++++++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 2 + tox.ini | 2 + 3 files changed, 211 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 8d689b71..18486987 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1085,6 +1085,17 @@ files = [ marshmallow = ">=3.18.0,<4.0.0" typing-inspect = ">=0.4.0,<1" +[[package]] +name = "decorator" +version = "4.4.2" +description = "Decorators for Humans" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*" +files = [ + {file = "decorator-4.4.2-py2.py3-none-any.whl", hash = "sha256:41fa54c2a0cc4ba648be4fd43cff00aedf5b9465c9bf18d64325bc225f08f760"}, + {file = "decorator-4.4.2.tar.gz", hash = "sha256:e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7"}, +] + [[package]] name = "distlib" version = "0.3.8" @@ -2099,6 +2110,56 @@ files = [ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] +[[package]] +name = "imageio" +version = "2.34.0" +description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats." +optional = false +python-versions = ">=3.8" +files = [ + {file = "imageio-2.34.0-py3-none-any.whl", hash = "sha256:08082bf47ccb54843d9c73fe9fc8f3a88c72452ab676b58aca74f36167e8ccba"}, + {file = "imageio-2.34.0.tar.gz", hash = "sha256:ae9732e10acf807a22c389aef193f42215718e16bd06eed0c5bb57e1034a4d53"}, +] + +[package.dependencies] +numpy = "*" +pillow = ">=8.3.2" + +[package.extras] +all-plugins = ["astropy", "av", "imageio-ffmpeg", "pillow-heif", "psutil", "tifffile"] +all-plugins-pypy = ["av", "imageio-ffmpeg", "pillow-heif", "psutil", "tifffile"] +build = ["wheel"] +dev = ["black", "flake8", "fsspec[github]", "pytest", "pytest-cov"] +docs = ["numpydoc", "pydata-sphinx-theme", "sphinx (<6)"] +ffmpeg = ["imageio-ffmpeg", "psutil"] +fits = ["astropy"] +full = ["astropy", "av", "black", "flake8", "fsspec[github]", "gdal", "imageio-ffmpeg", "itk", "numpydoc", "pillow-heif", "psutil", "pydata-sphinx-theme", "pytest", "pytest-cov", "sphinx (<6)", "tifffile", "wheel"] +gdal = ["gdal"] +itk = ["itk"] +linting = ["black", "flake8"] +pillow-heif = ["pillow-heif"] +pyav = ["av"] +test = ["fsspec[github]", "pytest", "pytest-cov"] +tifffile = ["tifffile"] + +[[package]] +name = "imageio-ffmpeg" +version = "0.4.9" +description = "FFMPEG wrapper for Python" +optional = false +python-versions = ">=3.5" +files = [ + {file = "imageio-ffmpeg-0.4.9.tar.gz", hash = "sha256:39bcd1660118ef360fa4047456501071364661aa9d9021d3d26c58f1ee2081f5"}, + {file = "imageio_ffmpeg-0.4.9-py3-none-macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:24095e882a126a0d217197b86265f821b4bb3cf9004104f67c1384a2b4b49168"}, + {file = "imageio_ffmpeg-0.4.9-py3-none-manylinux2010_x86_64.whl", hash = "sha256:2996c64af3e5489227096580269317719ea1a8121d207f2e28d6c24ebc4a253e"}, + {file = "imageio_ffmpeg-0.4.9-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7eead662d2f46d748c0ab446b68f423eb63d2b54d0a8ef96f80607245540866d"}, + {file = "imageio_ffmpeg-0.4.9-py3-none-win32.whl", hash = "sha256:b6de1e18911687c538d5585d8287ab1a23624ca9dc2044fcc4607de667bcf11e"}, + {file = "imageio_ffmpeg-0.4.9-py3-none-win_amd64.whl", hash = "sha256:7e900c695c6541b1cb17feb1baacd4009b30a53a45b81c23d53a67ab13ffb766"}, +] + +[package.dependencies] +setuptools = "*" + [[package]] name = "importlib-resources" version = "6.4.0" @@ -2460,6 +2521,7 @@ files = [ {file = "lxml-5.2.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c38d7b9a690b090de999835f0443d8aa93ce5f2064035dfc48f27f02b4afc3d0"}, {file = "lxml-5.2.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5670fb70a828663cc37552a2a85bf2ac38475572b0e9b91283dc09efb52c41d1"}, {file = "lxml-5.2.1-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:958244ad566c3ffc385f47dddde4145088a0ab893504b54b52c041987a8c1863"}, + {file = "lxml-5.2.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:b6241d4eee5f89453307c2f2bfa03b50362052ca0af1efecf9fef9a41a22bb4f"}, {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:2a66bf12fbd4666dd023b6f51223aed3d9f3b40fef06ce404cb75bafd3d89536"}, {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:9123716666e25b7b71c4e1789ec829ed18663152008b58544d95b008ed9e21e9"}, {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:0c3f67e2aeda739d1cc0b1102c9a9129f7dc83901226cc24dd72ba275ced4218"}, @@ -2717,6 +2779,30 @@ files = [ {file = "morphys-1.0-py2.py3-none-any.whl", hash = "sha256:76d6dbaa4d65f597e59d332c81da786d83e4669387b9b2a750cfec74e7beec20"}, ] +[[package]] +name = "moviepy" +version = "1.0.3" +description = "Video editing with Python" +optional = false +python-versions = "*" +files = [ + {file = "moviepy-1.0.3.tar.gz", hash = "sha256:2884e35d1788077db3ff89e763c5ba7bfddbd7ae9108c9bc809e7ba58fa433f5"}, +] + +[package.dependencies] +decorator = ">=4.0.2,<5.0" +imageio = {version = ">=2.5,<3.0", markers = "python_version >= \"3.4\""} +imageio_ffmpeg = {version = ">=0.2.0", markers = "python_version >= \"3.4\""} +numpy = {version = ">=1.17.3", markers = "python_version > \"2.7\""} +proglog = "<=1.0.0" +requests = ">=2.8.1,<3.0" +tqdm = ">=4.11.2,<5.0" + +[package.extras] +doc = ["Sphinx (>=1.5.2,<2.0)", "numpydoc (>=0.6.0,<1.0)", "pygame (>=1.9.3,<2.0)", "sphinx_rtd_theme (>=0.1.10b0,<1.0)"] +optional = ["matplotlib (>=2.0.0,<3.0)", "opencv-python (>=3.0,<4.0)", "scikit-image (>=0.13.0,<1.0)", "scikit-learn", "scipy (>=0.19.0,<1.5)", "youtube_dl"] +test = ["coverage (<5.0)", "coveralls (>=1.1,<2.0)", "pytest (>=3.0.0,<4.0)", "pytest-cov (>=2.5.1,<3.0)", "requests (>=2.8.1,<3.0)"] + [[package]] name = "mpmath" version = "1.3.0" @@ -3335,6 +3421,92 @@ files = [ [package.dependencies] regex = ">=2022.3.15" +[[package]] +name = "pillow" +version = "10.3.0" +description = "Python Imaging Library (Fork)" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45"}, + {file = "pillow-10.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf"}, + {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3"}, + {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5"}, + {file = "pillow-10.3.0-cp310-cp310-win32.whl", hash = "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2"}, + {file = "pillow-10.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f"}, + {file = "pillow-10.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b"}, + {file = "pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795"}, + {file = "pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd"}, + {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad"}, + {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c"}, + {file = "pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09"}, + {file = "pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d"}, + {file = "pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f"}, + {file = "pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84"}, + {file = "pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a"}, + {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef"}, + {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3"}, + {file = "pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d"}, + {file = "pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b"}, + {file = "pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a"}, + {file = "pillow-10.3.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b"}, + {file = "pillow-10.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd"}, + {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d"}, + {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3"}, + {file = "pillow-10.3.0-cp38-cp38-win32.whl", hash = "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b"}, + {file = "pillow-10.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999"}, + {file = "pillow-10.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936"}, + {file = "pillow-10.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8"}, + {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9"}, + {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb"}, + {file = "pillow-10.3.0-cp39-cp39-win32.whl", hash = "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572"}, + {file = "pillow-10.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb"}, + {file = "pillow-10.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591"}, + {file = "pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d"}, +] + +[package.extras] +docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] +fpx = ["olefile"] +mic = ["olefile"] +tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] +typing = ["typing-extensions"] +xmp = ["defusedxml"] + [[package]] name = "platformdirs" version = "4.2.0" @@ -3434,6 +3606,20 @@ files = [ cymem = ">=2.0.2,<2.1.0" murmurhash = ">=0.28.0,<1.1.0" +[[package]] +name = "proglog" +version = "0.1.10" +description = "Log and progress bar manager for console, notebooks, web..." +optional = false +python-versions = "*" +files = [ + {file = "proglog-0.1.10-py3-none-any.whl", hash = "sha256:19d5da037e8c813da480b741e3fa71fb1ac0a5b02bf21c41577c7f327485ec50"}, + {file = "proglog-0.1.10.tar.gz", hash = "sha256:658c28c9c82e4caeb2f25f488fff9ceace22f8d69b15d0c1c86d64275e4ddab4"}, +] + +[package.dependencies] +tqdm = "*" + [[package]] name = "proto-plus" version = "1.23.0" @@ -4102,6 +4288,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -4257,6 +4444,25 @@ files = [ {file = "regex-2023.12.25.tar.gz", hash = "sha256:29171aa128da69afdf4bde412d5bedc335f2ca8fcfe4489038577d05f16181e5"}, ] +[[package]] +name = "replicate" +version = "0.15.7" +description = "Python client for Replicate" +optional = false +python-versions = ">=3.8" +files = [ + {file = "replicate-0.15.7-py3-none-any.whl", hash = "sha256:e710f923f24f52f1a289c2d8429068bdedcaeb8245625a08788e60a93e43305f"}, + {file = "replicate-0.15.7.tar.gz", hash = "sha256:6244cabbe7042ea5ee3d79d6a40af2038dac698fd11b8cc43f756f9c8dbcfb19"}, +] + +[package.dependencies] +httpx = ">=0.21.0,<1" +packaging = "*" +pydantic = ">1" + +[package.extras] +dev = ["mypy", "pylint", "pytest", "pytest-asyncio", "pytest-recording", "respx", "ruff (>=0.1.3)"] + [[package]] name = "requests" version = "2.28.1" @@ -5829,4 +6035,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "8666bd4554eb59cdf1b226b521456aaa8e5376c872929dd3ca9aa586b4be7ca8" +content-hash = "7ad0eac0f7eb1e326e68d7acdf47a8060a45e61d4ce805facaefa6ef3fe07f5f" diff --git a/pyproject.toml b/pyproject.toml index 90213955..c0627ff1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,4 +68,6 @@ readability-lxml = "0.8.1" docstring-parser = "0.15" faiss-cpu = "1.7.4" pypdf2 = "^3.0.1" +moviepy = "1.0.3" +replicate = "0.15.7" lxml = {extras = ["html-clean"], version = "^5.1.0"} diff --git a/tox.ini b/tox.ini index 80f75893..25eb7d00 100644 --- a/tox.ini +++ b/tox.ini @@ -66,6 +66,8 @@ deps = python-dateutil==2.8.2 lxml==5.1.0 lxml-html-clean==0.1.0 + moviepy==1.0.3 + replicate==0.15.7 [extra-deps] deps = From b41a1cd35def46aefadaee514ffa12352622546f Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 13:53:20 +0200 Subject: [PATCH 07/10] fix: package deps --- .../prediction_request_rag_claude/__init__.py | 20 ++++++++++ .../component.yaml | 39 +++++++++++++++++++ .../component.yaml | 39 +++++++++++++++++++ .../customs/prediction_url_cot/__init__.py | 20 ++++++++++ .../customs/prediction_url_cot/component.yaml | 37 ++++++++++++++++++ .../prediction_url_cot_claude/__init__.py | 20 ++++++++++ .../prediction_url_cot_claude/component.yaml | 33 ++++++++++++++++ .../prediction_url_cot_claude.py | 18 ++++----- packages/packages.json | 12 ++++-- packages/valory/agents/mech/aea-config.yaml | 2 +- .../prediction_request_claude/component.yaml | 2 +- packages/valory/services/mech/service.yaml | 2 +- .../valory/skills/task_execution/skill.yaml | 2 +- 13 files changed, 228 insertions(+), 18 deletions(-) create mode 100644 packages/napthaai/customs/prediction_request_rag_claude/__init__.py create mode 100644 packages/napthaai/customs/prediction_request_rag_claude/component.yaml create mode 100644 packages/napthaai/customs/prediction_request_reasoning_claude/component.yaml create mode 100644 packages/napthaai/customs/prediction_url_cot/component.yaml create mode 100644 packages/napthaai/customs/prediction_url_cot_claude/component.yaml diff --git a/packages/napthaai/customs/prediction_request_rag_claude/__init__.py b/packages/napthaai/customs/prediction_request_rag_claude/__init__.py new file mode 100644 index 00000000..127ce15c --- /dev/null +++ b/packages/napthaai/customs/prediction_request_rag_claude/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2024 Valory AG +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ------------------------------------------------------------------------------ + +"""This module contains the prediction request rag claude tool.""" diff --git a/packages/napthaai/customs/prediction_request_rag_claude/component.yaml b/packages/napthaai/customs/prediction_request_rag_claude/component.yaml new file mode 100644 index 00000000..98766b2a --- /dev/null +++ b/packages/napthaai/customs/prediction_request_rag_claude/component.yaml @@ -0,0 +1,39 @@ +name: prediction_request_rag_claude +author: napthaai +version: 0.1.0 +type: custom +description: A tool for making binary predictions on markets using claude. +license: Apache-2.0 +aea_version: '>=1.0.0, <2.0.0' +fingerprint: + __init__.py: bafybeihd72xjbjzbqcpm3qfaimqk3ts3qx2l4w2lhca2e4ruso7jngmmce + prediction_request_rag_claude.py: bafybeibxeaoizixha4po7apf4k7gix2hi7x54hwqx4oyp23bwdgao6fv2u +fingerprint_ignore_patterns: [] +entry_point: prediction_request_rag_claude.py +callable: run +dependencies: + google-api-python-client: + version: ==2.95.0 + googlesearch-python: + version: ==1.2.3 + requests: {} + markdownify: + version: ==0.11.6 + readability-lxml: + version: ==0.8.1 + anthropic: + version: ==0.21.3 + tiktoken: + version: ==0.5.1 + pydantic: + version: '>=1.9.0,<3' + faiss-cpu: + version: ==1.7.4 + openai: + version: ==1.11.0 + docstring-parser: + version: ==0.15 + pypdf2: + version: ==3.0.1 + numpy: + version: '>=1.19.0' diff --git a/packages/napthaai/customs/prediction_request_reasoning_claude/component.yaml b/packages/napthaai/customs/prediction_request_reasoning_claude/component.yaml new file mode 100644 index 00000000..f0f9bf97 --- /dev/null +++ b/packages/napthaai/customs/prediction_request_reasoning_claude/component.yaml @@ -0,0 +1,39 @@ +name: prediction_request_reasoning_claude +author: napthaai +version: 0.1.0 +type: custom +description: A tool for making binary predictions on markets using claude. +license: Apache-2.0 +aea_version: '>=1.0.0, <2.0.0' +fingerprint: + __init__.py: bafybeib36ew6vbztldut5xayk5553rylrq7yv4cpqyhwc5ktvd4cx67vwu + prediction_request_reasoning_claude.py: bafybeian5oyo5v4qvnocxhpgtxcvitlzwsa7hag4lwydmyyth2r7u6dine +fingerprint_ignore_patterns: [] +entry_point: prediction_request_reasoning_claude.py +callable: run +dependencies: + google-api-python-client: + version: ==2.95.0 + googlesearch-python: + version: ==1.2.3 + requests: {} + markdownify: + version: ==0.11.6 + readability-lxml: + version: ==0.8.1 + openai: + version: ==1.11.0 + tiktoken: + version: ==0.5.1 + pypdf2: + version: ==3.0.1 + numpy: + version: '>=1.19.0' + pydantic: + version: '>=1.9.0,<3' + faiss-cpu: + version: ==1.7.4 + docstring-parser: + version: ==0.15 + anthropic: + version: ==0.21.3 diff --git a/packages/napthaai/customs/prediction_url_cot/__init__.py b/packages/napthaai/customs/prediction_url_cot/__init__.py index e69de29b..0db6f418 100644 --- a/packages/napthaai/customs/prediction_url_cot/__init__.py +++ b/packages/napthaai/customs/prediction_url_cot/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2024 Valory AG +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ------------------------------------------------------------------------------ + +"""This module contains the prediction url cot tool.""" diff --git a/packages/napthaai/customs/prediction_url_cot/component.yaml b/packages/napthaai/customs/prediction_url_cot/component.yaml new file mode 100644 index 00000000..d70521d9 --- /dev/null +++ b/packages/napthaai/customs/prediction_url_cot/component.yaml @@ -0,0 +1,37 @@ +name: prediction_url_cot +author: napthaai +version: 0.1.0 +type: custom +description: A tool for making binary predictions on markets. +license: Apache-2.0 +aea_version: '>=1.0.0, <2.0.0' +fingerprint: + __init__.py: bafybeiflni5dkn5fqe7fnu4lgbqxzfrgochhqfbgzwz3vlf5grijp3nkpm + prediction_url_cot.py: bafybeiczvut645b7xma2x6ivadhdbbqrvwusjoczidv2bwfbhidazshlfu +fingerprint_ignore_patterns: [] +entry_point: prediction_request_reasoning_claude.py +callable: run +dependencies: + google-api-python-client: + version: ==2.95.0 + googlesearch-python: + version: ==1.2.3 + requests: {} + markdownify: + version: ==0.11.6 + readability-lxml: + version: ==0.8.1 + anthropic: + version: ==0.21.3 + tiktoken: + version: ==0.5.1 + pypdf2: + version: ==3.0.1 + numpy: + version: '>=1.19.0' + pydantic: + version: '>=1.9.0,<3' + openai: + version: ==1.11.0 + docstring-parser: + version: ==0.15 diff --git a/packages/napthaai/customs/prediction_url_cot_claude/__init__.py b/packages/napthaai/customs/prediction_url_cot_claude/__init__.py index e69de29b..8bf5107e 100644 --- a/packages/napthaai/customs/prediction_url_cot_claude/__init__.py +++ b/packages/napthaai/customs/prediction_url_cot_claude/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2024 Valory AG +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ------------------------------------------------------------------------------ + +"""This module contains the prediction url cot claude tool.""" diff --git a/packages/napthaai/customs/prediction_url_cot_claude/component.yaml b/packages/napthaai/customs/prediction_url_cot_claude/component.yaml new file mode 100644 index 00000000..c0d57578 --- /dev/null +++ b/packages/napthaai/customs/prediction_url_cot_claude/component.yaml @@ -0,0 +1,33 @@ +name: prediction_url_cot_claude +author: napthaai +version: 0.1.0 +type: custom +description: A tool for making binary predictions on markets using claude. +license: Apache-2.0 +aea_version: '>=1.0.0, <2.0.0' +fingerprint: + __init__.py: bafybeicctw7lsy7tuykskh3elqprgswn3hyivjpvlj7l33pj7imvgyc2ma + prediction_url_cot_claude.py: bafybeif3xiehvlodmuolwoobrqtliqhmpcaao5zyynkbawivmarnif3esi +fingerprint_ignore_patterns: [] +entry_point: prediction_request_reasoning_claude.py +callable: run +dependencies: + google-api-python-client: + version: ==2.95.0 + googlesearch-python: + version: ==1.2.3 + requests: {} + markdownify: + version: ==0.11.6 + readability-lxml: + version: ==0.8.1 + anthropic: + version: ==0.21.3 + tiktoken: + version: ==0.5.1 + pypdf2: + version: ==3.0.1 + numpy: + version: '>=1.19.0' + pydantic: + version: '>=1.9.0,<3' \ No newline at end of file diff --git a/packages/napthaai/customs/prediction_url_cot_claude/prediction_url_cot_claude.py b/packages/napthaai/customs/prediction_url_cot_claude/prediction_url_cot_claude.py index 4202bad4..bdbfbe25 100644 --- a/packages/napthaai/customs/prediction_url_cot_claude/prediction_url_cot_claude.py +++ b/packages/napthaai/customs/prediction_url_cot_claude/prediction_url_cot_claude.py @@ -1,22 +1,20 @@ -from collections import defaultdict -from concurrent.futures import Future, ThreadPoolExecutor -from docstring_parser import parse -from googleapiclient.discovery import build -from itertools import islice import json import re +from concurrent.futures import Future, ThreadPoolExecutor from io import BytesIO +from itertools import islice +from typing import Any, Dict, Generator, List, Optional, Tuple, Callable + import PyPDF2 import anthropic -from pydantic import BaseModel, Field -from readability import Document as ReadabilityDocument import requests -from requests.exceptions import RequestException, TooManyRedirects +from googleapiclient.discovery import build from markdownify import markdownify as md -from typing import Any, Dict, Generator, List, Optional, Tuple, Callable +from pydantic import BaseModel +from readability import Document as ReadabilityDocument +from requests.exceptions import RequestException, TooManyRedirects from tiktoken import encoding_for_model - DEFAULT_CLAUDE_SETTINGS = { "max_tokens": 1000, "temperature": 0, diff --git a/packages/packages.json b/packages/packages.json index 38e4c2b5..98d3f3d1 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -1,7 +1,7 @@ { "dev": { "custom/valory/native_transfer_request/0.1.0": "bafybeid22vi5xtavqhq5ir2kq6nakckm3tl72wcgftsq35ak3cboyn6eea", - "custom/valory/prediction_request_claude/0.1.0": "bafybeifexjmen7vqqfra4by4o3ogsdzkwvnd2hsopwkqo5pd6rghhistjq", + "custom/valory/prediction_request_claude/0.1.0": "bafybeihkc642ygr5uozwintxverr4qxmbt466lrpolpkitj3ydajv4occ4", "custom/valory/openai_request/0.1.0": "bafybeigew6ukd53n3z352wmr5xu6or3id7nsqn7vb47bxs4pg4qtkmbdiu", "custom/valory/prediction_request_embedding/0.1.0": "bafybeifdhbbxmwf4q6pjhanubgrzhy7hetupyoekjyxvnubcccqxlkaqu4", "custom/valory/resolve_market/0.1.0": "bafybeiaag2e7rsdr3bwg6mlmfyom4vctsdapohco7z45pxhzjymepz3rya", @@ -17,6 +17,10 @@ "custom/napthaai/prediction_request_reasoning/0.1.0": "bafybeiexotxqt3o4mmbjr7gp74hhcsbfhvldlrcqbj573oliljqxeilh44", "custom/valory/prepare_tx/0.1.0": "bafybeifnanct3pkknaxiffm7cq4rgenfii4grf3srhlj5clmwtxmvmyaay", "custom/valory/short_maker/0.1.0": "bafybeif63rt4lkopu3rc3l7sg6tebrrwg2lxqufjx6dx4hoda5yzax43fa", + "custom/napthaai/prediction_url_cot/0.1.0": "bafybeih7lymoeb4paypjbybeejrajqzllevsmjmlv7yfbbdtxzcka22wri", + "custom/napthaai/prediction_url_cot_claude/0.1.0": "bafybeiciilmwpmra235umdpj5swprrugtdi5pz7jwikngnqgmghpqajbqe", + "custom/napthaai/prediction_request_reasoning_claude/0.1.0": "bafybeiffeo3t2i7nroc7uevuqrku7htriaibvw4g6heitxld2imf2o4tui", + "custom/napthaai/prediction_request_rag_claude/0.1.0": "bafybeidmek4forkztfl2oqcys4xjlittfde2lqerqz6wei3gaxxni2wfjm", "protocol/valory/acn_data_share/0.1.0": "bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq", "protocol/valory/websocket_client/0.1.0": "bafybeih43mnztdv3v2hetr2k3gezg7d3yj4ur7cxdvcyaqhg65e52s5sf4", "contract/valory/agent_mech/0.1.0": "bafybeidsau5x2vjofpcdzxkg7airwkrdag65ohtxcby2ut27tfjizgnrnm", @@ -26,11 +30,11 @@ "skill/valory/contract_subscription/0.1.0": "bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4", "skill/valory/mech_abci/0.1.0": "bafybeighsfwef33msfzkxbkkikfyvt3beijqlua37x667a6kfjcwzfug3u", "skill/valory/task_submission_abci/0.1.0": "bafybeidmkzpqpvyol3636eeprkloy3z3t2nipmwvu6da3dtk2q4tjlab6u", - "skill/valory/task_execution/0.1.0": "bafybeiapj6qhwzqrr7biebnwn2e2ugqsby2ml7z25fbhmdjnf3u4yp6bem", + "skill/valory/task_execution/0.1.0": "bafybeiao3k5pwzt63fmn5q5vqofms6qmzy3f5x35wsr552gzhiwt4gelxu", "skill/valory/websocket_client/0.1.0": "bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta", "skill/valory/subscription_abci/0.1.0": "bafybeidoqeznyhbh3znaqbfdnftzq6fdh77m35qgftdwz46nz2iwda4yam", - "agent/valory/mech/0.1.0": "bafybeigxga6vdyldycqw4njoovwtzizrwn7dnxrxrsmdvwufvyaxjx7zdu", - "service/valory/mech/0.1.0": "bafybeib6naivoysmeqjdsex42myxbsunjsmvyugwpdkddqbvefufzjxkwq" + "agent/valory/mech/0.1.0": "bafybeihzgbm35ykx3xvlbfbvqzhmttz3bec4ehh2wcaqi2d7pg6wrjme6e", + "service/valory/mech/0.1.0": "bafybeieyecbpgeo57xrklghgdxikur5uaop3xdqpcw3py6q7osgscuwdrm" }, "third_party": { "protocol/valory/default/1.0.0": "bafybeifqcqy5hfbnd7fjv4mqdjrtujh2vx3p2xhe33y67zoxa6ph7wdpaq", diff --git a/packages/valory/agents/mech/aea-config.yaml b/packages/valory/agents/mech/aea-config.yaml index 3e8ea603..e545a579 100644 --- a/packages/valory/agents/mech/aea-config.yaml +++ b/packages/valory/agents/mech/aea-config.yaml @@ -42,7 +42,7 @@ skills: - valory/registration_abci:0.1.0:bafybeiek7zcsxbucjwzgqfftafhfrocvc7q4yxllh2q44jeemsjxg3rcfm - valory/reset_pause_abci:0.1.0:bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam - valory/subscription_abci:0.1.0:bafybeidoqeznyhbh3znaqbfdnftzq6fdh77m35qgftdwz46nz2iwda4yam -- valory/task_execution:0.1.0:bafybeiapj6qhwzqrr7biebnwn2e2ugqsby2ml7z25fbhmdjnf3u4yp6bem +- valory/task_execution:0.1.0:bafybeiao3k5pwzt63fmn5q5vqofms6qmzy3f5x35wsr552gzhiwt4gelxu - valory/task_submission_abci:0.1.0:bafybeidmkzpqpvyol3636eeprkloy3z3t2nipmwvu6da3dtk2q4tjlab6u - valory/termination_abci:0.1.0:bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44 - valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq diff --git a/packages/valory/customs/prediction_request_claude/component.yaml b/packages/valory/customs/prediction_request_claude/component.yaml index 2cfaadea..5ccbe036 100644 --- a/packages/valory/customs/prediction_request_claude/component.yaml +++ b/packages/valory/customs/prediction_request_claude/component.yaml @@ -22,6 +22,6 @@ dependencies: readability-lxml: version: ==0.8.1 anthropic: - version: ==0.3.11 + version: ==0.21.3 tiktoken: version: ==0.5.1 diff --git a/packages/valory/services/mech/service.yaml b/packages/valory/services/mech/service.yaml index 68c12f44..bb0f65ba 100644 --- a/packages/valory/services/mech/service.yaml +++ b/packages/valory/services/mech/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeif7ia4jdlazy6745ke2k2x5yoqlwsgwr6sbztbgqtwvs3ndm2p7ba fingerprint_ignore_patterns: [] -agent: valory/mech:0.1.0:bafybeigxga6vdyldycqw4njoovwtzizrwn7dnxrxrsmdvwufvyaxjx7zdu +agent: valory/mech:0.1.0:bafybeihzgbm35ykx3xvlbfbvqzhmttz3bec4ehh2wcaqi2d7pg6wrjme6e number_of_agents: 4 deployment: agent: diff --git a/packages/valory/skills/task_execution/skill.yaml b/packages/valory/skills/task_execution/skill.yaml index 535275f5..271846b3 100644 --- a/packages/valory/skills/task_execution/skill.yaml +++ b/packages/valory/skills/task_execution/skill.yaml @@ -115,7 +115,7 @@ dependencies: tiktoken: version: ==0.5.1 anthropic: - version: ==0.3.11 + version: ==0.21.3 eth-abi: version: ==4.0.0 is_abstract: false From beb203d64138a18bdb195ac32924281476173612 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 14:00:21 +0200 Subject: [PATCH 08/10] chore: generators --- .../customs/prediction_url_cot_claude/component.yaml | 2 +- packages/packages.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/napthaai/customs/prediction_url_cot_claude/component.yaml b/packages/napthaai/customs/prediction_url_cot_claude/component.yaml index c0d57578..69a73077 100644 --- a/packages/napthaai/customs/prediction_url_cot_claude/component.yaml +++ b/packages/napthaai/customs/prediction_url_cot_claude/component.yaml @@ -30,4 +30,4 @@ dependencies: numpy: version: '>=1.19.0' pydantic: - version: '>=1.9.0,<3' \ No newline at end of file + version: '>=1.9.0,<3' diff --git a/packages/packages.json b/packages/packages.json index 98d3f3d1..f9a51052 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -17,10 +17,10 @@ "custom/napthaai/prediction_request_reasoning/0.1.0": "bafybeiexotxqt3o4mmbjr7gp74hhcsbfhvldlrcqbj573oliljqxeilh44", "custom/valory/prepare_tx/0.1.0": "bafybeifnanct3pkknaxiffm7cq4rgenfii4grf3srhlj5clmwtxmvmyaay", "custom/valory/short_maker/0.1.0": "bafybeif63rt4lkopu3rc3l7sg6tebrrwg2lxqufjx6dx4hoda5yzax43fa", - "custom/napthaai/prediction_url_cot/0.1.0": "bafybeih7lymoeb4paypjbybeejrajqzllevsmjmlv7yfbbdtxzcka22wri", - "custom/napthaai/prediction_url_cot_claude/0.1.0": "bafybeiciilmwpmra235umdpj5swprrugtdi5pz7jwikngnqgmghpqajbqe", - "custom/napthaai/prediction_request_reasoning_claude/0.1.0": "bafybeiffeo3t2i7nroc7uevuqrku7htriaibvw4g6heitxld2imf2o4tui", - "custom/napthaai/prediction_request_rag_claude/0.1.0": "bafybeidmek4forkztfl2oqcys4xjlittfde2lqerqz6wei3gaxxni2wfjm", + "custom/napthaai/prediction_url_cot/0.1.0": "bafybeifaypee6w72yn4bryt5vpe3mxpe756e5n2rqri4xuazqj5k7bdmem", + "custom/napthaai/prediction_url_cot_claude/0.1.0": "bafybeifq46nxdfq6uxaed5ljk3bo3tanfqoqkw7fqz5nk3zwmuw3solhym", + "custom/napthaai/prediction_request_reasoning_claude/0.1.0": "bafybeib3gpssxbykqgbgn6pwovobxvxyaufh2wndeabpqsgqrlmku57wbu", + "custom/napthaai/prediction_request_rag_claude/0.1.0": "bafybeib7pslkmh5pthp2u5627wqnyubc6gqgs54kjkuxnk4wifash6hini", "protocol/valory/acn_data_share/0.1.0": "bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq", "protocol/valory/websocket_client/0.1.0": "bafybeih43mnztdv3v2hetr2k3gezg7d3yj4ur7cxdvcyaqhg65e52s5sf4", "contract/valory/agent_mech/0.1.0": "bafybeidsau5x2vjofpcdzxkg7airwkrdag65ohtxcby2ut27tfjizgnrnm", From 41dd06e5ee27a1b7f8e27d60e398f790e8c6681c Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 14:04:12 +0200 Subject: [PATCH 09/10] chore: liccheck --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 25eb7d00..22119e5d 100644 --- a/tox.ini +++ b/tox.ini @@ -540,3 +540,5 @@ hypothesis: ==6.21.6 chroma-hnswlib: ==0.7.3 ; sub-dep of chromadb, has Apache 2.0 Licence https://github.com/apache/pulsar-client-python/blob/main/LICENSE pulsar-client: ==3.4.0 +; sub-dep of chromadb, has Apache 2.0 Licence https://github.com/replicate/replicate-python/blob/main/LICENSE +replicate: ==0.15.7 From ed344233faf352b4f7c004df1086e8933b92e0a1 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 8 Apr 2024 16:47:34 +0200 Subject: [PATCH 10/10] fix: cot tools entry point --- packages/napthaai/customs/prediction_url_cot/component.yaml | 2 +- .../napthaai/customs/prediction_url_cot_claude/component.yaml | 2 +- packages/packages.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/napthaai/customs/prediction_url_cot/component.yaml b/packages/napthaai/customs/prediction_url_cot/component.yaml index d70521d9..766e4b68 100644 --- a/packages/napthaai/customs/prediction_url_cot/component.yaml +++ b/packages/napthaai/customs/prediction_url_cot/component.yaml @@ -9,7 +9,7 @@ fingerprint: __init__.py: bafybeiflni5dkn5fqe7fnu4lgbqxzfrgochhqfbgzwz3vlf5grijp3nkpm prediction_url_cot.py: bafybeiczvut645b7xma2x6ivadhdbbqrvwusjoczidv2bwfbhidazshlfu fingerprint_ignore_patterns: [] -entry_point: prediction_request_reasoning_claude.py +entry_point: prediction_url_cot.py callable: run dependencies: google-api-python-client: diff --git a/packages/napthaai/customs/prediction_url_cot_claude/component.yaml b/packages/napthaai/customs/prediction_url_cot_claude/component.yaml index 69a73077..a21cb5f1 100644 --- a/packages/napthaai/customs/prediction_url_cot_claude/component.yaml +++ b/packages/napthaai/customs/prediction_url_cot_claude/component.yaml @@ -9,7 +9,7 @@ fingerprint: __init__.py: bafybeicctw7lsy7tuykskh3elqprgswn3hyivjpvlj7l33pj7imvgyc2ma prediction_url_cot_claude.py: bafybeif3xiehvlodmuolwoobrqtliqhmpcaao5zyynkbawivmarnif3esi fingerprint_ignore_patterns: [] -entry_point: prediction_request_reasoning_claude.py +entry_point: prediction_url_cot_claude.py callable: run dependencies: google-api-python-client: diff --git a/packages/packages.json b/packages/packages.json index f9a51052..500f41be 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -17,8 +17,8 @@ "custom/napthaai/prediction_request_reasoning/0.1.0": "bafybeiexotxqt3o4mmbjr7gp74hhcsbfhvldlrcqbj573oliljqxeilh44", "custom/valory/prepare_tx/0.1.0": "bafybeifnanct3pkknaxiffm7cq4rgenfii4grf3srhlj5clmwtxmvmyaay", "custom/valory/short_maker/0.1.0": "bafybeif63rt4lkopu3rc3l7sg6tebrrwg2lxqufjx6dx4hoda5yzax43fa", - "custom/napthaai/prediction_url_cot/0.1.0": "bafybeifaypee6w72yn4bryt5vpe3mxpe756e5n2rqri4xuazqj5k7bdmem", - "custom/napthaai/prediction_url_cot_claude/0.1.0": "bafybeifq46nxdfq6uxaed5ljk3bo3tanfqoqkw7fqz5nk3zwmuw3solhym", + "custom/napthaai/prediction_url_cot/0.1.0": "bafybeif46dmf5vvp725u2msppcz7ixtm3z6t7czsywtqph7qpwuz3xb4wm", + "custom/napthaai/prediction_url_cot_claude/0.1.0": "bafybeibbnmnxumsu663q22ifp2iivy2i4cv3tmbtzyptsvna2xvw26pasi", "custom/napthaai/prediction_request_reasoning_claude/0.1.0": "bafybeib3gpssxbykqgbgn6pwovobxvxyaufh2wndeabpqsgqrlmku57wbu", "custom/napthaai/prediction_request_rag_claude/0.1.0": "bafybeib7pslkmh5pthp2u5627wqnyubc6gqgs54kjkuxnk4wifash6hini", "protocol/valory/acn_data_share/0.1.0": "bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq",