ollama/llama/utils.go
2023-07-27 09:31:44 -07:00

15 lines
196 B
Go

package llama
import (
"fmt"
"time"
)
func parseDurationMs(ms float64) time.Duration {
dur, err := time.ParseDuration(fmt.Sprintf("%fms", ms))
if err != nil {
panic(err)
}
return dur
}