models

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Key       string      `json:"key"`
	TestModel []string    `json:"test_model"`
	URL       string      `json:"url"`
	Type      ChannelType `json:"type"`
}

type ChannelType

type ChannelType int

Channel represents a minimal channel structure

const (
	ChannelTypeGemini ChannelType = iota
	ChannelTypeOpenAI
)

type Message

type Message struct {
	Role    string          `json:"role"`
	Content json.RawMessage `json:"content"`
}

Message represents a chat message

type TestResult

type TestResult struct {
	Key      string
	Model    string
	Success  bool
	Latency  float64
	ErrorMsg string
}

TestResult represents a test result

type Usage

type Usage struct {
	PromptTokens     int `json:"prompt_tokens"`
	CompletionTokens int `json:"completion_tokens"`
	TotalTokens      int `json:"total_tokens"`
}

Usage represents token usage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL