def assistant_skill_trigger()

in azure/functions/decorators/function_app.py [0:0]


    def assistant_skill_trigger(self,
                                arg_name: str,
                                function_description: str,
                                function_name: Optional[str] = None,
                                parameter_description_json: Optional[str] = None,  # NoQA
                                model: Optional[OpenAIModels] = OpenAIModels.DefaultChatModel,  # NoQA
                                data_type: Optional[
                                    Union[DataType, str]] = None,
                                **kwargs: Any) -> Callable[..., Any]:
        """
        Assistants build on top of the chat functionality to provide assistants
        with custom skills defined as functions. This internally uses the
        function calling feature OpenAIs GPT models to select which functions
        to invoke and when.
        Ref: https://platform.openai.com/docs/guides/function-calling

        You can define functions that can be triggered by assistants by using

        the `assistantSkillTrigger` trigger binding. These functions are
        invoked by the extension when an assistant signals that it would like
        to invoke a function in response to a user prompt.

        The name of the function, the description provided by the trigger,
        and the parameter name are all hints that the underlying language model
        use to determine when and how to invoke an assistant function.

        :param arg_name: The name of trigger parameter in the function code.
        :param function_description: The description of the assistant function,
         which is provided to the model.
        :param function_name: The assistant function, which is provided to the
        LLM.
        :param parameter_description_json: A JSON description of the function
        parameter, which is provided to the LLM.
        If no description is provided, the description will be autogenerated.
        :param model: The OpenAI chat model to use.
        :param data_type: Defines how Functions runtime should treat the
        parameter value.
        :param kwargs: Keyword arguments for specifying additional binding
        fields to include in the binding json.

        :return: Decorator function.

        """
        @self._configure_function_builder
        def wrap(fb):
            def decorator():
                fb.add_trigger(
                    trigger=AssistantSkillTrigger(
                        name=arg_name,
                        function_description=function_description,
                        function_name=function_name,
                        parameter_description_json=parameter_description_json,
                        model=model,
                        data_type=parse_singular_param_to_enum(data_type,
                                                               DataType),
                        **kwargs))
                return fb

            return decorator()

        return wrap