Skip to content

Commit

Permalink
now uses modele not function
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartjohnpage committed Mar 8, 2024
1 parent 6aac8f1 commit cc6dcd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/text_chunker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defmodule TextChunker do
@default_opts [
chunk_size: 2000,
chunk_overlap: 200,
strategy: &RecursiveChunk.split/2,
strategy: RecursiveChunk,
format: :plaintext
]

Expand Down Expand Up @@ -43,6 +43,6 @@ defmodule TextChunker do
def split(text, opts \\ []) do
opts = Keyword.merge(@default_opts, opts)

opts[:strategy].(text, opts)
opts[:strategy].split(text, opts)
end
end

0 comments on commit cc6dcd3

Please sign in to comment.