Set up LlamaIndex with uncensored AI models
LlamaIndex reaches a custom OpenAI-compatible endpoint through OpenAILike, not the plain OpenAI class, which rejects unknown model names.
- Base URL
- https://wildwestapi.com/v1
- API key
- Get one free, starts sk-ww-
- Example model
- outlaw-1-xploded
OpenAILike
Python
# pip install llama-index-llms-openai-like from llama_index.llms.openai_like import OpenAILike llm = OpenAILike( model="outlaw-1-xploded", api_base="https://wildwestapi.com/v1", api_key="sk-ww-...", is_chat_model=True, is_function_calling_model=True, context_window=1048576, ) print(llm.complete("Hello"))
Two settings that trip people up is_chat_model=True is required, or LlamaIndex calls a completions endpoint Wild West API does not serve. Set context_window to the model's real value (the default is 3900). Set is_function_calling_model=True only for a tool-capable model. Do not use llama_index.llms.openai.OpenAI, which raises "Unknown model" for non-OpenAI ids.