章北海 (@alertsc) 在 NIVDIA可以调用LLama-3.2但换了base_url 中发帖
本来想在one-api里直接添加。结果发现接口变了。
from openai import OpenAI
client = OpenAI(
base_url = “https://ai.api.nvidia.com/v1/gr/meta/llama-3.2-90b-vision-instruct”,
api_key = “$API_KEY_REQUIRED_IF_EXECUTING_OUTSIDE_NGC”
)
completion = client.chat.completions.create(
model=“meta/llama-3.2-90b-vision-instruct”,
messages=[{“role”:“user”,“content”:“Experiment with some images we have for you.”}],
temperatu...