Skip to content

Commit 7d59292

Browse files
committed
update
1 parent 14a729d commit 7d59292

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

llama2.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,33 @@ func Llama2() {
8585
//page_llama2.Timeout(10 * time.Second).MustElementX("//button[contains(text(), 'Stop')]").MustWaitVisible().CancelTimeout()
8686
page_llama2.Timeout(10 * time.Second).MustElementX("//button[@id='component-15']").MustWaitVisible().CancelTimeout()
8787
})
88+
//fmt.Println("find stop button")
8889
if err == nil {
8990
err = rod.Try(func() {
9091
//page_llama2.Timeout(80 * time.Second).MustElementX("//button[contains(text(), 'Stop')]").MustWaitInvisible().CancelTimeout()
9192
page_llama2.Timeout(80 * time.Second).MustElementX("//button[@id='component-15']").MustWaitInvisible().CancelTimeout()
93+
//fmt.Println("disappear stop button")
9294
})
9395
if err == nil {
9496
stop_icon_disappear = true
9597
} else {
96-
//fmt.Println("err::::", err)
98+
//fmt.Println("err in find disappear stop button", err)
9799
}
98100
} else {
99-
//fmt.Println("err::", err)
101+
//fmt.Println("err in find stop button", err)
100102
}
101103

104+
//if page_llama2.MustHas("span:contains('Error')") {
105+
fmt.Println("finding Error")
106+
if page_llama2.MustHasX("//span[contains(text(), 'Error')]"){
107+
108+
//fmt.Println("find Error")
109+
channel_llama2 <- "✘✘ Llama2, Please check the internet connection and verify login status."
110+
relogin_llama2 = true
111+
}
112+
113+
114+
102115
if stop_icon_disappear == true {
103116
//answer := page_llama2.MustElementX("(//div[@data-testid='bot'])[last()]").MustText()
104117
answer := page_llama2.MustElementX("(//button[@data-testid='bot'])[last()]").MustText()

0 commit comments

Comments
 (0)