llama-stack-mirror/llama_stack
Matthew Farrellee 4e6c984c26
add NVIDIA NIM inference adapter (#355)
# What does this PR do?

this PR adds a basic inference adapter to NVIDIA NIMs

what it does -
 - chat completion api
   - tool calls
   - streaming
   - structured output
   - logprobs
 - support hosted NIM on integrate.api.nvidia.com
 - support downloaded NIM containers

what it does not do -
 - completion api
 - embedding api
 - vision models
 - builtin tools
 - have certainty that sampling strategies are correct

## Feature/Issue validation/testing/test plan

`pytest -s -v --providers inference=nvidia
llama_stack/providers/tests/inference/ --env NVIDIA_API_KEY=...`

all tests should pass. there are pydantic v1 warnings.


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [x] Did you read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes?
- [x] Did you write any new necessary tests?

Thanks for contributing 🎉!
2024-11-23 15:59:00 -08:00
..
apis Fix opentelemetry adapter (#510) 2024-11-22 18:18:11 -08:00
cli No need to use os.path.relpath() when Path() knows everything anyway 2024-11-23 11:45:47 -08:00
distribution Fix opentelemetry adapter (#510) 2024-11-22 18:18:11 -08:00
providers add NVIDIA NIM inference adapter (#355) 2024-11-23 15:59:00 -08:00
scripts Integrate distro docs into the restructured docs 2024-11-20 23:20:05 -08:00
templates Mark some pages as not-in-toctree explicitly 2024-11-23 15:27:44 -08:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00