fix(openai.py): supporting openai client sdk for handling sync + async calls (incl. for openai-compatible apis)

This commit is contained in:
Krrish Dholakia 2023-11-16 10:34:55 -08:00
parent 900593355b
commit 9c7cc84eb0
5 changed files with 80 additions and 95 deletions

View file

@ -12,7 +12,7 @@ class VertexAIError(Exception):
def __init__(self, status_code, message):
self.status_code = status_code
self.message = message
self.request = httpx.Request(method="POST", url="https://api.ai21.com/studio/v1/")
self.request = httpx.Request(method="POST", url=" https://cloud.google.com/vertex-ai/")
self.response = httpx.Response(status_code=status_code, request=self.request)
super().__init__(
self.message