From 36c4bc9ec321f176fdd1ffeeb6e37e98b367cc46 Mon Sep 17 00:00:00 2001 From: scalabreseGD <47219719+scalabreseGD@users.noreply.github.com> Date: Thu, 6 Mar 2025 08:25:37 +0100 Subject: [PATCH] Fixed deepcopy failure when passing llm_client (#1089) Co-authored-by: afourney --- packages/markitdown/src/markitdown/_markitdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/markitdown/src/markitdown/_markitdown.py b/packages/markitdown/src/markitdown/_markitdown.py index d88bb73..fd2b85f 100644 --- a/packages/markitdown/src/markitdown/_markitdown.py +++ b/packages/markitdown/src/markitdown/_markitdown.py @@ -455,7 +455,7 @@ class MarkItDown: cur_pos == file_stream.tell() ), f"File stream position should NOT change between guess iterations" - _kwargs = copy.deepcopy(kwargs) + _kwargs = {k:v for k,v in kwargs.items()} # Copy any additional global options if "llm_client" not in _kwargs and self._llm_client is not None: