Documentation
¶
Index ¶
- func BuildTokenizeURL(endpoint string) (string, error)
- func CallTokenizeAPI(tokenizeURL, prompt string) (int, error)
- func GetRandomPromptByTokenCount(endpoint string, targetTokens int) (string, error)
- func GetSystemPrompt(cfg *config.SystemPromptTemplate) string
- func LoadDataset(filePath, fileType string, systemPrompt string) ([]provider.AnyParams, error)
- func SaveBatchResultsToJSONL(results []*engine.Result, filePath string) error
- type TokenizeRequest
- type TokenizeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTokenizeURL ¶ added in v0.2.5
BuildTokenizeURL parses the endpoint and constructs the tokenize URL
func CallTokenizeAPI ¶ added in v0.2.5
CallTokenizeAPI calls the vLLM tokenize endpoint and returns the token count
func GetRandomPromptByTokenCount ¶ added in v0.2.5
GetRandomPromptByTokenCount generates a random prompt with specified token count It calls the vLLM /tokenize endpoint to verify token count and adjusts accordingly
func GetSystemPrompt ¶ added in v0.2.0
func GetSystemPrompt(cfg *config.SystemPromptTemplate) string
GetSystemPrompt retrieves system prompt content based on configuration If both content and path are set, content takes precedence
func LoadDataset ¶
LoadDataset loads test data from a file
Types ¶
type TokenizeRequest ¶ added in v0.2.5
type TokenizeRequest struct {
Prompt string `json:"prompt"`
}
TokenizeRequest represents the request body for /tokenize endpoint
Click to show internal directories.
Click to hide internal directories.