Action
    Preparing search index...

    Represents an AI tool that can be passed to chat completion to allow the model to invoke callbacks with structured arguments.

    2.5

    Hierarchy (View Summary)

    Index

    Methods

    Extended capability 'AI'

    Methods

    • Casts this object to the specified type. Throws error on failure.

      Type Parameters

      • T1

        The target type of the cast.

      • T2

        The type of the object to cast.

      Parameters

      Returns T1

    • Determines whether the specified object is equal to the current object.

      Parameters

      • obj: any

        The object to compare with the current object.

      Returns boolean

      true if the specified object is equal to the current object; otherwise, false.

    • Serves as the default hash function.

      Returns number

      A hash code for the current object.

    • Returns a string that represents the current object.

      Returns string

      A string that represents the current object.

    • Casts this object to the specified type. Returns null on failure.

      Type Parameters

      • T1

        The target type of the cast.

      • T2

        The type of the object to cast.

      Parameters

      Returns T1 | null

    • Determines whether the specified object instances are considered equal.

      Parameters

      • objA: any

        The first object to compare.

      • objB: any

        The second object to compare.

      Returns boolean

      true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.

    Extended capability 'AI'

    • Initializes a new instance of the Spotfire.Dxp.Framework.Ai.ActionAiTool class. This overload accepts a dynamic callback object, which allows ClearScript to marshal a JavaScript function directly without requiring an explicit delegate conversion.

      Parameters

      • name: string | String

        The name of the tool. Must be a valid function name for the AI model.

      • description: string | String

        A description of what the tool does, used by the model to decide when to call it.

      • parametersJsonSchema: string | String

        A JSON Schema string describing the parameters the tool accepts. Example: {"properties": {"query": {"type": "string", "description": "The search query"}}, "required": ["query"]}

      • callback: ToolCallback

        A callback object that is invoked when the model calls this tool. The argument is the JSON-serialized arguments from the model. The return value is serialized and sent back to the model as the tool result. This overload exists to support ClearScript interop where JavaScript functions cannot be automatically marshalled to System.Func.

      Returns Spotfire.Dxp.Framework.Ai.ActionAiTool

      2.5

    • get Name(): string

      Gets the tool name.

      Returns string

      2.5