summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-03-10 23:38:33 +0300
committerGrail Finder <wohilas@gmail.com>2025-03-10 23:38:33 +0300
commit4c994282b07a78ef0ea9262b54cab57202ba7e05 (patch)
treeffc428e18d3285badf664cf8c7a1a7facf3f2091 /models
parent53e9dff38725b20d74339368de807f69fde45728 (diff)
Feat: a bit of progress with r1
Diffstat (limited to 'models')
-rw-r--r--models/models.go19
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"`