I want to try out the new NVIDIA Nemotron 70b model trough Nvidia OpenaAI API. Code works fine with an OpenAi GPT4o model but added a new “OpenAI Chat Model” to an Agent node, added the API key, although it said it was wrong but I guess it checked against OpenAi and not Nvidia.
Anyway, I get error “400 status code (no body)” when running the Agent.
If I supply a invalid password I get code 401 with same text.
I tested the model with the supplied curl command and it worked.
Sample code from Nvidia is:
from openai import OpenAI
client = OpenAI(
base_url = "https://integrate.api.nvidia.com/v1",
api_key = "$API_KEY_REQUIRED_IF_EXECUTING_OUTSIDE_NGC"
)
completion = client.chat.completions.create(
model="nvidia/llama-3.1-nemotron-70b-instruct",
messages=[{"role":"user","content":"Write a limerick about the wonders of GPU computing."}],
temperature=0.5,
top_p=1,
max_tokens=1024,
stream=True
)
for chunk in completion:
if chunk.choices[0].delta.content is not None:
print(chunk.choices[0].delta.content, end="")
Information on your n8n setup
- n8n 1.64.3
- Running n8n via Docker.
- Operating system: Ubuntu 24.04.1 LTS