Skip to content

Commit

Permalink
Add prediction mech as a git submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
evangriffiths committed Apr 15, 2024
1 parent 6f809e0 commit f336af8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 608 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "prediction_market_agent/agents/microchain_agent/mech/mech"]
path = prediction_market_agent/agents/microchain_agent/mech/mech
url = https://github.com/valory-xyz/mech.git
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ show_traceback = True
disallow_incomplete_defs = True
disallow_untyped_defs = True
ignore_missing_imports = True
exclude = prediction_market_agent/agents/microchain_agent/mech/mech/

# See https://github.com/python/mypy/issues/3905#issuecomment-421065323
# We don't want to ignore all missing imports as we want to catch those in our own code
Expand Down
7 changes: 4 additions & 3 deletions prediction_market_agent/agents/microchain_agent/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
OmenSubgraphHandler,
)

from prediction_market_agent.agents.microchain_agent.mech import (
from prediction_market_agent.agents.microchain_agent.mech.mech.packages.polywrap.customs.prediction_with_research_report import (
prediction_with_research_report,
)
from prediction_market_agent.agents.microchain_agent.utils import (
Expand Down Expand Up @@ -170,7 +170,7 @@ def __call__(self, question: str) -> str:
"tavily": tavily_api_key,
},
}
response = prediction_with_research_report.run(**kwargs) # type: ignore
response = prediction_with_research_report.run(**kwargs)
result = completion_str_to_json(str(response[0]))
return str(MechResult.model_validate(result).p_yes)

Expand Down Expand Up @@ -349,7 +349,8 @@ def __call__(self, user_address: str) -> list[OmenUserPosition]:
MARKET_FUNCTIONS: list[type[MarketFunction]] = [
GetMarkets,
GetMarketProbability,
PredictPropabilityForQuestion,
# PredictPropabilityForQuestion,
PredictPropabilityForQuestionLocal,
GetBalance,
BuyYes,
BuyNo,
Expand Down
1 change: 1 addition & 0 deletions prediction_market_agent/agents/microchain_agent/mech/mech
Submodule mech added at 017954
Loading

0 comments on commit f336af8

Please sign in to comment.