אינטגרציה · הגדרה תוך 60 שניות · ללא תוספת מחיר

LlamaIndex + OrcaRouter

LlamaIndex's OpenAI LLM class accepts api_base and api_key overrides. Route indexing, query, and synthesis calls through OrcaRouter for zero markup and automatic failover across providers.

הגדרה

חמישה שלבים.

  1. 1.Install: pip install llama-index-llms-openai
  2. 2.Import OpenAI from llama_index.llms.openai
  3. 3.Construct with api_base='https://api.orcarouter.ai/v1' and api_key='sk-orca-…'
  4. 4.Assign to Settings.llm so every query engine picks it up.
  5. 5.Build indices and query as usual — synthesis routes through OrcaRouter.
תצורה
from llama_index.llms.openai import OpenAI
from llama_index.core import Settings

Settings.llm = OpenAI(
    api_base="https://api.orcarouter.ai/v1",
    api_key="sk-orca-...",
    model="gpt-4o",
)

# Now every query engine, agent, and chat engine uses OrcaRouter.
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
docs = SimpleDirectoryReader("./data").load_data()
index = VectorStoreIndex.from_documents(docs)
response = index.as_query_engine().query("Summarize the key points.")
למה לנתב את LlamaIndex דרך OrcaRouter?

RAG pipelines make many small calls per query (retrieve → rerank → synthesize). OrcaRouter's per-request routing means each of those calls independently picks the cheapest healthy backend, and you see the full breakdown in one dashboard.

אינטגרציות נוספות

נתבו את LlamaIndex דרך OrcaRouter כבר היום.

הירשם תוך פחות מדקה, קבל מפתח sk-orca-… והדבק אותו ב-LlamaIndex. ללא תוספת מחיר על טוקנים. מעבר אוטומטי לגיבוי בין כל הספקים.

קבלו את מפתח ה-API שלכם ←
© 2026 OrcaRouter

לספקים

מפעילים פלטפורמת הסקה (inference)? הציגו את המודלים שלכם ב-OrcaRouter.

צרו קשר

הצטרפו לקהילה שלנו

DiscordEmailXGitHubYouTube