File tree Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -596,21 +596,18 @@ def __init__(self, config):
596
596
def load_google_credentials (self ):
597
597
json_file_path = os .environ .get ("VERTEXAI_JSON_FULL_PATH" )
598
598
599
- if not json_file_path :
600
- raise ValueError (
601
- "Please set VERTEXAI_JSON_FULL_PATH in your environment or in the config. For more details, see https://docs.litellm.ai/docs/providers/vertex"
602
- )
603
-
604
- # check if file exists
605
- if not os .path .exists (json_file_path ):
606
- raise ValueError (f"The file { json_file_path } was not found." )
607
-
608
- # Load the JSON file
609
- with open (json_file_path , "r" ) as file :
610
- vertex_credentials = json .load (file )
611
-
612
- # Convert to JSON string
613
- self .vertex_credentials_json = json .dumps (vertex_credentials )
599
+ if json_file_path :
600
+ if not os .path .exists (json_file_path ):
601
+ raise ValueError (
602
+ "File not found in VERTEXAI_JSON_FULL_PATH. For more details, see https://docs.litellm.ai/docs/providers/vertex"
603
+ )
604
+
605
+ # Load the JSON file
606
+ with open (json_file_path , "r" ) as file :
607
+ vertex_credentials = json .load (file )
608
+
609
+ # Convert to JSON string
610
+ self .vertex_credentials_json = json .dumps (vertex_credentials )
614
611
615
612
def get_model_response (self , messages , model_service ):
616
613
response = litellm .completion (
You can’t perform that action at this time.
0 commit comments