Skip to main content

ChatbotToolDeclaration

Trait ChatbotToolDeclaration 

Source
pub trait ChatbotToolDeclaration {
    const NAME: &'static str;
    const CATEGORY: ToolCategory;

    // Required methods
    fn offer_requirements(
        user_context: &ChatbotTurnContext,
    ) -> Vec<ToolRequirement>;
    fn get_tool_definition() -> AzureLLMFunctionToolDefinition;
}
Expand description

What a tool is called and how it is declared to the LLM.

Shared by the tools the server runs (ChatbotTool) and the tools the client answers (ClientChatbotTool): the two differ in who produces the output, not in how the tool is advertised.

Required Associated Constants§

Source

const NAME: &'static str

The name the LLM calls this tool by. The registries dispatch on it and Self::get_tool_definition must advertise it, so the two cannot drift apart.

Source

const CATEGORY: ToolCategory

Which configured category of tools this belongs to. A chatbot offers it only if its configuration lists this category; the caller must still be authorized for it.

Required Methods§

Source

fn offer_requirements(user_context: &ChatbotTurnContext) -> Vec<ToolRequirement>

What the caller must be allowed to do against the turn itself for this tool to be offered to the LLM at all.

Coarse on purpose: no call has named a target yet, so this asks about the chatbot’s own course (or global permissions for a chatbot with none). The binding check is the tool’s call_requirements, against what the call actually targets. Empty for a tool the chatbot’s own access check already covers.

Source

fn get_tool_definition() -> AzureLLMFunctionToolDefinition

The definition sent to the LLM as part of a chat request. Azure rejects it unless strict is true and the parameter schema forbids additional properties.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ChatbotToolDeclaration for EditUserAccountTool

Source§

const NAME: &'static str = "edit_user_account"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportAccounts

Source§

impl ChatbotToolDeclaration for GeneratePasswordResetLinkTool

Source§

const NAME: &'static str = "generate_password_reset_link"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportAccounts

Source§

impl ChatbotToolDeclaration for ResetExercisesTool

Source§

const NAME: &'static str = "reset_exercises"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportLearningProgress

Source§

impl ChatbotToolDeclaration for UpdateCertificateTool

Source§

const NAME: &'static str = "update_certificate"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportLearningProgress

Source§

impl ChatbotToolDeclaration for UpdateCheatingStatusTool

Source§

const NAME: &'static str = "update_cheating_status"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportAcademicIntegrity

Source§

impl ChatbotToolDeclaration for AskMultipleChoiceQuestionTool

Source§

const NAME: &'static str

Source§

const CATEGORY: ToolCategory = ToolCategory::Interaction

Source§

impl ChatbotToolDeclaration for CertificateLookupTool

Source§

const NAME: &'static str = "certificate_lookup"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportLearningProgress

Source§

impl ChatbotToolDeclaration for CourseConfigurationTool

Source§

const NAME: &'static str = "course_configuration"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportCourses

Source§

impl ChatbotToolDeclaration for CourseFinderTool

Source§

const NAME: &'static str = "course_finder"

Source§

const CATEGORY: ToolCategory = ToolCategory::CourseCatalog

Source§

impl ChatbotToolDeclaration for CourseMaterialSearchTool

Source§

const NAME: &'static str = "course_material_search"

Source§

const CATEGORY: ToolCategory = ToolCategory::CourseMaterial

Source§

impl ChatbotToolDeclaration for CourseProgressTool

Source§

const NAME: &'static str = "course_progress"

Source§

const CATEGORY: ToolCategory = ToolCategory::CourseInfo

Source§

impl ChatbotToolDeclaration for CourseStructureTool

Source§

const NAME: &'static str = "course_structure"

Source§

const CATEGORY: ToolCategory = ToolCategory::CourseInfo

Source§

impl ChatbotToolDeclaration for DocumentLookupTool

Source§

const NAME: &'static str = "document_lookup"

Source§

const CATEGORY: ToolCategory = ToolCategory::CourseMaterial

Source§

impl ChatbotToolDeclaration for FindCourseTool

Source§

const NAME: &'static str = "find_course"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportCourses

Source§

impl ChatbotToolDeclaration for FindUserTool

Source§

const NAME: &'static str = "find_user"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportAccounts

Source§

impl ChatbotToolDeclaration for UserCourseStateTool

Source§

const NAME: &'static str = "user_course_state"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportLearningProgress

Source§

impl ChatbotToolDeclaration for UserOverviewTool

Source§

const NAME: &'static str = "user_overview"

Source§

const CATEGORY: ToolCategory = ToolCategory::AdminSupportAccounts