mirror of
https://github.com/fumiama/deepinfra.git
synced 2026-06-12 05:50:27 +08:00
feat: add ollama-compatibility
This commit is contained in:
13
model/api.go
13
model/api.go
@@ -21,13 +21,8 @@ type MessageBuilder[T any] interface {
|
||||
Assistant(prompt string) T
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
Role string `json:"role"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
type Choice struct {
|
||||
Index int `json:"index"`
|
||||
Message Message `json:"message"`
|
||||
FinishReason string `json:"finish_reason"`
|
||||
type Protocol[T any] interface {
|
||||
Inputer
|
||||
Outputer
|
||||
MessageBuilder[T]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user