1
0
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:
源文雨
2025-02-22 01:02:48 +09:00
parent 6b99264c6b
commit ce98a6b278
7 changed files with 209 additions and 205 deletions

View File

@@ -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]
}