{
"$defs": {
"ApiData": {
"description": "Smarter API - apiData class.",
"properties": {
"endpoint": {
"description": "The endpoint path for the API. Example: /v1/weather.",
"maxLength": 255,
"title": "Endpoint",
"type": "string"
},
"method": {
"default": "GET",
"description": "The HTTP method to use for the API request. Default is GET.",
"maxLength": 10,
"title": "Method",
"type": "string"
},
"url_params": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UrlParam"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of URL parameters to be included in the API request. Example: {city: San Francisco}",
"title": "Url Params"
},
"headers": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/RequestHeader"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of JSON dict containing headers to be sent with the API request. Example: {Authorization: Bearer <token>}",
"title": "Headers"
},
"body": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Any valid JSON object containing the body of the API request, if applicable.",
"title": "Body"
},
"parameters": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Parameter"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A JSON dict containing parameter names and data types. Example: {city: {type: string, description: City name}}",
"title": "Parameters"
},
"test_values": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TestValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A JSON dict containing test values for each parameter. Example: {city: San Francisco}",
"title": "Test Values"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 100,
"description": "The maximum number of records to return from the API. Default is 100.",
"title": "Limit"
}
},
"required": [
"endpoint"
],
"title": "ApiData",
"type": "object"
},
"Parameter": {
"description": "Parameter class for parameterized Plugins. This structure is
intended to match that which is used in the OpenAPI
function calling specification.
It is used to define the parameters that a plugin can accept,
and also for creating the function calling prompt api.",
"properties": {
"name": {
"description": "The name of the parameter.",
"title": "Name",
"type": "string"
},
"type": {
"$ref": "#/$defs/ParameterType",
"description": "The data type of the parameter (one of: string, number, integer, boolean, object, array, null)."
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A description of the parameter.",
"title": "Description"
},
"required": {
"default": false,
"description": "Whether the parameter is required.",
"title": "Required",
"type": "boolean"
},
"enum": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of allowed values for the parameter. Example: [Celsius, Fahrenheit]",
"title": "Enum"
},
"default": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"description": "The default value of the parameter, if any.",
"title": "Default"
}
},
"required": [
"name",
"type"
],
"title": "Parameter",
"type": "object"
},
"ParameterType": {
"description": "Enum for parameter types.",
"enum": [
"string",
"number",
"integer",
"boolean",
"object",
"array",
"null"
],
"title": "ParameterType",
"type": "string"
},
"RequestHeader": {
"description": "Model for storing HTTP request headers.",
"properties": {
"name": {
"description": "The name of the HTTP header.",
"title": "Name",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The value of the HTTP header.",
"title": "Value"
}
},
"required": [
"name",
"value"
],
"title": "RequestHeader",
"type": "object"
},
"SAMApiPluginSpec": {
"description": "Smarter API Manifest ApiConnection.spec",
"properties": {
"selector": {
"$ref": "#/$defs/SAMPluginCommonSpecSelector",
"description": "Plugin.spec.selector[obj]: the selector logic to use for the Plugin"
},
"prompt": {
"$ref": "#/$defs/SAMPluginCommonSpecPrompt",
"description": "Plugin.spec.prompt[obj]: the LLM prompt engineering to apply to the Plugin"
},
"connection": {
"description": "ApiPlugin.spec.selector[obj]: the name of an existing SqlConnector to use for the ApiPlugin",
"title": "Connection",
"type": "string"
},
"apiData": {
"$ref": "#/$defs/ApiData",
"description": "ApiPlugin.spec.selector[obj]: the ApiData to use for the ApiPlugin"
}
},
"required": [
"selector",
"prompt",
"connection",
"apiData"
],
"title": "SAMApiPluginSpec",
"type": "object"
},
"SAMPluginCommonMetadata": {
"description": "Smarter API Plugin Manifest - common Metadata class.",
"properties": {
"name": {
"description": "The camelCase name of the manifest resource",
"title": "Name",
"type": "string"
},
"description": {
"description": "The description for this resource. Be brief. Keep it under 255 characters.",
"title": "Description",
"type": "string"
},
"version": {
"description": "The semantic version of the manifest. Example: 0.1.0",
"title": "Version",
"type": "string"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "The tags of the manifest. These are fully functional but are not currently used. Example: [tag1, tag2]",
"title": "Tags"
},
"annotations": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "The manifest annotations. These are fully functional but are not currently used.",
"title": "Annotations"
},
"pluginClass": {
"description": "The class of the plugin. one of: [static, api, sql]",
"title": "Pluginclass",
"type": "string"
}
},
"required": [
"name",
"description",
"version",
"pluginClass"
],
"title": "SAMPluginCommonMetadata",
"type": "object"
},
"SAMPluginCommonSpecPrompt": {
"description": "Smarter API Plugin Manifest - Spec - Prompt class.",
"properties": {
"provider": {
"default": "openai",
"description": "Plugin.spec.prompt.provider[str]. Optional. The provider of the LLM. Defaults to openai. The provider is the vendor name for the LLM service that will be used to generate the prompt response.",
"title": "Provider",
"type": "string"
},
"systemRole": {
"description": "Plugin.spec.prompt.systemRole[str]. Required. The system role that the Plugin will use for the LLM text completion prompt. Be verbose and specific. Ensure that systemRole accurately conveys to the LLM how you want it to use the Plugin data that is returned.",
"title": "Systemrole",
"type": "string"
},
"model": {
"default": "gpt-4o-mini",
"description": "Plugin.spec.prompt.model[str] Optional. The model of the Plugin. Defaults to gpt-4o-mini. Must be one of: [o1, o1-mini, o1-preview, gpt-4o, gpt-4o-mini, chatgpt-4o-latest, gpt-4, gpt-4-turbo, gpt-4-32k, gpt-4-32k-0613, gpt-4-1106-preview, gpt-4-0613, gpt-4-turbo-2024-04-09, gpt-4-turbo-preview, gpt-4-0125-preview, gpt-4-0314, gpt-3.5-turbo, gpt-3.5-turbo-0613, gpt-3.5-turbo-16k, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo-1106, gpt-3.5-turbo-instruct, o1-preview, o1-mini]",
"title": "Model",
"type": "string"
},
"temperature": {
"default": 0.5,
"description": "Plugin.spec.prompt.temperature[float] Optional. The temperature of the Plugin. Defaults to 0.5. Should be between 0 and 1.0. The higher the temperature, the more creative the response. The lower the temperature, the more predictable the response.",
"maximum": 1.0,
"minimum": 0,
"title": "Temperature",
"type": "number"
},
"maxTokens": {
"default": 2048,
"description": "Plugin.spec.prompt.maxTokens[int]. Optional. The maxTokens of the Plugin. Defaults to 2048. The maximum number of tokens the LLM should generate in the prompt response. ",
"exclusiveMinimum": 0,
"title": "Maxtokens",
"type": "integer"
}
},
"required": [
"systemRole"
],
"title": "SAMPluginCommonSpecPrompt",
"type": "object"
},
"SAMPluginCommonSpecSelector": {
"description": "Smarter API Plugin Manifest - Spec - Selector class.",
"properties": {
"directive": {
"description": "Plugin.spec.selector.directive[str]: Required. the kind of selector directive to use for the Plugin. Must be one of: [search_terms, always, llm]",
"title": "Directive",
"type": "string"
},
"searchTerms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Plugin.spec.selector.searchTerms[list]. Optional. The keyword search terms to use when the Plugin directive is search_terms. Keywords are most effective when constrained to 1 or 2 words each and lists are limited to a few dozen items.",
"title": "Searchterms"
}
},
"required": [
"directive"
],
"title": "SAMPluginCommonSpecSelector",
"type": "object"
},
"SAMPluginCommonStatus": {
"description": "Smarter API Plugin Manifest - Status class.",
"properties": {
"account_number": {
"default": null,
"description": "Plugin.status.account_number: The account owner of this Plugin. Read only.",
"title": "Account Number",
"type": "string"
},
"username": {
"default": null,
"description": "Plugin.status.account_number: The Smarter user who created this Plugin. Read only.",
"title": "Username",
"type": "string"
},
"created": {
"default": null,
"description": "Plugin.status.created: The date in which this Plugin was created. Read only.",
"format": "date-time",
"title": "Created",
"type": "string"
},
"modified": {
"default": null,
"description": "Plugin.status.modified: The date in which this Plugin was most recently changed. Read only.",
"format": "date-time",
"title": "Modified",
"type": "string"
}
},
"title": "SAMPluginCommonStatus",
"type": "object"
},
"TestValue": {
"description": "TestValue class for SqlPlugin and ApiPlugin test values.",
"properties": {
"name": {
"description": "The name of the parameter being tested.",
"title": "Name",
"type": "string"
},
"value": {
"description": "The test value for the parameter.",
"title": "Value"
}
},
"required": [
"name",
"value"
],
"title": "TestValue",
"type": "object"
},
"UrlParam": {
"description": "Model for storing url param k-v pairs.",
"properties": {
"key": {
"description": "The key (ie name) of the url param.",
"title": "Key",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The value for the key.",
"title": "Value"
}
},
"required": [
"key",
"value"
],
"title": "UrlParam",
"type": "object"
}
},
"description": "Smarter API Manifest - ApiPlugin Model",
"properties": {
"apiVersion": {
"description": "apiVersion[String]: Required. The API version of the AbstractSAMBase.",
"title": "Apiversion",
"type": "string"
},
"kind": {
"description": "kind[String]: Required. The kind of resource described by the manifest.",
"title": "Kind",
"type": "string"
},
"metadata": {
"$ref": "#/$defs/SAMPluginCommonMetadata",
"description": "Plugin.metadata[obj]: Required, the Plugin metadata."
},
"spec": {
"$ref": "#/$defs/SAMApiPluginSpec",
"description": "ApiPlugin.spec[obj]: Required, the ApiPlugin specification."
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/SAMPluginCommonStatus"
},
{
"type": "null"
}
],
"default": null,
"description": "Plugin.status[obj]: Optional, Read-only. Stateful status information about the Plugin."
}
},
"required": [
"apiVersion",
"kind",
"metadata",
"spec"
],
"title": "SAMApiPlugin",
"type": "object"
}