forked from phoenix/litellm-mirror
(ci/cd) vertex ai
This commit is contained in:
parent
8dd6786123
commit
85668ff415
1 changed files with 4 additions and 1 deletions
|
@ -25,12 +25,15 @@ messages = [{"content": user_message, "role": "user"}]
|
||||||
|
|
||||||
def load_vertex_ai_credentials():
|
def load_vertex_ai_credentials():
|
||||||
# Define the path to the vertex_key.json file
|
# Define the path to the vertex_key.json file
|
||||||
vertex_key_path = os.getcwd() + '/vertex_key.json'
|
print("loading vertex ai credentials")
|
||||||
|
filepath = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
vertex_key_path = filepath + '/vertex_key.json'
|
||||||
|
|
||||||
# Read the existing content of the file or create an empty dictionary
|
# Read the existing content of the file or create an empty dictionary
|
||||||
try:
|
try:
|
||||||
with open(vertex_key_path, 'r') as file:
|
with open(vertex_key_path, 'r') as file:
|
||||||
# Read the file content
|
# Read the file content
|
||||||
|
print("Read vertexai file path")
|
||||||
content = file.read()
|
content = file.read()
|
||||||
|
|
||||||
# If the file is empty or not valid JSON, create an empty dictionary
|
# If the file is empty or not valid JSON, create an empty dictionary
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue