Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eniompw/nvidia-nim
Example Code for using NVIDIA NIM APIs
https://github.com/eniompw/nvidia-nim
chatgpt llm nim nvidia
Last synced: about 2 months ago
JSON representation
Example Code for using NVIDIA NIM APIs
- Host: GitHub
- URL: https://github.com/eniompw/nvidia-nim
- Owner: eniompw
- License: mit
- Created: 2024-07-13T08:29:19.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T11:23:07.000Z (4 months ago)
- Last Synced: 2024-10-19T11:41:26.557Z (4 months ago)
- Topics: chatgpt, llm, nim, nvidia
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NVIDIA-NIM
Example code for using NVIDIA NIM APIs
## Setup
1. Create a `.env` file in the project root:
```
NV_API_KEY=your-api-key-here
```2. Install dependencies:
```bash
pip install -r requirements.txt
```## Usage
This repository contains two example scripts:
1. `rest.py`: A simple REST API implementation
2. `openai.py`: An example using the OpenAI-compatible APIRun either script to test the NVIDIA NIM API:
```bash
python rest.py
# or
python openai.py
```## References
- [NVIDIA NIM APIs Documentation](https://build.nvidia.com/explore/discover)
- [Available Models](https://build.nvidia.com/models)## License
[MIT License](LICENSE)