Skip to content

Conversation

@kongzii
Copy link
Collaborator

@kongzii kongzii commented May 19, 2025

No description provided.

@kongzii kongzii changed the base branch from gabriel/categorical-markets to main May 22, 2025 09:13
agent: Agent | None,
include_reasoning: bool = False,
) -> CategoricalPrediction:
agent = agent or Agent(model="gpt-3.5-turbo-0125", model_settings=ModelSettings(temperature=0.7))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this model?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just copy pasted the defaults there were previously from Agentcoin's team.

Note that in PMA, model is overridden, so it doesn't really matter for us.

Copy link
Collaborator

@TS9001 TS9001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just nitpicks

Comment on lines +391 to +396
class CategoricalPrediction(TypedDict):
decision: str
probabilities: Dict[str, Probability]
confidence: float
info_utility: float
reasoning: Optional[str]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rhetorical question: would it be somehow possible to start using pyedantic here? (understand why you did not used it)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I just followed Agentcoin's convention in this repo. But if we agree on refactoring this, I don't think they will have any problems with that (given that much bigger changes were implemented already anyway 😄)

Also PydanticAI isn't used to its full potential here, we could do something like:

agent = Agent(
    model,
    output=CategoricalPrediction
)

Instead of parsing it manually, but I didn't want to break the current flow (just to be sure to not break performance of these agents).

But again if we agree on refactoring, and test out that performance remains +/- the same, we can.

@kongzii kongzii merged commit eec186c into main May 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants