INNER CODE UNIT · Go
init
easegress-io/easegress · scripts/benchmark/aigateway/llm/main.go:32
func init() {
val := os.Getenv("EG_LLM_TEST_LATENCY")
if val == "" {
return
}
ms, err := time.ParseDuration(val)
if err != nil {
panic(fmt.Errorf("invalid EG_LLM_TEST_LATENCY value: %s, should be a valid duration", val))
}
globalLatency = ms
}
type ChatCompletionRequest struct {
Model string `json:"model"`
Stream bool `json:"stream"`
}
func getNonStreamBody(req *ChatCompletionRequest) any {