Documentation
¶
Index ¶
- func CreateCustomProvider(providerName, model string) (api.ClientInterface, error)
- func CreateGenericProvider(providerName, model string) (api.ClientInterface, error)
- func CreateProviderClient(clientType api.ClientType, model string) (api.ClientInterface, error)
- func GlobalFactory() *providers.ProviderFactory
- type TestClient
- func (t *TestClient) CheckConnection() error
- func (t *TestClient) GetAverageTPS() float64
- func (t *TestClient) GetLastTPS() float64
- func (t *TestClient) GetModel() string
- func (t *TestClient) GetModelContextLimit() (int, error)
- func (t *TestClient) GetProvider() string
- func (t *TestClient) GetTPSStats() map[string]float64
- func (t *TestClient) GetVisionModel() string
- func (t *TestClient) ListModels(ctx context.Context) ([]api.ModelInfo, error)
- func (t *TestClient) ResetTPSStats()
- func (t *TestClient) SendChatRequest(ctx context.Context, messages []api.Message, tools []api.Tool, ...) (*api.ChatResponse, error)
- func (t *TestClient) SendChatRequestStream(ctx context.Context, messages []api.Message, tools []api.Tool, ...) (*api.ChatResponse, error)
- func (t *TestClient) SendVisionRequest(ctx context.Context, messages []api.Message, tools []api.Tool, ...) (*api.ChatResponse, error)
- func (t *TestClient) SetDebug(debug bool)
- func (t *TestClient) SetModel(model string) error
- func (t *TestClient) SupportsConversationalVision() bool
- func (t *TestClient) SupportsVision() bool
- func (t *TestClient) VisionCapabilities() api.VisionCapabilities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCustomProvider ¶
func CreateCustomProvider(providerName, model string) (api.ClientInterface, error)
CreateCustomProvider creates a provider from custom provider configuration
func CreateGenericProvider ¶
func CreateGenericProvider(providerName, model string) (api.ClientInterface, error)
CreateGenericProvider creates a generic provider by name
func CreateProviderClient ¶
func CreateProviderClient(clientType api.ClientType, model string) (api.ClientInterface, error)
CreateProviderClient is a factory function that creates providers
func GlobalFactory ¶ added in v0.16.2
func GlobalFactory() *providers.ProviderFactory
GlobalFactory returns the global provider factory instance.
Types ¶
type TestClient ¶
type TestClient struct {
// contains filtered or unexported fields
}
TestClient implements a mock client for CI/testing environments
func (*TestClient) CheckConnection ¶
func (t *TestClient) CheckConnection() error
func (*TestClient) GetAverageTPS ¶
func (t *TestClient) GetAverageTPS() float64
func (*TestClient) GetLastTPS ¶
func (t *TestClient) GetLastTPS() float64
func (*TestClient) GetModel ¶
func (t *TestClient) GetModel() string
func (*TestClient) GetModelContextLimit ¶
func (t *TestClient) GetModelContextLimit() (int, error)
func (*TestClient) GetProvider ¶
func (t *TestClient) GetProvider() string
func (*TestClient) GetTPSStats ¶
func (t *TestClient) GetTPSStats() map[string]float64
func (*TestClient) GetVisionModel ¶
func (t *TestClient) GetVisionModel() string
func (*TestClient) ListModels ¶
func (*TestClient) ResetTPSStats ¶
func (t *TestClient) ResetTPSStats()
func (*TestClient) SendChatRequest ¶
func (t *TestClient) SendChatRequest(ctx context.Context, messages []api.Message, tools []api.Tool, reasoning string, disableThinking bool) (*api.ChatResponse, error)
Create test client methods
func (*TestClient) SendChatRequestStream ¶
func (t *TestClient) SendChatRequestStream(ctx context.Context, messages []api.Message, tools []api.Tool, reasoning string, disableThinking bool, callback api.StreamCallback) (*api.ChatResponse, error)
func (*TestClient) SendVisionRequest ¶
func (*TestClient) SetDebug ¶
func (t *TestClient) SetDebug(debug bool)
func (*TestClient) SetModel ¶
func (t *TestClient) SetModel(model string) error
func (*TestClient) SupportsConversationalVision ¶ added in v0.16.19
func (t *TestClient) SupportsConversationalVision() bool
SupportsConversationalVision returns false; the test client never participates in inline multimodal turns.
func (*TestClient) SupportsVision ¶
func (t *TestClient) SupportsVision() bool
func (*TestClient) VisionCapabilities ¶ added in v0.16.20
func (t *TestClient) VisionCapabilities() api.VisionCapabilities
VisionCapabilities returns the test client's vision limits — the safe defaults. TestClient never participates in real vision requests, but the method is required to satisfy api.ClientInterface. SP-103-D3 / AUDIT-GAP-2.