forked from phoenix/litellm-mirror
docs error openai.error instead of openai.errors
This commit is contained in:
parent
810298743c
commit
203aa24aed
3 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ More details 👉
|
||||||
LiteLLM maps exceptions across all supported providers to the OpenAI exceptions. All our exceptions inherit from OpenAI's exception types, so any error-handling you have for that, should work out of the box with LiteLLM.
|
LiteLLM maps exceptions across all supported providers to the OpenAI exceptions. All our exceptions inherit from OpenAI's exception types, so any error-handling you have for that, should work out of the box with LiteLLM.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from openai.errors import OpenAIError
|
from openai.error import OpenAIError
|
||||||
from litellm import completion
|
from litellm import completion
|
||||||
|
|
||||||
os.environ["ANTHROPIC_API_KEY"] = "bad-key"
|
os.environ["ANTHROPIC_API_KEY"] = "bad-key"
|
||||||
|
|
|
@ -297,7 +297,7 @@ for chunk in response:
|
||||||
LiteLLM maps exceptions across all supported providers to the OpenAI exceptions. All our exceptions inherit from OpenAI's exception types, so any error-handling you have for that, should work out of the box with LiteLLM.
|
LiteLLM maps exceptions across all supported providers to the OpenAI exceptions. All our exceptions inherit from OpenAI's exception types, so any error-handling you have for that, should work out of the box with LiteLLM.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from openai.errors import OpenAIError
|
from openai.error import OpenAIError
|
||||||
from litellm import completion
|
from litellm import completion
|
||||||
|
|
||||||
os.environ["ANTHROPIC_API_KEY"] = "bad-key"
|
os.environ["ANTHROPIC_API_KEY"] = "bad-key"
|
||||||
|
|
|
@ -275,7 +275,7 @@ response = completion(
|
||||||
LiteLLM maps exceptions across all supported providers to the OpenAI exceptions. All our exceptions inherit from OpenAI's exception types, so any error-handling you have for that, should work out of the box with LiteLLM.
|
LiteLLM maps exceptions across all supported providers to the OpenAI exceptions. All our exceptions inherit from OpenAI's exception types, so any error-handling you have for that, should work out of the box with LiteLLM.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from openai.errors import OpenAIError
|
from openai.error import OpenAIError
|
||||||
from litellm import completion
|
from litellm import completion
|
||||||
|
|
||||||
os.environ["ANTHROPIC_API_KEY"] = "bad-key"
|
os.environ["ANTHROPIC_API_KEY"] = "bad-key"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue