mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-11 11:13:40 +08:00
feat: 补全记录返回提示词
This commit is contained in:
@@ -2008,6 +2008,9 @@
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -87,6 +87,7 @@ func (c *CompletionRecord) From(e *db.Task) *CompletionRecord {
|
||||
|
||||
type CompletionInfo struct {
|
||||
ID string `json:"id"`
|
||||
Prompt string `json:"prompt"`
|
||||
Content string `json:"content"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
}
|
||||
@@ -96,6 +97,7 @@ func (c *CompletionInfo) From(e *db.Task) *CompletionInfo {
|
||||
return c
|
||||
}
|
||||
c.ID = e.TaskID
|
||||
c.Prompt = e.Prompt
|
||||
c.Content = e.Completion
|
||||
c.CreatedAt = e.CreatedAt.Unix()
|
||||
return c
|
||||
|
||||
Reference in New Issue
Block a user