We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dc131ff + 45d5b9e commit b32f2a4Copy full SHA for b32f2a4
1_python/2_agent/act.md
@@ -99,7 +99,10 @@ The following code creates a conversation loop with an LLM agent that can create
99
return "Error: {exc!r}"
100
return "File created."
101
102
- def print_fragment(fragment, *args):
+ def print_fragment(fragment, round_index=0):
103
+ # .act() supplies the round index as the second parameter
104
+ # Setting a default value means the callback is also
105
+ # compatible with .complete() and .respond().
106
print(fragment.content, end="", flush=True)
107
108
model = lms.llm()
0 commit comments