feat: able to test channels now (#59)

This commit is contained in:
JustSong
2023-05-15 10:48:52 +08:00
parent b44f0519a0
commit 443a22b75d
4 changed files with 133 additions and 1 deletions

View File

@@ -19,6 +19,11 @@ type Message struct {
Content string `json:"content"`
}
type ChatRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
}
type TextRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
@@ -32,8 +37,16 @@ type Usage struct {
TotalTokens int `json:"total_tokens"`
}
type OpenAIError struct {
Message string `json:"message"`
Type string `json:"type"`
Param string `json:"param"`
Code string `json:"code"`
}
type TextResponse struct {
Usage `json:"usage"`
Error OpenAIError `json:"error"`
}
type StreamResponse struct {