يمكنك إنشاء إجراءات مخصصة في Gorbit باستخدام مواصفات OpenAPI 3.0 أو 3.1 لواجهة API.
هذا يمكّن وكلاء الذكاء الاصطناعي الخاصين بك من التفاعل مع واجهات REST API وتشغيل سير العمل في الأنظمة الخارجية.
ضمّن فقط نقاط النهاية التي تريد أن يستدعيها وكيلك في مواصفات OpenAPI.
أزل أي نقاط نهاية لا تريد للوكيل الوصول إليها.
إعداد الإجراءات المخصصة
انتقل إلى لوحة الإجراءات
انقر على أيقونة ملف المستخدم الخاص بك واختر لوحة الإدارة ، ثم انقر على علامة تبويب الإجراءات في الشريط الجانبي.
إنشاء إجراء OpenAPI
انقر على من مخطط OpenAPI تحت إنشاء إجراء . الصق مواصفات OpenAPI الخاصة بك وقم بتكوين أي مصادقة أو رؤوس مطلوبة.
مثال
يمكن استخدام مواصفات OpenAPI أدناه لإنشاء إجراء مخصص لجلب وإنشاء وكلاء في Gorbit.
{
"openapi" : "3.1.0" ,
"info" : {
"title" : "Agents API" ,
"version" : "1.0.0" ,
"description" : "Minimal OpenAPI schema for creating and fetching agents in Gorbit"
},
"servers" : [
{
"url" : "https://cloud.gorbit.app/api"
}
],
"paths" : {
"/persona" : {
"post" : {
"summary" : "Create Agent (Persona)" ,
"operationId" : "create_persona" ,
"requestBody" : {
"required" : true ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"name" : { "type" : "string" },
"description" : { "type" : "string" },
"document_set_ids" : {
"type" : "array" ,
"items" : { "type" : "integer" }
},
"num_chunks" : { "type" : "number" },
"is_public" : { "type" : "boolean" },
"recency_bias" : {
"type" : "string" ,
"enum" : [ "favor_recent" , "base_decay" , "no_decay" , "auto" ]
},
"llm_filter_extraction" : { "type" : "boolean" },
"llm_relevance_filter" : { "type" : "boolean" },
"tool_ids" : {
"type" : "array" ,
"items" : { "type" : "integer" }
},
"system_prompt" : { "type" : "string" },
"task_prompt" : { "type" : "string" },
"datetime_aware" : { "type" : "boolean" }
},
"required" : [
"name" ,
"description" ,
"document_set_ids" ,
"num_chunks" ,
"is_public" ,
"recency_bias" ,
"llm_filter_extraction" ,
"llm_relevance_filter" ,
"tool_ids" ,
"system_prompt" ,
"task_prompt" ,
"datetime_aware"
]
}
}
}
},
"responses" : {
"200" : { "description" : "Created" }
}
}
},
"/persona/{persona_id}" : {
"get" : {
"summary" : "Get Agent (Persona) By ID" ,
"operationId" : "get_persona" ,
"parameters" : [
{
"name" : "persona_id" ,
"in" : "path" ,
"required" : true ,
"schema" : { "type" : "integer" }
}
],
"responses" : {
"200" : { "description" : "OK" }
}
}
}
}
}
See all 88 lines