-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added account for cost info #360
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super clean!
paperqa/agents/env.py
Outdated
@@ -151,21 +151,22 @@ def export_frame(self) -> Frame: | |||
async def step( | |||
self, action: ToolRequestMessage | |||
) -> tuple[list[Message], float, bool, bool]: | |||
|
|||
# add usage for actions that have usage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# add usage for actions that have usage | |
# add usage if the action has usage |
There's just one action
@@ -239,6 +239,12 @@ class AgentSettings(BaseModel): | |||
default="gpt-4o-2024-08-06", | |||
description="Model to use for agent", | |||
) | |||
|
|||
agent_llm_config: dict | None = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few lines below this there is an agent_config
that is basically kwargs for the Agent
/ToolSelector
Do you mind adjusting their names and/or descriptions so it's clear what is the difference between agent_llm_config
and agent_config
? They're similar enough in naming right now I think we should fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Tried to make the descriptions more clear in distinction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your efforts! Being honest, it's still not quite intuitive enough for my tastes, but for now it's good.
I think we can make this clearer by moving to_aviary_tool_selector
and to_ldp_agent
to be methods of AgentSettings
, since all their information is derived from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
@@ -239,6 +239,12 @@ class AgentSettings(BaseModel): | |||
default="gpt-4o-2024-08-06", | |||
description="Model to use for agent", | |||
) | |||
|
|||
agent_llm_config: dict | None = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your efforts! Being honest, it's still not quite intuitive enough for my tastes, but for now it's good.
I think we can make this clearer by moving to_aviary_tool_selector
and to_ldp_agent
to be methods of AgentSettings
, since all their information is derived from there.
Waiting on Future-House/aviary#28
Checks messages from agent for usage info and if present, will attach to current answer objects.