vertex testing

This commit is contained in:
Ishaan Jaff 2024-06-26 18:08:54 -07:00
parent 76490690a1
commit c27bfd76b6

View file

@ -329,11 +329,14 @@ def test_vertex_ai():
"code-gecko@001", "code-gecko@001",
"code-gecko@002", "code-gecko@002",
"code-gecko@latest", "code-gecko@latest",
"codechat-bison@latest",
"code-bison@001", "code-bison@001",
"text-bison@001", "text-bison@001",
"gemini-1.5-pro", "gemini-1.5-pro",
"gemini-1.5-pro-preview-0215", "gemini-1.5-pro-preview-0215",
]: ] or (
"gecko" in model or "32k" in model or "ultra" in model or "002" in model
):
# our account does not have access to this model # our account does not have access to this model
continue continue
print("making request", model) print("making request", model)
@ -381,12 +384,15 @@ def test_vertex_ai_stream():
"code-gecko@001", "code-gecko@001",
"code-gecko@002", "code-gecko@002",
"code-gecko@latest", "code-gecko@latest",
"codechat-bison@latest",
"code-bison@001", "code-bison@001",
"text-bison@001", "text-bison@001",
"gemini-1.5-pro", "gemini-1.5-pro",
"gemini-1.5-pro-preview-0215", "gemini-1.5-pro-preview-0215",
]: ] or (
# ouraccount does not have access to this model "gecko" in model or "32k" in model or "ultra" in model or "002" in model
):
# our account does not have access to this model
continue continue
print("making request", model) print("making request", model)
response = completion( response = completion(
@ -433,11 +439,12 @@ async def test_async_vertexai_response():
"code-gecko@001", "code-gecko@001",
"code-gecko@002", "code-gecko@002",
"code-gecko@latest", "code-gecko@latest",
"codechat-bison@latest",
"code-bison@001", "code-bison@001",
"text-bison@001", "text-bison@001",
"gemini-1.5-pro", "gemini-1.5-pro",
"gemini-1.5-pro-preview-0215", "gemini-1.5-pro-preview-0215",
]: ] or ("gecko" in model or "32k" in model or "ultra" in model or "002" in model):
# our account does not have access to this model # our account does not have access to this model
continue continue
try: try:
@ -479,11 +486,12 @@ async def test_async_vertexai_streaming_response():
"code-gecko@001", "code-gecko@001",
"code-gecko@002", "code-gecko@002",
"code-gecko@latest", "code-gecko@latest",
"codechat-bison@latest",
"code-bison@001", "code-bison@001",
"text-bison@001", "text-bison@001",
"gemini-1.5-pro", "gemini-1.5-pro",
"gemini-1.5-pro-preview-0215", "gemini-1.5-pro-preview-0215",
]: ] or ("gecko" in model or "32k" in model or "ultra" in model or "002" in model):
# our account does not have access to this model # our account does not have access to this model
continue continue
try: try: