BazaarLinkBazaarLink
ログイン
ドキュメントAPIリファレンスSDKリファレンスエージェント利用AIスキル
目次

LlamaIndex

LlamaIndex

LlamaIndex RAGパイプラインでBazaarLinkを使用。LlamaIndexは任意のOpenAI互換エンドポイントをサポート — パラメータを2つ変更するだけ。

from llama_index.llms.openai import OpenAI
from llama_index.core import Settings

Settings.llm = OpenAI(
    model="openai/gpt-4o",
    api_base="https://api.bazaarlink.ai/v1",
    api_key="sk-bl-YOUR_API_KEY",
)

# Now use LlamaIndex normally — it calls BazaarLink
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader

documents = SimpleDirectoryReader("./docs").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query("What is this documentation about?")
print(response)
サポート
こんにちは。どのようなご用件でしょうか?
メッセージをお送りください。担当者より返信します。
LlamaIndex | BazaarLink