Skip to content

Commit

Permalink
using the chunkSize value provided in the opts
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielluizsf committed May 24, 2024
1 parent 631b64d commit b13a10b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions embedding.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ type ChunkTextOpts struct {

// ChunkText splits the input text into chunks of specified size.
func ChunkText(opts ChunkTextOpts) []string {
var chunkSize int
if opts.ChunkSize <= 0 {
chunkSize := opts.ChunkSize
if chunkSize <= 0 {
chunkSize = 512
}

Expand Down

0 comments on commit b13a10b

Please sign in to comment.