mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
enhance: chat with LLM
This commit is contained in:
parent
e84ea98be9
commit
642e21a260
40 changed files with 544 additions and 250 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue