Fix `NvcfGenerator` for NIM update
NIM updates have totally changed the way we interact with NVCF.
Example code for correct interaction with NIMs:
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="meta/codellama-70b",
messages=[{"role":"user","content":""}],
temperature=0.1,
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="")
Does the old API no longer work? OpenAI's module doesn't support multiprocessing, making scans with it intractable
@leondz it does not seem to, no. Will ping you offline to discuss further.
New REST API is up w/ direct HTTP access, will adapt this generator accordingly
NVCF now seems to be around in its original form - see NVCF API docs. Catalog items on AI Catalog that have not been migrated to NIM seem (from their descriptions) to still be available via NVCF. Needs testing.