Documentation
¶
Index ¶
- type Checker
- func (c *Checker) AddAvailableFeature(feature string)
- func (c *Checker) CheckCompatibility(metadata *CompatibilityMetadata) (bool, []string)
- func (c *Checker) CheckModelCompatibility(metadata *CompatibilityMetadata, providerID, model string) (bool, []string)
- func (c *Checker) CheckProviderCompatibility(metadata *CompatibilityMetadata, providerID string) (bool, []string)
- func (c *Checker) GetAvailableFeatures() []string
- func (c *Checker) GetProvider(providerID string) (*ProviderInfo, bool)
- func (c *Checker) GetProviders() map[string]*ProviderInfo
- func (c *Checker) IsModelSupported(providerID, model string) bool
- func (c *Checker) RegisterProvider(provider *ProviderInfo)
- func (c *Checker) RemoveAvailableFeature(feature string)
- func (c *Checker) UnregisterProvider(providerID string)
- type CompatibilityMetadata
- func (cm *CompatibilityMetadata) AddProvider(provider string)
- func (cm *CompatibilityMetadata) AddRequiredFeature(feature string)
- func (cm *CompatibilityMetadata) AddSupportedModel(provider, model string)
- func (cm *CompatibilityMetadata) GetMetadata(key string) (interface{}, bool)
- func (cm *CompatibilityMetadata) HasRequiredFeatures(availableFeatures []string) bool
- func (cm *CompatibilityMetadata) IsCompatibleWithModel(provider, model string) bool
- func (cm *CompatibilityMetadata) IsCompatibleWithProvider(provider string) bool
- func (cm *CompatibilityMetadata) IsCompatibleWithToolVersion(version string) (bool, error)
- func (cm *CompatibilityMetadata) Merge(other *CompatibilityMetadata)
- func (cm *CompatibilityMetadata) RemoveMetadata(key string)
- func (cm *CompatibilityMetadata) RemoveProvider(provider string)
- func (cm *CompatibilityMetadata) RemoveRequiredFeature(feature string)
- func (cm *CompatibilityMetadata) RemoveSupportedModel(provider, model string)
- func (cm *CompatibilityMetadata) SetMaxToolVersion(version string) error
- func (cm *CompatibilityMetadata) SetMetadata(key string, value interface{})
- func (cm *CompatibilityMetadata) SetMinToolVersion(version string) error
- type ProviderInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker handles compatibility checking between templates and providers
func NewChecker ¶
NewChecker creates a new compatibility checker
func (*Checker) AddAvailableFeature ¶
AddAvailableFeature adds an available feature
func (*Checker) CheckCompatibility ¶
func (c *Checker) CheckCompatibility(metadata *CompatibilityMetadata) (bool, []string)
CheckCompatibility checks if a template is compatible with the current environment
func (*Checker) CheckModelCompatibility ¶
func (c *Checker) CheckModelCompatibility(metadata *CompatibilityMetadata, providerID, model string) (bool, []string)
CheckModelCompatibility checks if a template is compatible with a specific model
func (*Checker) CheckProviderCompatibility ¶
func (c *Checker) CheckProviderCompatibility(metadata *CompatibilityMetadata, providerID string) (bool, []string)
CheckProviderCompatibility checks if a template is compatible with a specific provider
func (*Checker) GetAvailableFeatures ¶
GetAvailableFeatures returns the list of available features
func (*Checker) GetProvider ¶
func (c *Checker) GetProvider(providerID string) (*ProviderInfo, bool)
GetProvider returns information about a specific provider
func (*Checker) GetProviders ¶
func (c *Checker) GetProviders() map[string]*ProviderInfo
GetProviders returns the list of registered providers
func (*Checker) IsModelSupported ¶
IsModelSupported checks if a model is supported by a provider
func (*Checker) RegisterProvider ¶
func (c *Checker) RegisterProvider(provider *ProviderInfo)
RegisterProvider registers a provider with the checker
func (*Checker) RemoveAvailableFeature ¶
RemoveAvailableFeature removes an available feature
func (*Checker) UnregisterProvider ¶
UnregisterProvider removes a provider from the checker
type CompatibilityMetadata ¶
type CompatibilityMetadata struct {
// Compatible providers (e.g., "openai", "anthropic")
Providers []string `json:"providers,omitempty" yaml:"providers,omitempty"`
// Minimum tool version required (e.g., "1.0.0")
MinToolVersion string `json:"min_tool_version,omitempty" yaml:"min_tool_version,omitempty"`
// Maximum tool version supported (e.g., "2.0.0") - optional
MaxToolVersion string `json:"max_tool_version,omitempty" yaml:"max_tool_version,omitempty"`
// Supported models for each provider
SupportedModels map[string][]string `json:"supported_models,omitempty" yaml:"supported_models,omitempty"`
// Required features that must be supported
RequiredFeatures []string `json:"required_features,omitempty" yaml:"required_features,omitempty"`
// Additional metadata
Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
}
CompatibilityMetadata represents compatibility information for templates and modules
func NewCompatibilityMetadata ¶
func NewCompatibilityMetadata() *CompatibilityMetadata
NewCompatibilityMetadata creates a new compatibility metadata instance
func (*CompatibilityMetadata) AddProvider ¶
func (cm *CompatibilityMetadata) AddProvider(provider string)
AddProvider adds a provider to the compatibility metadata
func (*CompatibilityMetadata) AddRequiredFeature ¶
func (cm *CompatibilityMetadata) AddRequiredFeature(feature string)
AddRequiredFeature adds a required feature
func (*CompatibilityMetadata) AddSupportedModel ¶
func (cm *CompatibilityMetadata) AddSupportedModel(provider, model string)
AddSupportedModel adds a supported model for a provider
func (*CompatibilityMetadata) GetMetadata ¶
func (cm *CompatibilityMetadata) GetMetadata(key string) (interface{}, bool)
GetMetadata gets a metadata value
func (*CompatibilityMetadata) HasRequiredFeatures ¶
func (cm *CompatibilityMetadata) HasRequiredFeatures(availableFeatures []string) bool
HasRequiredFeatures checks if all required features are available
func (*CompatibilityMetadata) IsCompatibleWithModel ¶
func (cm *CompatibilityMetadata) IsCompatibleWithModel(provider, model string) bool
IsCompatibleWithModel checks if the metadata is compatible with a model
func (*CompatibilityMetadata) IsCompatibleWithProvider ¶
func (cm *CompatibilityMetadata) IsCompatibleWithProvider(provider string) bool
IsCompatibleWithProvider checks if the metadata is compatible with a provider
func (*CompatibilityMetadata) IsCompatibleWithToolVersion ¶
func (cm *CompatibilityMetadata) IsCompatibleWithToolVersion(version string) (bool, error)
IsCompatibleWithToolVersion checks if the metadata is compatible with a tool version
func (*CompatibilityMetadata) Merge ¶
func (cm *CompatibilityMetadata) Merge(other *CompatibilityMetadata)
Merge merges another compatibility metadata into this one
func (*CompatibilityMetadata) RemoveMetadata ¶
func (cm *CompatibilityMetadata) RemoveMetadata(key string)
RemoveMetadata removes a metadata value
func (*CompatibilityMetadata) RemoveProvider ¶
func (cm *CompatibilityMetadata) RemoveProvider(provider string)
RemoveProvider removes a provider from the compatibility metadata
func (*CompatibilityMetadata) RemoveRequiredFeature ¶
func (cm *CompatibilityMetadata) RemoveRequiredFeature(feature string)
RemoveRequiredFeature removes a required feature
func (*CompatibilityMetadata) RemoveSupportedModel ¶
func (cm *CompatibilityMetadata) RemoveSupportedModel(provider, model string)
RemoveSupportedModel removes a supported model for a provider
func (*CompatibilityMetadata) SetMaxToolVersion ¶
func (cm *CompatibilityMetadata) SetMaxToolVersion(version string) error
SetMaxToolVersion sets the maximum tool version supported
func (*CompatibilityMetadata) SetMetadata ¶
func (cm *CompatibilityMetadata) SetMetadata(key string, value interface{})
SetMetadata sets a metadata value
func (*CompatibilityMetadata) SetMinToolVersion ¶
func (cm *CompatibilityMetadata) SetMinToolVersion(version string) error
SetMinToolVersion sets the minimum tool version required