كيف يعمل استدعاء الأدوات
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
trace one tool call through the loop.
الموضوعات المخطط لها
- You send the model a list of tool definitions: name, description, JSON schema of parameters.
- The model replies with a tool call (name plus arguments), not with an executed result.
- Your code validates the arguments, decides whether to run, runs the tool, and sends the result back.
- The model then writes the final answer, or proposes another call.
- Arguments are untrusted input, exactly like an HTTP request body.
تفاصيل المخطط المبدئي
عرض عملي
sequence: user question → model returns get_order_status{orderId:42} → app validates and calls orders → result returned to model → final answer.
اختبر فهمك
Does the model call your service directly?
أظهر الإجابة
No; your application does, after validation.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.