enhance: chat with LLM

This commit is contained in:
Jacky 2024-05-02 12:49:01 +08:00
parent e84ea98be9
commit 642e21a260
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
40 changed files with 544 additions and 250 deletions

View file

@ -22,6 +22,7 @@ type Stream struct {
Config string `json:"config"`
ChatGPTMessages []openai.ChatCompletionMessage `json:"chatgpt_messages,omitempty"`
Tokenized *nginx.NgxConfig `json:"tokenized,omitempty"`
Filepath string `json:"filepath"`
}
func GetStreams(c *gin.Context) {
@ -133,6 +134,7 @@ func GetStream(c *gin.Context) {
Name: name,
Config: string(origContent),
ChatGPTMessages: chatgpt.Content,
Filepath: path,
})
return
}
@ -152,6 +154,7 @@ func GetStream(c *gin.Context) {
Config: nginxConfig.FmtCode(),
Tokenized: nginxConfig,
ChatGPTMessages: chatgpt.Content,
Filepath: path,
})
}