Files
fil/docs/snippets/elixir/api/extract_file_async.md

22 lines
396 B
Markdown
Raw Permalink Normal View History

2026-06-01 23:40:55 +02:00
```elixir title="Elixir"
defmodule Example do
def extract_file_async do
config = nil
task = Task.async(fn ->
Kreuzberg.extract_file_async("document.pdf", nil, config)
end)
case Task.await(task) do
{:ok, result} ->
IO.puts("Content: #{result}")
:ok
{:error, reason} ->
IO.puts("Error: #{reason}")
:error
end
end
end
```