prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  fix: fix tags type after pydantic model
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `docarray/document/pydantic_model.py`
  Content:
  ```
  1 from typing import Optional, List, Dict, Any, TYPE_CHECKING, Union
  2 
  3 from pydantic import BaseModel, validator
  4 
  5 from ..math.ndarray import to_list
  6 
  7 if TYPE_CHECKING:
  8     from ..types import ArrayType
  9 
  10 _ProtoValueType = Optional[Union[str, bool, float]]
  11 _StructValueType = Union[
  12     _ProtoValueType, List[_ProtoValueType], Dict[str, _ProtoValueType]
  13 ]
  14 
  15 
  16 def _convert_ndarray_to_list(v: 'ArrayType'):
  17     if v is not None:
  18         return to_list(v)
  19 
  20 
  21 class PydanticDocument(BaseModel):
  22     id: str
  23     parent_id: Optional[str]
  24     granularity: Optional[int]
  25     adjacency: Optional[int]
  26     blob: Optional[bytes]
  27     tensor: Optional[Any]
  28     mime_type: Optional[str]
  29     text: Optional[str]
  30     weight: Optional[float]
  31     uri: Optional[str]
  32     tags: Optional[Dict[str, '_StructValueType']]
  33     offset: Optional[float]
  34     location: Optional[List[float]]
  35     embedding: Optional[Any]
  36     modality: Optional[str]
  37     evaluations: Optional[Dict[str, Dict[str, '_StructValueType']]]
  38     scores: Optional[Dict[str, Dict[str, '_StructValueType']]]
  39     chunks: Optional[List['PydanticDocument']]
  40     matches: Optional[List['PydanticDocument']]
  41 
  42     _tensor2list = validator('tensor', allow_reuse=True)(_convert_ndarray_to_list)
  43     _embedding2list = validator('embedding', allow_reuse=True)(_convert_ndarray_to_list)
  44 
  45 
  46 PydanticDocument.update_forward_refs()
  47 
  48 PydanticDocumentArray = List[PydanticDocument]
  49
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/docarray/document/pydantic_model.py b/docarray/document/pydantic_model.py
  --- a/docarray/document/pydantic_model.py
  +++ b/docarray/document/pydantic_model.py
  @@ -7,7 +7,8 @@
   if TYPE_CHECKING:
       from ..types import ArrayType
   
  -_ProtoValueType = Optional[Union[str, bool, float]]
  +# this order must be preserved: https://pydantic-docs.helpmanual.io/usage/types/#unions
  +_ProtoValueType = Optional[Union[bool, float, str]]
   _StructValueType = Union[
       _ProtoValueType, List[_ProtoValueType], Dict[str, _ProtoValueType]
   ]
  
verification_info: {"golden_diff": "diff --git a/docarray/document/pydantic_model.py b/docarray/document/pydantic_model.py\n--- a/docarray/document/pydantic_model.py\n+++ b/docarray/document/pydantic_model.py\n@@ -7,7 +7,8 @@\n if TYPE_CHECKING:\n     from ..types import ArrayType\n \n-_ProtoValueType = Optional[Union[str, bool, float]]\n+# this order must be preserved: https://pydantic-docs.helpmanual.io/usage/types/#unions\n+_ProtoValueType = Optional[Union[bool, float, str]]\n _StructValueType = Union[\n     _ProtoValueType, List[_ProtoValueType], Dict[str, _ProtoValueType]\n ]\n", "issue": "fix: fix tags type after pydantic model\n\n", "before_files": [{"content": "from typing import Optional, List, Dict, Any, TYPE_CHECKING, Union\n\nfrom pydantic import BaseModel, validator\n\nfrom ..math.ndarray import to_list\n\nif TYPE_CHECKING:\n    from ..types import ArrayType\n\n_ProtoValueType = Optional[Union[str, bool, float]]\n_StructValueType = Union[\n    _ProtoValueType, List[_ProtoValueType], Dict[str, _ProtoValueType]\n]\n\n\ndef _convert_ndarray_to_list(v: 'ArrayType'):\n    if v is not None:\n        return to_list(v)\n\n\nclass PydanticDocument(BaseModel):\n    id: str\n    parent_id: Optional[str]\n    granularity: Optional[int]\n    adjacency: Optional[int]\n    blob: Optional[bytes]\n    tensor: Optional[Any]\n    mime_type: Optional[str]\n    text: Optional[str]\n    weight: Optional[float]\n    uri: Optional[str]\n    tags: Optional[Dict[str, '_StructValueType']]\n    offset: Optional[float]\n    location: Optional[List[float]]\n    embedding: Optional[Any]\n    modality: Optional[str]\n    evaluations: Optional[Dict[str, Dict[str, '_StructValueType']]]\n    scores: Optional[Dict[str, Dict[str, '_StructValueType']]]\n    chunks: Optional[List['PydanticDocument']]\n    matches: Optional[List['PydanticDocument']]\n\n    _tensor2list = validator('tensor', allow_reuse=True)(_convert_ndarray_to_list)\n    _embedding2list = validator('embedding', allow_reuse=True)(_convert_ndarray_to_list)\n\n\nPydanticDocument.update_forward_refs()\n\nPydanticDocumentArray = List[PydanticDocument]\n", "path": "docarray/document/pydantic_model.py"}], "after_files": [{"content": "from typing import Optional, List, Dict, Any, TYPE_CHECKING, Union\n\nfrom pydantic import BaseModel, validator\n\nfrom ..math.ndarray import to_list\n\nif TYPE_CHECKING:\n    from ..types import ArrayType\n\n# this order must be preserved: https://pydantic-docs.helpmanual.io/usage/types/#unions\n_ProtoValueType = Optional[Union[bool, float, str]]\n_StructValueType = Union[\n    _ProtoValueType, List[_ProtoValueType], Dict[str, _ProtoValueType]\n]\n\n\ndef _convert_ndarray_to_list(v: 'ArrayType'):\n    if v is not None:\n        return to_list(v)\n\n\nclass PydanticDocument(BaseModel):\n    id: str\n    parent_id: Optional[str]\n    granularity: Optional[int]\n    adjacency: Optional[int]\n    blob: Optional[bytes]\n    tensor: Optional[Any]\n    mime_type: Optional[str]\n    text: Optional[str]\n    weight: Optional[float]\n    uri: Optional[str]\n    tags: Optional[Dict[str, '_StructValueType']]\n    offset: Optional[float]\n    location: Optional[List[float]]\n    embedding: Optional[Any]\n    modality: Optional[str]\n    evaluations: Optional[Dict[str, Dict[str, '_StructValueType']]]\n    scores: Optional[Dict[str, Dict[str, '_StructValueType']]]\n    chunks: Optional[List['PydanticDocument']]\n    matches: Optional[List['PydanticDocument']]\n\n    _tensor2list = validator('tensor', allow_reuse=True)(_convert_ndarray_to_list)\n    _embedding2list = validator('embedding', allow_reuse=True)(_convert_ndarray_to_list)\n\n\nPydanticDocument.update_forward_refs()\n\nPydanticDocumentArray = List[PydanticDocument]\n", "path": "docarray/document/pydantic_model.py"}]}