Skip to content

Commit b64c41a

Browse files
committed
enhance ai result
1 parent ed8f3dd commit b64c41a

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

server/api/search_result.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func StartAITask(c *gin.Context) {
9292
}
9393
ans := service.Question("You are a security operation engineer, you are expected to assistant."+
9494
"please judge if the below content contains sensitive information,including password, credentials,token,etc. "+
95-
"The sensitive information could be exploited. Just answer yes or no.",
95+
"The sensitive information could be exploited. Just answer yes or no",
9696
content)
9797
global.GVA_LOG.Info(content)
9898
global.GVA_LOG.Info(ans)

server/service/ai.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
type Message struct {
1313
Role string `json:"role"`
1414
Content string `json:"content"`
15+
Reason string `json:"reasoning_content"`
1516
}
1617

1718
type ChatCompletionRequest struct {

server/service/ai_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
func TestQuestion(t *testing.T) {
9-
result := Question("You are a security operation engineer, you are expected to assistant.please judge if the below content contains sensitive information, and the sensitive information \" +\n\t\t\t\t\"could be exploited. Just answer yes or no.",
9+
result := Question("You are a security operation engineer, you are expected to assistant.please judge if the below content contains sensitive information, and the sensitive information \" +\n\t\t\t\t\"could be exploited. Just answer yes or no",
1010
"# PopWin_MeiTuan\n仿美团做的一个下拉选择页,类似于电商app中筛选距离的下拉菜单。很常见。\n#效果图\n![](https://github.com/reallin/PopWin_MeiTuan/blob/master/cam.gif)\n#功能点\n* popwindow下拉列表\n* 加载progressBar的生成")
1111
fmt.Println(result)
1212
}

0 commit comments

Comments
 (0)