ollama/llm/utils.go
2023-08-10 09:23:10 -07:00

15 lines
194 B
Go

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