Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii committed Oct 2, 2024
1 parent d990150 commit a2dbf17
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions prediction_market_agent/agents/microchain_agent/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
from datetime import timedelta
from typing import Dict, Sequence

from prediction_market_agent_tooling.tools.utils import (
DatetimeUTC,
DatetimeUTCValidator,
check_not_none,
)
from prediction_market_agent_tooling.tools.utils import DatetimeUTC, check_not_none
from pydantic import BaseModel

from prediction_market_agent.agents.microchain_agent.answer_with_scenario import (
Expand All @@ -32,7 +28,7 @@ def __str__(self) -> str:


class DatedChatMessage(ChatMessage):
datetime_: DatetimeUTCValidator
datetime_: DatetimeUTC

@staticmethod
def from_long_term_memory(
Expand All @@ -51,7 +47,7 @@ def __str__(self) -> str:

class SimpleMemoryThinkThoroughly(BaseModel):
metadata: AnswerWithScenario
datetime_: DatetimeUTCValidator
datetime_: DatetimeUTC

@staticmethod
def from_long_term_memory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
from autogen.cache import Cache
from prediction_market_agent_tooling.markets.data_models import Bet
from prediction_market_agent_tooling.tools.langfuse_ import observe
from prediction_market_agent_tooling.tools.utils import (
DatetimeUTC,
DatetimeUTCValidator,
)
from prediction_market_agent_tooling.tools.utils import DatetimeUTC
from pydantic import BaseModel

from prediction_market_agent.agents.microchain_agent.memory import (
Expand Down Expand Up @@ -39,7 +36,7 @@ class BetInputPrompt(BaseModel):
title: str
boolean_outcome: bool
collateral_amount: float
creation_datetime: DatetimeUTCValidator
creation_datetime: DatetimeUTC

@staticmethod
def from_bet(bet: Bet) -> "BetInputPrompt":
Expand Down
4 changes: 2 additions & 2 deletions prediction_market_agent/agents/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
get_langfuse_langchain_config,
observe,
)
from prediction_market_agent_tooling.tools.utils import DatetimeUTC, to_utc_datetime
from prediction_market_agent_tooling.tools.utils import DatetimeUTC

from prediction_market_agent.agents.microchain_agent.memory import (
DatedChatMessage,
Expand Down Expand Up @@ -129,7 +129,7 @@ def get_event_date_from_question(question: str) -> DatetimeUTC | None:
).strip("'`\"")

try:
event_date = to_utc_datetime(event_date_str)
event_date = DatetimeUTC.to_datetime_utc(event_date_str)
except ValueError:
logger.error(
f"Could not extract event date from question `{question}`, got `{event_date_str}`."
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ poetry = "^1.7.1"
poetry-plugin-export = "^1.6.0"
functions-framework = "^3.5.0"
cron-validator = "^1.0.8"
prediction-market-agent-tooling = { git = "https://github.com/gnosis/prediction-market-agent-tooling.git", rev = "222c01cfcd202008f2f7a2fa83b00d17ef3fddae", extras = ["langchain", "google"] }
prediction-market-agent-tooling = { git = "https://github.com/gnosis/prediction-market-agent-tooling.git", rev = "afbb60fb82ac4f7e7536dcf21359e5fed36d300e", extras = ["langchain", "google"] }
pydantic-settings = "^2.1.0"
autoflake = "^2.2.1"
isort = "^5.13.2"
Expand All @@ -44,7 +44,7 @@ tavily-python = "^0.3.9"
microchain-python = { git = "https://github.com/galatolofederico/microchain.git", rev = "de75f1d4a073b7c54f824b409733f4f70d40a61b" }
pysqlite3-binary = {version="^0.5.2.post3", markers = "sys_platform == 'linux'"}
psycopg2-binary = "^2.9.9"
sqlmodel = "^0.0.21"
sqlmodel = "^0.0.22"
farcaster = "^0.7.11"
mech-client = "^0.2.15"
streamlit-extras = "^0.4.2"
Expand Down

0 comments on commit a2dbf17

Please sign in to comment.