A tool definition to be used by the OpenAI API.

Example Usage

import { InternalTool } from "syllable-sdk/models/components";

let value: InternalTool = {
  function: {
    name: "weather_fetcher",
    description: "Fetches weather data",
    parameters: "<value>",
  },
};

Fields

FieldTypeRequiredDescription
typestringFALSEAlways function.
functioncomponents.ToolFunctionTRUEA function available to an agent.

See:
- https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling