pip install llama-index-llms-openai-like
from llama_index.llms.openai_like import OpenAILike llm = OpenAILike(model="some model", api_key="fake", api_base="....")
from llama_index.llms.openai_like import OpenAILike # Instantiate an OpenAILike model llm = OpenAILike( model="tgi", api_key="<HF_API_TOKEN>", api_base="<ENDPOINT_URL>" + "/v1/", is_chat_model=True, is_local=False, is_function_calling_model=False, context_window=32000, )