Skip to content
Discussion options

You must be logged in to vote

There is no direct support for Nvidia NIM, but according to the NIM documentation, they expose a few OpenAI compatible endpoints, so you could try using the openai client builder with a custom url. Something like

  use rig::prelude::*;
  use rig::providers::openai;

  let client = openai::Client::builder()
      .api_key(std::env::var("NVIDIA_API_KEY")?)
      .base_url("http://localhost:8000/v1")
      .build()?
      .completions_api();

  let agent = client
      .agent("meta/llama-3.1-8b-instruct")
      .build();

https://docs.nvidia.com/nim/large-language-models/latest/reference/api-reference.html

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gold-silver-copper
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants