Files
grailbench/models/models.go
2025-08-08 15:47:29 +03:00

70 lines
2.1 KiB
Go

package models
type Question struct {
ID string `json:"id"`
Topic string `json:"topic"`
Question string `json:"question"`
}
type Answer struct {
Q Question
Answer string `json:"answer"`
Model string `json:"model"`
// resp time?
}
// type OpenRouterResp struct {
// ID string `json:"id"`
// Provider string `json:"provider"`
// Model string `json:"model"`
// Object string `json:"object"`
// Created int `json:"created"`
// Choices []struct {
// Logprobs any `json:"logprobs"`
// FinishReason string `json:"finish_reason"`
// NativeFinishReason string `json:"native_finish_reason"`
// Index int `json:"index"`
// Message struct {
// Role string `json:"role"`
// Content string `json:"content"`
// Refusal any `json:"refusal"`
// Reasoning any `json:"reasoning"`
// } `json:"message"`
// } `json:"choices"`
// Usage struct {
// PromptTokens int `json:"prompt_tokens"`
// CompletionTokens int `json:"completion_tokens"`
// TotalTokens int `json:"total_tokens"`
// } `json:"usage"`
// }
type DSResp struct {
ID string `json:"id"`
Choices []struct {
Text string `json:"text"`
Index int `json:"index"`
FinishReason string `json:"finish_reason"`
} `json:"choices"`
Created int `json:"created"`
Model string `json:"model"`
SystemFingerprint string `json:"system_fingerprint"`
Object string `json:"object"`
}
type LLMResp struct {
Index int `json:"index"`
Content string `json:"content"`
Tokens []any `json:"tokens"`
IDSlot int `json:"id_slot"`
Stop bool `json:"stop"`
Model string `json:"model"`
TokensPredicted int `json:"tokens_predicted"`
TokensEvaluated int `json:"tokens_evaluated"`
Prompt string `json:"prompt"`
HasNewLine bool `json:"has_new_line"`
Truncated bool `json:"truncated"`
StopType string `json:"stop_type"`
StoppingWord string `json:"stopping_word"`
TokensCached int `json:"tokens_cached"`
}