| الدالة | الوظيفة |
|---|---|
| (د) | تبادل واحد: رسالتك في، والإجابة خارج. |
| (ب) (ب) (ب) (ب) | يُنهي التشغيل الحالي. |
| % | التغييرات في النمط، في منتصف التشغيل، بما في ذلك الكوادر الفرعية. |
| (أ) 0 | يلخص المحادثة الآن |
| انت حصل تاريخ | المحادثة، في شكل عرض. |
| نقاط التفتيش (( | حيث يمكنك العودة إلى. |
| يعود إلى رسالة | |
| (أ) | يزيل الجلسة. |
const agent = api.agents.create({ runtime: "local", machine: pc, model, memory: true });
const result = await agent.run({
message: "Read the notes and list what is unfinished.",
onEvent: (e) => { if (e.type === "text_delta") process.stdout.write(e.delta); },
});
console.log(agent.usage, agent.context.tokens, result.stopReason);agent = api.agents.create(runtime="local", machine=pc, model=model, memory=True)
result = agent.run(
message="Read the notes and list what is unfinished.",
on_event=lambda e: print(e["text"]) if e["type"] == "text" else None,
)
print(agent.usage, agent.context["tokens"], result["stopReason"])هو تبادل واحد، لا تنفيذ واحد
فهو يأخذ رسالتك ، حلقاتك حتى يتوقف النموذج عن طلب الأدوات ، ويرجع ، ويعاود الاتصال بها مرة اخرى يستمر في نفس المحادثة ، فالموضوع يحمل التاريخ .
هذا الكائن قابل لإعادة الاستخدام، وليس متزامناً
واحد في كل مرة
A ثانية ركض بينما هو بوصة طيران نفس رسالة قائمة قائمة و استخدام الأول أو بناء a ثانية وكيل.
يمكنك قراءة حالتها أثناء عملها
usage, context, todos, mode and messages are live. An interface can poll them, or listen to events, which is cheaper and more precise.