LlamaIndex med Muapi
Använd LlamaIndex-adaptern OpenAILike för att anropa Muapis chattmodeller.
pip install llama-index-core llama-index-llms-openai-like
import os
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(
model="qwen-3-8-27b-obliterated",
api_base="https://api.muapi.ai/v1",
api_key=os.environ["MUAPI_API_KEY"],
is_chat_model=True,
is_function_calling_model=True,
)
print(llm.complete("Förklara ett vektorindex med en mening."))
Använd exakt ID från https://api.muapi.ai/v1/models?type=text. Aktivera funktionsanrop endast om capabilities.tools är true. Integrationen gäller chatt, inte embeddings. Se OpenAILike-dokumentationen.