diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/models.go | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go index 574be1c..12311ff 100644 --- a/models/models.go +++ b/models/models.go @@ -123,7 +123,7 @@ type DSChatReq struct { // TopLogprobs any `json:"top_logprobs"` } -func NewDSCharReq(cb *ChatBody) DSChatReq { +func NewDSCharReq(cb ChatBody) DSChatReq { return DSChatReq{ Messages: cb.Messages, Model: cb.Model, @@ -223,6 +223,23 @@ type DSChatResp struct { } `json:"usage"` } +type DSChatStreamResp struct { + ID string `json:"id"` + Object string `json:"object"` + Created int `json:"created"` + Model string `json:"model"` + SystemFingerprint string `json:"system_fingerprint"` + Choices []struct { + Index int `json:"index"` + Delta struct { + Content string `json:"content"` + ReasoningContent string `json:"reasoning_content"` + } `json:"delta"` + Logprobs any `json:"logprobs"` + FinishReason string `json:"finish_reason"` + } `json:"choices"` +} + type EmbeddingResp struct { Embedding []float32 `json:"embedding"` Index uint32 `json:"index"` |