def create_index(index_name: str, settings_dict: dict, marqo_config: config.Config = Depends(get_config)):
    """
    Create index with settings. Please refer to the following documents for details about creating different types
    of index:
    - [Unstructured Index](https://docs.marqo.ai/latest/reference/api/indexes/create-index/)
    - [Structured Index](https://docs.marqo.ai/latest/reference/api/indexes/create-structured-index/)
    """
    # TODO this a temporary fix due to the mixed use of pydantic v1 and v2.
    #  IndexSettings can be injected after migrated to v2
    settings = parse_request_object(IndexSettings, settings_dict)
    marqo_config.index_management.create_index(settings.to_marqo_index_request(index_name))
    return JSONResponse(
        content={
            "acknowledged": True,
            "index": index_name
        },
        status_code=200
    )

    Create index with settings. Please refer to the following documents for details about creating different types
    of index:
    - [Unstructured Index](https://docs.marqo.ai/latest/reference/api/indexes/create-index/)
    - [Structured Index](https://docs.marqo.ai/latest/reference/api/indexes/create-structured-index/)
    
src/marqo/tensor_search/api.py