def add_docs_params_orchestrator(index_name: str, body: Union[AddDocsBodyParams, List[Dict]],
                                 device: str) -> AddDocsParams:
    """An orchestrator for the add_documents API.
    All the arguments are decoded and validated in the API function. This function is only responsible for orchestrating.

    Returns:
        AddDocsParams: An AddDocsParams object for internal use
    """
    docs = body.documents

    mappings = body.mappings
    tensor_fields = body.tensorFields
    use_existing_tensors = body.useExistingTensors
    model_auth = body.modelAuth
    media_download_headers = body.mediaDownloadHeaders
    image_download_thread_count = body.imageDownloadThreadCount
    text_chunk_prefix = body.textChunkPrefix

    return AddDocsParams(
        index_name=index_name, docs=docs,
        device=device, tensor_fields=tensor_fields,
        use_existing_tensors=use_existing_tensors, media_download_headers=media_download_headers,
        image_download_thread_count=image_download_thread_count,
        mappings=mappings, model_auth=model_auth, text_chunk_prefix=text_chunk_prefix
    )
An orchestrator for the add_documents API.
    All the arguments are decoded and validated in the API function. This function is only responsible for orchestrating.

    Returns:
        AddDocsParams: An AddDocsParams object for internal use
    
src/marqo/tensor_search/web/api_utils.py