prediction-market-agent-tooling 0.13.0__tar.gz → 0.13.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/PKG-INFO +5 -4
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/benchmark/utils.py +1 -1
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/agent_market.py +1 -1
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/categorize.py +1 -2
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/omen/omen.py +8 -2
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/is_predictable.py +1 -1
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/pyproject.toml +6 -5
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/README.md +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/abis/omen_dxdao.abi.json +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/abis/omen_fpmm.abi.json +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/abis/omen_fpmm_conditionaltokens.abi.json +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/abis/omen_fpmm_factory.abi.json +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/abis/omen_kleros.abi.json +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/abis/omen_oracle.abi.json +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/abis/omen_realitio.abi.json +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/abis/wxdai.abi.json +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/benchmark/__init__.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/benchmark/agents.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/benchmark/benchmark.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/config.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/deploy/agent.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/deploy/agent_example.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/deploy/constants.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/deploy/gcp/deploy.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/deploy/gcp/utils.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/gtypes.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/data_models.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/manifold/__init__.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/manifold/api.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/manifold/data_models.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/manifold/manifold.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/manifold/utils.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/markets.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/omen/__init__.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/omen/data_models.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/omen/omen_contracts.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/omen/omen_replicate.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/omen/omen_resolve_replicated.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/polymarket/api.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/polymarket/data_models.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/polymarket/data_models_web.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/polymarket/polymarket.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/markets/polymarket/utils.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/monitor/markets/manifold.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/monitor/markets/omen.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/monitor/markets/polymarket.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/monitor/monitor.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/monitor/monitor_app.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/py.typed +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/balances.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/betting_strategies/kelly_criterion.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/betting_strategies/market_moving.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/betting_strategies/minimum_bet_to_win.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/betting_strategies/stretch_bet_between.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/cache.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/contract.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/gnosis_rpc.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/google.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/hexbytes_custom.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/parallelism.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/singleton.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/utils.py +0 -0
- {prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/prediction_market_agent_tooling/tools/web3_utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: prediction-market-agent-tooling
|
3
|
-
Version: 0.13.
|
3
|
+
Version: 0.13.2
|
4
4
|
Summary: Tools to benchmark, deploy and monitor prediction market agents.
|
5
5
|
Author: Gnosis
|
6
6
|
Requires-Python: >=3.10,<3.12
|
@@ -11,7 +11,7 @@ Provides-Extra: google
|
|
11
11
|
Provides-Extra: langchain
|
12
12
|
Requires-Dist: autoflake (>=2.2.1,<3.0.0)
|
13
13
|
Requires-Dist: cron-validator (>=1.0.8,<2.0.0)
|
14
|
-
Requires-Dist: eth-typing (>=
|
14
|
+
Requires-Dist: eth-typing (>=3.0.0,<4.0.0)
|
15
15
|
Requires-Dist: functions-framework (>=3.5.0,<4.0.0)
|
16
16
|
Requires-Dist: google-api-python-client (==2.95.0) ; extra == "google"
|
17
17
|
Requires-Dist: google-cloud-functions (>=1.16.0,<2.0.0)
|
@@ -20,8 +20,9 @@ Requires-Dist: google-cloud-secret-manager (>=2.18.2,<3.0.0)
|
|
20
20
|
Requires-Dist: isort (>=5.13.2,<6.0.0)
|
21
21
|
Requires-Dist: langchain (>=0.1.9,<0.2.0) ; extra == "langchain"
|
22
22
|
Requires-Dist: langchain-community (>=0.0.19)
|
23
|
-
Requires-Dist: langchain-openai (>=0.0.
|
23
|
+
Requires-Dist: langchain-openai (>=0.0.5,<0.0.6) ; extra == "langchain"
|
24
24
|
Requires-Dist: loguru (>=0.7.2,<0.8.0)
|
25
|
+
Requires-Dist: mech-client (>=0.2.13,<0.3.0)
|
25
26
|
Requires-Dist: numpy (>=1.26.4,<2.0.0)
|
26
27
|
Requires-Dist: pydantic (>=2.6.1,<3.0.0)
|
27
28
|
Requires-Dist: pydantic-settings (>=2.1.0,<3.0.0)
|
@@ -32,7 +33,7 @@ Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
32
33
|
Requires-Dist: tqdm (>=4.66.2,<5.0.0)
|
33
34
|
Requires-Dist: typer (>=0.9.0,<0.10.0)
|
34
35
|
Requires-Dist: types-pytz (>=2024.1.0.20240203,<2025.0.0.0)
|
35
|
-
Requires-Dist: types-requests (>=2.31.0.
|
36
|
+
Requires-Dist: types-requests (>=2.31.0.0,<3.0.0.0)
|
36
37
|
Requires-Dist: web3 (>=6.15.1,<7.0.0)
|
37
38
|
Description-Content-Type: text/markdown
|
38
39
|
|
@@ -45,7 +45,7 @@ class AgentMarket(BaseModel):
|
|
45
45
|
outcomes: list[str]
|
46
46
|
resolution: Resolution | None
|
47
47
|
created_time: datetime | None
|
48
|
-
close_time: datetime
|
48
|
+
close_time: datetime | None
|
49
49
|
p_yes: Probability
|
50
50
|
url: str
|
51
51
|
volume: Decimal | None # Should be in currency of `currency` above.
|
@@ -3,7 +3,6 @@ from langchain.schema.output_parser import StrOutputParser
|
|
3
3
|
from langchain_openai import ChatOpenAI
|
4
4
|
|
5
5
|
from prediction_market_agent_tooling.config import APIKeys
|
6
|
-
from prediction_market_agent_tooling.gtypes import secretstr_to_v1_secretstr
|
7
6
|
|
8
7
|
|
9
8
|
def infer_category(
|
@@ -22,7 +21,7 @@ Write only the category itself, nothing else.
|
|
22
21
|
prompt
|
23
22
|
| ChatOpenAI(
|
24
23
|
model=model,
|
25
|
-
api_key=
|
24
|
+
api_key=APIKeys().openai_api_key.get_secret_value(),
|
26
25
|
)
|
27
26
|
| StrOutputParser()
|
28
27
|
)
|
@@ -75,6 +75,8 @@ class OmenAgentMarket(AgentMarket):
|
|
75
75
|
market_maker_contract_address_checksummed: ChecksumAddress
|
76
76
|
condition: Condition
|
77
77
|
finalized_time: datetime | None
|
78
|
+
created_time: datetime
|
79
|
+
close_time: datetime
|
78
80
|
|
79
81
|
INVALID_MARKET_ANSWER: HexStr = HexStr(
|
80
82
|
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
@@ -310,14 +312,18 @@ def binary_omen_buy_outcome_tx(
|
|
310
312
|
|
311
313
|
|
312
314
|
def omen_sell_outcome_tx(
|
313
|
-
amount: xDai,
|
315
|
+
amount: xDai, # The xDai value of shares to sell.
|
314
316
|
from_private_key: PrivateKey,
|
315
317
|
market: OmenAgentMarket,
|
316
318
|
outcome: str,
|
317
319
|
auto_withdraw: bool,
|
318
320
|
) -> None:
|
319
321
|
"""
|
320
|
-
Sells the given
|
322
|
+
Sells the given xDai value of shares corresponding to the given outcome in
|
323
|
+
the given market.
|
324
|
+
|
325
|
+
The number of shares sold will depend on the share price at the time of the
|
326
|
+
transaction.
|
321
327
|
"""
|
322
328
|
amount_wei = xdai_to_wei(amount)
|
323
329
|
|
@@ -42,7 +42,7 @@ def is_predictable_binary(
|
|
42
42
|
|
43
43
|
prompt = ChatPromptTemplate.from_template(template=prompt_template)
|
44
44
|
messages = prompt.format_messages(question=question)
|
45
|
-
completion = llm(messages, max_tokens=512).content
|
45
|
+
completion = str(llm(messages, max_tokens=512).content)
|
46
46
|
|
47
47
|
try:
|
48
48
|
decision = completion.lower().rsplit("decision", 1)[1]
|
{prediction_market_agent_tooling-0.13.0 → prediction_market_agent_tooling-0.13.2}/pyproject.toml
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "prediction-market-agent-tooling"
|
3
|
-
version = "0.13.
|
3
|
+
version = "0.13.2"
|
4
4
|
description = "Tools to benchmark, deploy and monitor prediction market agents."
|
5
5
|
authors = ["Gnosis"]
|
6
6
|
readme = "README.md"
|
@@ -12,14 +12,14 @@ sell_omen = "scripts.bet_omen:sell"
|
|
12
12
|
[tool.poetry.dependencies]
|
13
13
|
python = ">=3.10,<3.12"
|
14
14
|
typer = "^0.9.0"
|
15
|
-
types-requests = "^2.31.0.
|
15
|
+
types-requests = "^2.31.0.0"
|
16
16
|
google-cloud-functions = "^1.16.0"
|
17
17
|
google-cloud-resource-manager = "^1.12.0"
|
18
18
|
functions-framework = "^3.5.0"
|
19
19
|
cron-validator = "^1.0.8"
|
20
20
|
pydantic = "^2.6.1"
|
21
21
|
web3 = "^6.15.1"
|
22
|
-
eth-typing = "^
|
22
|
+
eth-typing = "^3.0.0"
|
23
23
|
pydantic-settings = "^2.1.0"
|
24
24
|
numpy = "^1.26.4"
|
25
25
|
autoflake = "^2.2.1"
|
@@ -32,10 +32,11 @@ tabulate = "^0.9.0"
|
|
32
32
|
types-pytz = "^2024.1.0.20240203"
|
33
33
|
google-cloud-secret-manager = "^2.18.2"
|
34
34
|
langchain = { version = "^0.1.9", optional = true}
|
35
|
-
langchain-openai = { version = "^0.0.
|
35
|
+
langchain-openai = { version = "^0.0.5", optional = true}
|
36
36
|
google-api-python-client = { version = "2.95.0", optional = true}
|
37
37
|
subgrounds = "^1.8.1"
|
38
38
|
loguru = "^0.7.2"
|
39
|
+
mech-client = "^0.2.13"
|
39
40
|
|
40
41
|
[tool.poetry.extras]
|
41
42
|
langchain = ["langchain", "langchain-openai"]
|
@@ -43,7 +44,7 @@ google = ["google-api-python-client"]
|
|
43
44
|
|
44
45
|
[tool.poetry.group.dev.dependencies]
|
45
46
|
pytest = "*"
|
46
|
-
mypy = "^1.
|
47
|
+
mypy = "^1.9.0"
|
47
48
|
black = "^23.12.1"
|
48
49
|
|
49
50
|
[build-system]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|