SAMApiPlugin
smarter.models.sam.apiplugin
SAM model of the ApiPlugin kind, generated from the Smarter platform’s JSON Schema.
Do not edit: run scripts/generate_sam_models.py. See smarter.models.sam.
- class smarter.models.sam.apiplugin.RequestHeader
Bases:
smarter.models.sam.base.SAMModelModel for storing HTTP request headers.
- class smarter.models.sam.apiplugin.SAMDependency
Bases:
smarter.models.sam.base.SAMModelA resource that depends on the resource that a manifest describes.
- class smarter.models.sam.apiplugin.SAMPluginCommonMetadata
Bases:
smarter.models.sam.base.SAMModelSmarter API Plugin Manifest - common Metadata class.
- annotations: None | list[dict[str, str | int | float | bool | datetime.date | datetime.datetime | Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$')] | uuid.UUID | bytes | list | dict[str, Any]]]
The manifest annotations.
- Used for storing arbitrary metadata as
key-value pairs. Example: [{‘smarter.sh/test-manifest/project-name’: ‘Scooby dooby do’}]. The key should be a valid url-friendly string. The value accepts multi-line string values (YAML block scalars) and various scalar types including str, int, float, bool, datetime.date, datetime.datetime, decimal.Decimal, uuid.UUID, bytes, list, dict.
- pluginClass: str
The class of the plugin.
one of: [‘api’, ‘imagesearch’, ‘skill’, ‘sql’, ‘static’, ‘websearch’]
- class smarter.models.sam.apiplugin.SAMPluginCommonSpecPrompt
Bases:
smarter.models.sam.base.SAMModelSmarter API Plugin Manifest - Spec - Prompt class.
- maxTokens: Optional
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.
- model: str | None
Plugin.spec.prompt.model[str] Optional.
The model of the Plugin. Defaults to gpt-6-luna. Must be one of: [‘chat-latest’, ‘gpt-4.1’, ‘gpt-4.1-2025-04-14’, ‘gpt-4.1-mini’, ‘gpt-4.1-mini-2025-04-14’, ‘gpt-4o’, ‘gpt-4o-2024-08-06’, ‘gpt-4o-2024-11-20’, ‘gpt-4o-mini’, ‘gpt-4o-mini-2024-07-18’, ‘gpt-5-search-api’, ‘gpt-5-search-api-2025-10-14’, ‘gpt-5.2’, ‘gpt-5.2-2025-12-11’, ‘gpt-5.4’, ‘gpt-5.4-2026-03-05’, ‘gpt-5.4-mini’, ‘gpt-5.4-mini-2026-03-17’, ‘gpt-5.5’, ‘gpt-5.5-2026-04-23’, ‘gpt-5.6-luna’, ‘gpt-5.6-sol’, ‘gpt-5.6-terra’, ‘gpt-6-astra’, ‘gpt-6-luna’, ‘gpt-6-sol’, ‘gpt-6.1-sol’]
- provider: str | None
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.
- systemRole: str
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.
- temperature: Optional
Plugin.spec.prompt.temperature[float] Optional.
The temperature of the Plugin. Defaults to 1.0. 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.
- class smarter.models.sam.apiplugin.SAMPluginCommonSpecSelector
Bases:
smarter.models.sam.base.SAMModelSmarter API Plugin Manifest - Spec - Selector class.
- class smarter.models.sam.apiplugin.SAMPluginCommonStatus
Bases:
smarter.models.sam.base.SAMModelSmarter API Plugin Manifest - Status class.
- created: datetime
The date in which this resource was created.
Read only.
- dependencies: list[smarter.models.sam.apiplugin.SAMDependency] | None
Dependencies[List]: The resources that depend on this resource, and that must be deleted, or stop referring to it, before it can be deleted.
Lists only the resources that you can read. Read only.
- modified: datetime
The date in which this resource was most recently changed.
Read only.
- class smarter.models.sam.apiplugin.TestValue
Bases:
smarter.models.sam.base.SAMModelTestValue class for SqlPlugin and ApiPlugin test values.
- value: Any
The test value for the parameter.
- class smarter.models.sam.apiplugin.UrlParam
Bases:
smarter.models.sam.base.SAMModelModel for storing url param k-v pairs.
- class smarter.models.sam.apiplugin.Parameter
Bases:
smarter.models.sam.base.SAMModelParameter 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.
- enum: list[str] | None
A list of allowed values for the parameter.
Example: [‘Celsius’, ‘Fahrenheit’]
- type: ParameterType
The data type of the parameter (one of: string, number, integer, boolean, object, array, null).
- class smarter.models.sam.apiplugin.ApiData
Bases:
smarter.models.sam.base.SAMModelSmarter API - apiData class.
- body: dict[str, Any] | list | None
Any valid JSON object containing the body of the API request, if applicable.
- headers: list[smarter.models.sam.apiplugin.RequestHeader] | None
A list of JSON dict containing headers to be sent with the API request.
Example: {‘Authorization’: ‘Bearer <token>’}
- limit: Optional
The maximum number of records to return from the API.
Default is 100.
- method: Optional
The HTTP method to use for the API request.
Default is ‘GET’.
- parameters: list[smarter.models.sam.apiplugin.Parameter] | None
A JSON dict containing parameter names and data types.
Example: {‘city’: {‘type’: ‘string’, ‘description’: ‘City name’}}
- testValues: list[smarter.models.sam.apiplugin.TestValue] | None
A JSON dict containing test values for each parameter.
Example: {‘city’: ‘San Francisco’}
- urlParams: list[smarter.models.sam.apiplugin.UrlParam] | None
A list of URL parameters to be included in the API request.
Example: {‘city’: ‘San Francisco’}
- class smarter.models.sam.apiplugin.SAMApiPluginSpec
Bases:
smarter.models.sam.base.SAMModelSmarter API Manifest ApiConnection.spec.
- connection: str
ApiPlugin.spec.selector[obj]: the name of an existing ApiConnection to use for the ApiPlugin.
- prompt: SAMPluginCommonSpecPrompt
Plugin.spec.prompt[obj]: the LLM prompt engineering to apply to the Plugin.
- selector: SAMPluginCommonSpecSelector
Plugin.spec.selector[obj]: the selector logic to use for the Plugin.
- class smarter.models.sam.apiplugin.SAMApiPlugin
Bases:
smarter.models.sam.base.SAMModelSmarter API Manifest - ApiPlugin Model.
- metadata: SAMPluginCommonMetadata
Plugin.metadata[obj]: Required, the Plugin metadata.
- spec: SAMApiPluginSpec
ApiPlugin.spec[obj]: Required, the ApiPlugin specification.
- status: smarter.models.sam.apiplugin.SAMPluginCommonStatus | None
Plugin.status[obj]: Optional, Read-only.
Stateful status information about the Plugin.