expose error types

This commit is contained in:
Krrish Dholakia 2023-08-07 11:32:01 -07:00
parent 5e564ef5de
commit 1a4044091a
5 changed files with 5 additions and 4 deletions

View file

@ -73,3 +73,4 @@ from .timeout import timeout
from .utils import client, logging, exception_type, get_optional_params, modify_integration from .utils import client, logging, exception_type, get_optional_params, modify_integration
from .main import * # Import all the symbols from main.py from .main import * # Import all the symbols from main.py
from .integrations import * from .integrations import *
from openai.error import AuthenticationError, InvalidRequestError, RateLimitError, ServiceUnavailableError, OpenAIError

View file

@ -1,10 +1,10 @@
from openai.error import AuthenticationError, InvalidRequestError, RateLimitError, OpenAIError # from openai.error import AuthenticationError, InvalidRequestError, RateLimitError, OpenAIError
import os import os
import sys import sys
import traceback import traceback
sys.path.insert(0, os.path.abspath('../..')) # Adds the parent directory to the system path sys.path.insert(0, os.path.abspath('../..')) # Adds the parent directory to the system path
import litellm import litellm
from litellm import embedding, completion from litellm import embedding, completion, AuthenticationError, InvalidRequestError, RateLimitError, ServiceUnavailableError, OpenAIError
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor
import pytest import pytest

View file

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "litellm" name = "litellm"
version = "0.1.352" version = "0.1.353"
description = "Library to easily interface with LLM API providers" description = "Library to easily interface with LLM API providers"
authors = ["BerriAI"] authors = ["BerriAI"]
license = "MIT License" license = "MIT License"