Skip to content

python llama_index 配置

python
from llama_index.llms.openai import OpenAI

llm = OpenAI(
    model="gpt-3.5-turbo",
    api_key="sk-xxxxx",
    api_base="https://www.anyapi.vip/v1")
ret=llm.complete("Paul Graham is ")
print(ret)

AnyAPI — 专业的 AI 接口聚合服务