mirror of
https://github.com/fumiama/deepinfra.git
synced 2026-06-06 01:00:34 +08:00
29 lines
373 B
Go
29 lines
373 B
Go
package model
|
|
|
|
import (
|
|
"bytes"
|
|
"io"
|
|
)
|
|
|
|
type Inputer interface {
|
|
Body() *bytes.Buffer
|
|
Parse(io.Reader) error
|
|
}
|
|
|
|
type Outputer interface {
|
|
Output() string
|
|
OutputRaw() string
|
|
}
|
|
|
|
type MessageBuilder[T any] interface {
|
|
System(prompt string) T
|
|
User(prompt string) T
|
|
Assistant(prompt string) T
|
|
}
|
|
|
|
type Protocol interface {
|
|
Inputer
|
|
Outputer
|
|
MessageBuilder[Protocol]
|
|
}
|