Include chat, weather, image, travel, streaming ASR and text examples, shared model initialization, documentation, and existing tests. Co-authored-by: TRAE CLI <traecli@bytedance.com>
15 lines
257 B
Go
15 lines
257 B
Go
package internal
|
|
|
|
import "fmt"
|
|
|
|
func EventHandler(data StreamData) {
|
|
switch data.Type {
|
|
case EventTypeFinal:
|
|
fmt.Printf("最终请求文本> %s\n", data.Data)
|
|
case EventTypeChunk:
|
|
fmt.Printf("流式输入> %s\n", data.Data)
|
|
case EventTypeEnd:
|
|
}
|
|
|
|
}
|