[Bug]: DocumentBlock doesn't work with BedrockConverse

### Bug Description

Trying to use DocumentBlock in Bedrock converse but failing due to an unexpected error.

### Version

llama-index-0.12.37 llama-index-llms-bedrock-converse ( 0.5.4)

### Steps to Reproduce

```
from llama_index.core.llms import ChatMessage, DocumentBlock, MessageRole, TextBlock
from llama_index.llms.bedrock_converse import BedrockConverse


llm = BedrockConverse(
    model="anthropic.claude-3-haiku-20240307-v1:0",
)
msg = ChatMessage(role=MessageRole.USER, blocks=[DocumentBlock(path="Cushman.pdf"), TextBlock(text="What does this file contain?")])

messages = [msg]
response = llm.chat(messages)
print(response.message.blocks[0].text)
```

### Relevant Logs/Tracbacks

```shell
---------------------------------------------------------------------------
ValidationException                       Traceback (most recent call last)
Cell In[7], line 11
      8 msg = ChatMessage(role=MessageRole.USER, blocks=[DocumentBlock(path="Cushman.pdf"), TextBlock(text="What does this file contain?")])
     10 messages = [msg]
---> 11 response = llm.chat(messages)
     12 print(response.message.blocks[0].text)

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/llama_index/core/instrumentation/dispatcher.py:324, in Dispatcher.span.<locals>.wrapper(func, instance, args, kwargs)
    321             _logger.debug(f"Failed to reset active_span_id: {e}")
    323 try:
--> 324     result = func(*args, **kwargs)
    325     if isinstance(result, asyncio.Future):
    326         # If the result is a Future, wrap it
    327         new_future = asyncio.ensure_future(result)

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/llama_index/core/llms/callbacks.py:173, in llm_chat_callback.<locals>.wrap.<locals>.wrapped_llm_chat(_self, messages, **kwargs)
    164 event_id = callback_manager.on_event_start(
    165     CBEventType.LLM,
    166     payload={
   (...)
    170     },
    171 )
    172 try:
--> 173     f_return_val = f(_self, messages, **kwargs)
    174 except BaseException as e:
    175     callback_manager.on_event_end(
    176         CBEventType.LLM,
    177         payload={EventPayload.EXCEPTION: e},
    178         event_id=event_id,
    179     )

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/llama_index/llms/bedrock_converse/base.py:360, in BedrockConverse.chat(self, messages, **kwargs)
    357 all_kwargs = self._get_all_kwargs(**kwargs)
    359 # invoke LLM in AWS Bedrock Converse with retry
--> 360 response = converse_with_retry(
    361     client=self._client,
    362     messages=converse_messages,
    363     system_prompt=system_prompt,
    364     max_retries=self.max_retries,
    365     stream=False,
    366     guardrail_identifier=self.guardrail_identifier,
    367     guardrail_version=self.guardrail_version,
    368     trace=self.trace,
    369     **all_kwargs,
    370 )
    372 content, tool_calls, tool_call_ids, status = self._get_content_and_tool_calls(
    373     response
    374 )
    376 return ChatResponse(
    377     message=ChatMessage(
    378         role=MessageRole.ASSISTANT,
   (...)
    387     additional_kwargs=self._get_response_token_counts(dict(response)),
    388 )

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/llama_index/llms/bedrock_converse/utils.py:450, in converse_with_retry(client, model, messages, max_retries, system_prompt, max_tokens, temperature, stream, guardrail_identifier, guardrail_version, trace, **kwargs)
    447         return client.converse_stream(**kwargs)
    448     return client.converse(**kwargs)
--> 450 return _conversion_with_retry(**converse_kwargs)

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/tenacity/__init__.py:338, in BaseRetrying.wraps.<locals>.wrapped_f(*args, **kw)
    336 copy = self.copy()
    337 wrapped_f.statistics = copy.statistics  # type: ignore[attr-defined]
--> 338 return copy(f, *args, **kw)

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/tenacity/__init__.py:477, in Retrying.__call__(self, fn, *args, **kwargs)
    475 retry_state = RetryCallState(retry_object=self, fn=fn, args=args, kwargs=kwargs)
    476 while True:
--> 477     do = self.iter(retry_state=retry_state)
    478     if isinstance(do, DoAttempt):
    479         try:

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/tenacity/__init__.py:378, in BaseRetrying.iter(self, retry_state)
    376 result = None
    377 for action in self.iter_state.actions:
--> 378     result = action(retry_state)
    379 return result

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/tenacity/__init__.py:400, in BaseRetrying._post_retry_check_actions.<locals>.<lambda>(rs)
    398 def _post_retry_check_actions(self, retry_state: "RetryCallState") -> None:
    399     if not (self.iter_state.is_explicit_retry or self.iter_state.retry_run_result):
--> 400         self._add_action_func(lambda rs: rs.outcome.result())
    401         return
    403     if self.after is not None:

File ~/.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py:449, in Future.result(self, timeout)
    447     raise CancelledError()
    448 elif self._state == FINISHED:
--> 449     return self.__get_result()
    451 self._condition.wait(timeout)
    453 if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:

File ~/.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py:401, in Future.__get_result(self)
    399 if self._exception:
    400     try:
--> 401         raise self._exception
    402     finally:
    403         # Break a reference cycle with the exception in self._exception
    404         self = None

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/tenacity/__init__.py:480, in Retrying.__call__(self, fn, *args, **kwargs)
    478 if isinstance(do, DoAttempt):
    479     try:
--> 480         result = fn(*args, **kwargs)
    481     except BaseException:  # noqa: B902
    482         retry_state.set_exception(sys.exc_info())  # type: ignore[arg-type]

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/llama_index/llms/bedrock_converse/utils.py:448, in converse_with_retry.<locals>._conversion_with_retry(**kwargs)
    446 if stream:
    447     return client.converse_stream(**kwargs)
--> 448 return client.converse(**kwargs)

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/botocore/client.py:569, in ClientCreator._create_api_method.<locals>._api_call(self, *args, **kwargs)
    565     raise TypeError(
    566         f"{py_operation_name}() only accepts keyword arguments."
    567     )
    568 # The "self" in this scope is referring to the BaseClient.
--> 569 return self._make_api_call(operation_name, kwargs)

File ~/ci-agent-service-api/.venv/lib/python3.12/site-packages/botocore/client.py:1023, in BaseClient._make_api_call(self, operation_name, api_params)
   1019     error_code = error_info.get("QueryErrorCode") or error_info.get(
   1020         "Code"
   1021     )
   1022     error_class = self.exceptions.from_code(error_code)
-> 1023     raise error_class(parsed_response, operation_name)
   1024 else:
   1025     return parsed_response

ValidationException: An error occurred (ValidationException) when calling the Converse operation: The detected filetype is PLAIN_TEXT, but the provided filetype was PDF.
```

Labels: bug, triage
State: closed