From 4c994282b07a78ef0ea9262b54cab57202ba7e05 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Mon, 10 Mar 2025 23:38:33 +0300 Subject: Feat: a bit of progress with r1 --- models/models.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'models') 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"` -- cgit v1.2.3