Documentation
¶
Index ¶
- type Message
- type Playground
- func (p *Playground) AddMessage(sessionID, role, content string, tokens int)
- func (p *Playground) CreateSession(id, model string) *PlaygroundSession
- func (p *Playground) EstimateCost(sessionID string) float64
- func (p *Playground) GetSession(id string) *PlaygroundSession
- func (p *Playground) ListSessions() []*PlaygroundSession
- type PlaygroundEngine
- func (e *PlaygroundEngine) AddMessage(sessionID, role, content string) *Message
- func (e *PlaygroundEngine) CompareModels(sessionID string, models []string) map[string]float64
- func (e *PlaygroundEngine) CreateSession(model string) *Session
- func (e *PlaygroundEngine) EstimateCost(sessionID string, inputCost, outputCost float64) float64
- func (e *PlaygroundEngine) ExportSession(sessionID string) string
- func (e *PlaygroundEngine) GetSession(sessionID string) *Session
- func (e *PlaygroundEngine) ListSessions() []*Session
- type PlaygroundMessage
- type PlaygroundSession
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Playground ¶
type Playground struct {
// contains filtered or unexported fields
}
func NewPlayground ¶
func NewPlayground() *Playground
func (*Playground) AddMessage ¶
func (p *Playground) AddMessage(sessionID, role, content string, tokens int)
func (*Playground) CreateSession ¶
func (p *Playground) CreateSession(id, model string) *PlaygroundSession
func (*Playground) EstimateCost ¶
func (p *Playground) EstimateCost(sessionID string) float64
func (*Playground) GetSession ¶
func (p *Playground) GetSession(id string) *PlaygroundSession
func (*Playground) ListSessions ¶
func (p *Playground) ListSessions() []*PlaygroundSession
type PlaygroundEngine ¶
type PlaygroundEngine struct {
// contains filtered or unexported fields
}
func NewPlaygroundEngine ¶
func NewPlaygroundEngine() *PlaygroundEngine
func (*PlaygroundEngine) AddMessage ¶
func (e *PlaygroundEngine) AddMessage(sessionID, role, content string) *Message
func (*PlaygroundEngine) CompareModels ¶
func (e *PlaygroundEngine) CompareModels(sessionID string, models []string) map[string]float64
func (*PlaygroundEngine) CreateSession ¶
func (e *PlaygroundEngine) CreateSession(model string) *Session
func (*PlaygroundEngine) EstimateCost ¶
func (e *PlaygroundEngine) EstimateCost(sessionID string, inputCost, outputCost float64) float64
func (*PlaygroundEngine) ExportSession ¶
func (e *PlaygroundEngine) ExportSession(sessionID string) string
func (*PlaygroundEngine) GetSession ¶
func (e *PlaygroundEngine) GetSession(sessionID string) *Session
func (*PlaygroundEngine) ListSessions ¶
func (e *PlaygroundEngine) ListSessions() []*Session
type PlaygroundMessage ¶
type PlaygroundSession ¶
Click to show internal directories.
Click to hide internal directories.