docs error openai.error instead of openai.errors

This commit is contained in:
josearangos 2023-10-25 15:57:26 -05:00
parent 810298743c
commit 203aa24aed
3 changed files with 3 additions and 3 deletions

View file

@ -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"

View file

@ -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"

View file

@ -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"