mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Removed context parameter from call_next (#3829)
This commit is contained in:
committed by
GitHub
Unverified
parent
38f22ef006
commit
1fdc4be88d
@@ -119,7 +119,7 @@ from agent_framework import Agent, AgentMiddleware, AgentContext
|
||||
class LoggingMiddleware(AgentMiddleware):
|
||||
async def process(self, context: AgentContext, call_next) -> None:
|
||||
print(f"Input: {context.messages}")
|
||||
await call_next(context)
|
||||
await call_next()
|
||||
print(f"Output: {context.result}")
|
||||
|
||||
agent = Agent(..., middleware=[LoggingMiddleware()])
|
||||
|
||||
Reference in New Issue
Block a user