go : exposed various parts to the Go Interface (#697)

This commit is contained in:
Brian Murray
2023-04-14 09:52:10 -06:00
committed by GitHub
parent 463e46338c
commit 6704a81255
4 changed files with 30 additions and 7 deletions

View File

@@ -105,6 +105,10 @@ func (p *Params) SetMaxSegmentLength(n int) {
p.max_len = C.int(n)
}
func (p *Params) SetTokenTimestamps(b bool) {
p.token_timestamps = toBool(b)
}
// Set max tokens per segment (0 = no limit)
func (p *Params) SetMaxTokensPerSegment(n int) {
p.max_tokens = C.int(n)