mirror of
https://github.com/fumiama/deepinfra.git
synced 2026-06-12 22:40:14 +08:00
feat: add chat
This commit is contained in:
18
chat/item.go
Normal file
18
chat/item.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package chat
|
||||
|
||||
import "strings"
|
||||
|
||||
type item struct {
|
||||
isatme bool
|
||||
usr, txt string
|
||||
}
|
||||
|
||||
func (item *item) writeToBuilder(sb *strings.Builder, atprefix, namel, namer string) {
|
||||
if item.isatme {
|
||||
sb.WriteString(atprefix)
|
||||
}
|
||||
sb.WriteString(namel)
|
||||
sb.WriteString(item.usr)
|
||||
sb.WriteString(namer)
|
||||
sb.WriteString(item.txt)
|
||||
}
|
||||
Reference in New Issue
Block a user