mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-12-21 04:42:19 -06:00
Support chaining for tool callbacks
(before/after) tool callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync. PiperOrigin-RevId: 756526507
This commit is contained in:
committed by
Copybara-Service
parent
0299020cc4
commit
2cbbf88135
@@ -83,7 +83,7 @@ async def main():
|
||||
print('------------------------------------')
|
||||
await run_prompt(session_11, 'Hi')
|
||||
await run_prompt(session_11, 'Roll a die with 100 sides')
|
||||
await run_prompt(session_11, 'Roll a die again.')
|
||||
await run_prompt(session_11, 'Roll a die again with 100 sides.')
|
||||
await run_prompt(session_11, 'What numbers did I got?')
|
||||
await run_prompt_bytes(session_11, 'Hi bytes')
|
||||
print(
|
||||
@@ -130,7 +130,7 @@ def main_sync():
|
||||
print('------------------------------------')
|
||||
run_prompt(session_11, 'Hi')
|
||||
run_prompt(session_11, 'Roll a die with 100 sides.')
|
||||
run_prompt(session_11, 'Roll a die again.')
|
||||
run_prompt(session_11, 'Roll a die again with 100 sides.')
|
||||
run_prompt(session_11, 'What numbers did I got?')
|
||||
end_time = time.time()
|
||||
print('------------------------------------')
|
||||
|
||||
Reference in New Issue
Block a user