update: Add support for post tools, add round limits, per-round token… (#1230)

Co-authored-by: Kent Dong <ch3cho@qq.com>
This commit is contained in:
xingyunyang01
2024-08-22 16:33:42 +08:00
committed by GitHub
parent 29fcd330d5
commit 895f17f8d8
4 changed files with 345 additions and 137 deletions

View File

@@ -37,8 +37,9 @@ type Usage struct {
// completion
type Completion struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Model string `json:"model"`
Messages []Message `json:"messages"`
MaxTokens int64 `json:"max_tokens"`
}
type Message struct {
@@ -67,9 +68,3 @@ type CompletionUsage struct {
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
}
type Content struct {
CH_Question string `json:"ch_question"`
Core string `json:"core"`
// EN_Question string `json:"en_question"`
}