1
0
mirror of https://github.com/fumiama/deepinfra.git synced 2026-06-05 00:32:46 +08:00

feat: add ollama-compatibility

This commit is contained in:
源文雨
2025-02-22 01:08:12 +09:00
parent ce98a6b278
commit ed1290950d
3 changed files with 6 additions and 6 deletions

View File

@@ -21,8 +21,8 @@ type MessageBuilder[T any] interface {
Assistant(prompt string) T
}
type Protocol[T any] interface {
type Protocol interface {
Inputer
Outputer
MessageBuilder[T]
MessageBuilder[Protocol]
}

View File

@@ -8,8 +8,8 @@ import (
// OLLaMA as an specified example.
type OLLaMA struct {
sep string
Protocol[*OLLaMA] `json:"-"`
sep string
Protocol `json:"-"`
// callback only
ID string `json:"id,omitempty"`
Object string `json:"object,omitempty"`

View File

@@ -23,8 +23,8 @@ type Choice struct {
// OpenAI as an specified example.
type OpenAI struct {
sep string
Protocol[*OpenAI] `json:"-"`
sep string
Protocol `json:"-"`
// callback only
ID string `json:"id,omitempty"`
Object string `json:"object,omitempty"`