ollama/llama/utils.go

16 lines
196 B
Go
Raw Normal View History

2023-07-07 22:29:17 +00:00
package llama
2023-07-19 19:47:15 +00:00
import (
"fmt"
"time"
)
2023-07-07 22:29:17 +00:00
2023-07-19 19:47:15 +00:00
func parseDurationMs(ms float64) time.Duration {
dur, err := time.ParseDuration(fmt.Sprintf("%fms", ms))
if err != nil {
panic(err)
2023-07-07 22:29:17 +00:00
}
2023-07-19 19:47:15 +00:00
return dur
2023-07-07 22:29:17 +00:00
}