forked from phoenix/litellm-mirror
remove deps datalib, pytest, tenacity, infisical
This commit is contained in:
parent
a4bebe6815
commit
3edcf8c7d8
6 changed files with 25 additions and 15 deletions
|
@ -13,6 +13,8 @@ jobs:
|
|||
command: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -r requirements.txt
|
||||
pip install infisical
|
||||
pip install pytest
|
||||
|
||||
# Run pytest and generate JUnit XML report
|
||||
- run:
|
||||
|
|
|
@ -4,7 +4,7 @@ failure_callback = []
|
|||
set_verbose=False
|
||||
telemetry=True
|
||||
max_tokens = 256 # OpenAI Defaults
|
||||
retry = True # control tenacity retries.
|
||||
retry = True
|
||||
openai_key = None
|
||||
azure_key = None
|
||||
anthropic_key = None
|
||||
|
|
|
@ -7,11 +7,6 @@ import litellm
|
|||
from litellm import client, logging, exception_type, timeout, get_optional_params
|
||||
import tiktoken
|
||||
encoding = tiktoken.get_encoding("cl100k_base")
|
||||
from tenacity import (
|
||||
retry,
|
||||
stop_after_attempt,
|
||||
wait_random_exponential,
|
||||
) # for exponential backoff
|
||||
from litellm.utils import get_secret, install_and_import
|
||||
####### ENVIRONMENT VARIABLES ###################
|
||||
dotenv.load_dotenv() # Loading env variables using dotenv
|
||||
|
|
20
litellm/tests/test_embedding.py
Normal file
20
litellm/tests/test_embedding.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
import sys, os
|
||||
import traceback
|
||||
import pytest
|
||||
|
||||
sys.path.insert(0, os.path.abspath('../..')) # Adds the parent directory to the system path
|
||||
import litellm
|
||||
from litellm import embedding, completion
|
||||
from infisical import InfisicalClient
|
||||
|
||||
# litellm.set_verbose = True
|
||||
litellm.secret_manager_client = InfisicalClient(token=os.environ["INFISICAL_TOKEN"])
|
||||
|
||||
def test_openai_embedding():
|
||||
try:
|
||||
response = embedding(model='text-embedding-ada-002', input=["good morning from litellm"])
|
||||
# Add any assertions here to check the response
|
||||
print(f"response: {str(response)}")
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
|
@ -9,12 +9,8 @@ readme = "README.md"
|
|||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
openai = "^0.27.8"
|
||||
|
||||
pytest = "^7.4.0"
|
||||
|
||||
|
||||
python-dotenv = "^1.0.0"
|
||||
tenacity = "^8.0.1"
|
||||
tiktoken = "^0.4.0"
|
||||
|
||||
[build-system]
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
# used by CI/CD testing
|
||||
openai
|
||||
pytest
|
||||
python-dotenv
|
||||
openai[datalib]
|
||||
tenacity
|
||||
tiktoken
|
||||
infisical
|
||||
openai
|
||||
tiktoken
|
Loading…
Add table
Add a link
Reference in a new issue