How to Integrate Novita AI with LiteLLM
Step 1: Install LiteLLM
- Install the LiteLLM library using pip to create a unified interface for working with different language models.
Step 2: Set Up Your API Credentials
-
Log in to the key management page in Novita AI and click
Add New Key
to generate your API key.
Step 3: Structure Your Basic API Call
- Create a completion request to Novita AI’s models through LiteLLM’s standardized interface.
Step 4: Implement Streaming for Better User Experience
- Enable streaming mode for more interactive applications or when handling longer responses.