from llm_compiler.llm_interface.chatgpt import ChatGPT

def load_llm(engine):
    split_point = engine.index("/")
    platform, engine_short = engine[:split_point], engine[split_point+1:]
    if platform == "openai":
        llm = ChatGPT(engine_short)
    else:
        raise NotImplementedError(f"platform {platform} not supported")
    return llm