forked from phoenix/litellm-mirror
docs(user_keys.md): add docs on configurable clientside auth credentials
Allow easy switching of finetuned models
This commit is contained in:
parent
becb4acc24
commit
b2e80ecb8e
1 changed files with 23 additions and 2 deletions
|
@ -1145,11 +1145,32 @@ main();
|
|||
|
||||
</Tabs>
|
||||
|
||||
### Pass User LLM API Keys
|
||||
Allows your users to pass in their OpenAI API key (any LiteLLM supported provider) to make requests
|
||||
### Pass User LLM API Keys / API Base
|
||||
Allows your users to pass in their OpenAI API key/API base (any LiteLLM supported provider) to make requests
|
||||
|
||||
Here's how to do it:
|
||||
|
||||
#### 1. Enable configurable clientside auth credentials for a provider
|
||||
|
||||
```yaml
|
||||
model_list:
|
||||
- model_name: "fireworks_ai/*"
|
||||
litellm_params:
|
||||
model: "fireworks_ai/*"
|
||||
configurable_clientside_auth_params: ["api_base"]
|
||||
```
|
||||
|
||||
Specify any/all auth params you want the user to be able to configure:
|
||||
|
||||
- api_base
|
||||
- api_key
|
||||
- base_url
|
||||
|
||||
(check [provider docs](../providers/) for provider-specific auth params - e.g. `vertex_project`)
|
||||
|
||||
|
||||
#### 2. Test it!
|
||||
|
||||
```python
|
||||
import openai
|
||||
client = openai.OpenAI(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue