import requests


def get_model(endpoint, port, model_id):
    """
    Retrieve a model from an OpenSearch cluster
    Args:
        endpoint: Endpoint OpenSearch is running on
        port: Port OpenSearch is running on
        model_id: ID of model to be deleted
    Returns:
        Get model response
    """
    response = requests.get('http://' + endpoint + ':' + str(port) +
                            '/_plugins/_knn/models/' + model_id,
                            headers={'content-type': 'application/json'})
    return response.json()