Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApilTest ¶
func NewApilTest(maxConcurrency int) interfaces.ApiTest
NewChannelTest creates a new ChannelTest instance
Types ¶
type ChannelTest ¶
type ChannelTest struct {
// contains filtered or unexported fields
}
func (*ChannelTest) PrintResults ¶
func (ct *ChannelTest) PrintResults(results []models.TestResult) error
PrintResults prints the test results in a formatted way
func (*ChannelTest) TestAllApis ¶
func (ct *ChannelTest) TestAllApis(channels []*models.Channel) []models.TestResult
TestAllApis tests all provided channels
func (*ChannelTest) TestSingleChannel ¶
func (ct *ChannelTest) TestSingleChannel(channelType models.ChannelType, url, model, key string) error
TestSingleChannel tests a single channel with the specified model
type GeminiContent ¶
type GeminiContent struct {
Parts []GeminiPart `json:"parts"`
}
type GeminiError ¶
type GeminiError struct {
Error struct {
Code int `json:"code"`
Message string `json:"message"`
Status string `json:"status"`
Details []struct {
Type string `json:"@type"`
Reason string `json:"reason,omitempty"`
Domain string `json:"domain,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Message string `json:"message,omitempty"`
Locale string `json:"locale,omitempty"`
} `json:"details"`
} `json:"error"`
}
GeminiError represents the error structure returned by Gemini API
type GeminiGenerationConfig ¶
type GeminiGenerationConfig struct {
MaxOutputTokens int `json:"maxOutputTokens,omitempty"`
Temperature float64 `json:"temperature,omitempty"`
TopP float64 `json:"topP,omitempty"`
TopK int `json:"topK,omitempty"`
CandidateCount int `json:"candidateCount,omitempty"`
StopSequences []string `json:"stopSequences,omitempty"`
}
type GeminiPart ¶
type GeminiPart struct {
Text string `json:"text"`
}
type GeminiRequest ¶
type GeminiRequest struct {
Contents []GeminiContent `json:"contents"`
GenerationConfig *GeminiGenerationConfig `json:"generationConfig,omitempty"`
}
GeminiRequest represents a test request for Gemini
type GeneralOpenAIRequest ¶
type GeneralOpenAIRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
MaxTokens int `json:"max_tokens,omitempty"`
MaxCompletionTokens int `json:"max_completion_tokens,omitempty"`
Stream bool `json:"stream"`
StreamOptions *StreamOptions `json:"stream_options,omitempty"`
}
GeneralOpenAIRequest represents a test request for OpenAI
type OpenAIError ¶
type OpenAIError struct {
Error struct {
Message string `json:"message"`
Type string `json:"type"`
Code string `json:"code"`
} `json:"error"`
}
OpenAIError represents the error structure returned by OpenAI API
type StreamOptions ¶
type StreamOptions struct {
MaxTokens int `json:"max_tokens,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.