Documentation
¶
Index ¶
- func DefaultDebugConfig() debugclient.DebugConfig
- func InitProviderSetHandlers(api huma.API, providerSetAPI *ProviderSetAPI)
- type ProviderSetAPI
- func (ps *ProviderSetAPI) AddProvider(ctx context.Context, req *spec.AddProviderRequest) (*spec.AddProviderResponse, error)
- func (ps *ProviderSetAPI) DeleteProvider(ctx context.Context, req *spec.DeleteProviderRequest) (*spec.DeleteProviderResponse, error)
- func (ps *ProviderSetAPI) FetchCompletion(ctx context.Context, req *spec.CompletionRequest) (*spec.CompletionResponse, error)
- func (ps *ProviderSetAPI) GetDebugConfig() *debugclient.DebugConfig
- func (ps *ProviderSetAPI) SetDebugConfig(cfg *debugclient.DebugConfig)
- func (ps *ProviderSetAPI) SetProviderAPIKey(ctx context.Context, req *spec.SetProviderAPIKeyRequest) (*spec.SetProviderAPIKeyResponse, error)
- type ProviderSetOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDebugConfig ¶ added in v0.0.91
func DefaultDebugConfig() debugclient.DebugConfig
func InitProviderSetHandlers ¶
func InitProviderSetHandlers(api huma.API, providerSetAPI *ProviderSetAPI)
Types ¶
type ProviderSetAPI ¶
type ProviderSetAPI struct {
// contains filtered or unexported fields
}
ProviderSetAPI is a thin aggregator on top of inference-go's ProviderSetAPI. It owns:
- provider lifecycle (add/delete/set API key),
- attachment/tool hydration,
- mapping Conversation+CurrentTurn -> inference-go FetchCompletionRequest.
func NewProviderSetAPI ¶
func NewProviderSetAPI( ts *toolStore.ToolStore, mps *modelpresetStore.ModelPresetStore, ss *skillStore.SkillStore, opts ...ProviderSetOption, ) (*ProviderSetAPI, error)
NewProviderSetAPI creates a new ProviderSetAPI wrapper.
- ts: tool store used to hydrate ToolChoices when needed.
- opts: functional options for configuring the wrapper (e.g. WithLogger, WithDebugConfig).
func (*ProviderSetAPI) AddProvider ¶
func (ps *ProviderSetAPI) AddProvider( ctx context.Context, req *spec.AddProviderRequest, ) (*spec.AddProviderResponse, error)
AddProvider forwards to inference-go ProviderSetAPI.AddProvider.
func (*ProviderSetAPI) DeleteProvider ¶
func (ps *ProviderSetAPI) DeleteProvider( ctx context.Context, req *spec.DeleteProviderRequest, ) (*spec.DeleteProviderResponse, error)
DeleteProvider forwards to inference-go ProviderSetAPI.DeleteProvider.
func (*ProviderSetAPI) FetchCompletion ¶
func (ps *ProviderSetAPI) FetchCompletion( ctx context.Context, req *spec.CompletionRequest, ) (*spec.CompletionResponse, error)
FetchCompletion builds a normalized inference-go FetchCompletionRequest from app-level conversation types and calls inference-go's FetchCompletion.
func (*ProviderSetAPI) GetDebugConfig ¶ added in v0.0.91
func (ps *ProviderSetAPI) GetDebugConfig() *debugclient.DebugConfig
GetDebugConfig returns a defensive copy of the live debug configuration.
func (*ProviderSetAPI) SetDebugConfig ¶ added in v0.0.91
func (ps *ProviderSetAPI) SetDebugConfig(cfg *debugclient.DebugConfig)
SetDebugConfig updates the live debug client configuration used for future completions. Passing nil disables debugging while keeping the transport wrapper installed, so debugging can be enabled again later without reinitializing providers.
func (*ProviderSetAPI) SetProviderAPIKey ¶
func (ps *ProviderSetAPI) SetProviderAPIKey( ctx context.Context, req *spec.SetProviderAPIKeyRequest, ) (*spec.SetProviderAPIKeyResponse, error)
SetProviderAPIKey forwards to inference-go ProviderSetAPI.SetProviderAPIKey.
type ProviderSetOption ¶
type ProviderSetOption func(*ProviderSetAPI)
func WithDebugConfig ¶
func WithDebugConfig(debugConfig *debugclient.DebugConfig) ProviderSetOption
func WithLogger ¶
func WithLogger(logger *slog.Logger) ProviderSetOption
func WithSkillsRunScriptEnabled ¶ added in v0.0.82
func WithSkillsRunScriptEnabled(enabled bool) ProviderSetOption
WithSkillsRunScriptEnabled controls whether skills-runscript is advertised to the model. Default: false (safer; matches the default fsskillprovider which disables scripts).