Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] add support for nvidia api? #472

Open
techriffic opened this issue Apr 22, 2024 · 0 comments
Open

[FEATURE] add support for nvidia api? #472

techriffic opened this issue Apr 22, 2024 · 0 comments

Comments

@techriffic
Copy link

nvidia gives out 5000 credits to devs perhaps adding its support could be useful for testing?

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/llama3-70b",
messages=[{"role":"user","content":""}],
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="")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant