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.
1 parent 37eb230 commit 21ba9e5Copy full SHA for 21ba9e5
src/content/changelog/agents/2025-03-17-npm-i-agents.mdx
@@ -62,7 +62,7 @@ import { Agent, callable } from 'agents';
62
// TODO: replace this with a real example
63
class MyAgent extends Agent {
64
@callable()
65
- async getHistory(limit = 5: number): Promise<string[]> {
+ async getHistory(limit: number = 10): Promise<string[]> {
66
// Allow a client to directly fetch chat history
67
return this.state.chatHistory.slice(-limit)
68
}
0 commit comments