add test for vertex sdk foward headers

This commit is contained in:
Ishaan Jaff 2024-08-29 15:50:54 -07:00
parent 9fb188a3b6
commit 41a5daf20c
2 changed files with 14 additions and 8 deletions

View file

@ -13,14 +13,6 @@ model_list:
model: cohere/rerank-english-v3.0
api_key: os.environ/COHERE_API_KEY
general_settings:
enable_oauth2_proxy_auth: True
oauth2_config_mappings:
token: X-Auth-Token
user_id: X-Auth-Client-ID
team_id: X-Auth-Team-ID
max_budget: X-Auth-Max-Budget
models: X-Auth-Allowed-Models
# default off mode
litellm_settings:

View file

@ -0,0 +1,14 @@
import vertexai
from vertexai.preview.generative_models import GenerativeModel
LITE_LLM_ENDPOINT = "http://localhost:4000"
vertexai.init(
project="adroit-crow-413218",
location="us-central1",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex-ai",
api_transport="rest",
)
model = GenerativeModel(model_name="gemini-1.0-pro")
model.generate_content("hi")