fix(main.py): fix vertex meta llama api call

This commit is contained in:
Krrish Dholakia 2024-12-02 21:53:10 -08:00
parent aaa8c7caf0
commit 70a66fafef

View file

@ -42,7 +42,7 @@ def create_vertex_url(
) -> str: ) -> str:
"""Return the base url for the vertex partner models""" """Return the base url for the vertex partner models"""
if partner == VertexPartnerProvider.llama: if partner == VertexPartnerProvider.llama:
return f"https://{vertex_location}-aiplatform.googleapis.com/v1beta1/projects/{vertex_project}/locations/{vertex_location}/endpoints/openapi" return f"https://{vertex_location}-aiplatform.googleapis.com/v1beta1/projects/{vertex_project}/locations/{vertex_location}/endpoints/openapi/chat/completions"
elif partner == VertexPartnerProvider.mistralai: elif partner == VertexPartnerProvider.mistralai:
if stream: if stream:
return f"https://{vertex_location}-aiplatform.googleapis.com/v1/projects/{vertex_project}/locations/{vertex_location}/publishers/mistralai/models/{model}:streamRawPredict" return f"https://{vertex_location}-aiplatform.googleapis.com/v1/projects/{vertex_project}/locations/{vertex_location}/publishers/mistralai/models/{model}:streamRawPredict"