mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
(docs) validate keys
This commit is contained in:
parent
c7752be7d3
commit
313eee17e3
1 changed files with 2 additions and 2 deletions
|
|
@ -124,7 +124,7 @@ response = completion("command-nightly", messages, api_version="2023-02-15")
|
|||
|
||||
Check if a user submitted a valid key for the model they're trying to call.
|
||||
|
||||
```
|
||||
```python
|
||||
key = "bad-key"
|
||||
response = check_valid_key(model="gpt-3.5-turbo", api_key=key)
|
||||
assert(response == False)
|
||||
|
|
@ -134,7 +134,7 @@ assert(response == False)
|
|||
|
||||
This helper reads the .env and returns a list of supported llms for user
|
||||
|
||||
```
|
||||
```python
|
||||
old_environ = os.environ
|
||||
os.environ = {'OPENAI_API_KEY': 'temp'} # mock set only openai key in environ
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue