Skip to content

Commit a7c2f08

Browse files
authored
feat: Use pydantic ai 0.2.0 (#48)
1 parent e858768 commit a7c2f08

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

lightblue_ai/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def run(
9696
async with self.agent.run_mcp_servers():
9797
result = await self.agent.run(user_prompt, message_history=message_history)
9898
if usage:
99-
usage.incr(result.usage(), requests=1)
99+
usage.incr(result.usage())
100100
return result
101101

102102
@asynccontextmanager
@@ -116,7 +116,7 @@ async def iter(
116116
):
117117
yield run
118118
if usage:
119-
usage.incr(run.usage(), requests=1)
119+
usage.incr(run.usage())
120120

121121
async def yield_response_event(self, run: AgentRun) -> AsyncIterator[HandleResponseEvent | AgentStreamEvent]:
122122
"""

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies = [
2929
"playwright>=1.51.0",
3030
"pluggy>=1.5.0",
3131
"pydantic>=2.11.1",
32-
"pydantic-ai>=0.1.8",
32+
"pydantic-ai>=0.2.0",
3333
"pydantic-settings>=2.8.1",
3434
"pymupdf4llm>=0.0.21",
3535
"python-dotenv>=1.1.0",

uv.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)