Revert "implement deployment id"

This reverts commit b107db98fa.
This commit is contained in:
Paul Gauthier 2023-12-06 09:20:53 -08:00
parent b107db98fa
commit 57ab2cc9da
8 changed files with 13 additions and 21 deletions

View file

@ -28,15 +28,10 @@ CACHE = None
f"{details.get('exception','Exception')}\nRetry in {details['wait']:.1f} seconds."
),
)
def send_with_retries(client, model, messages, functions, stream):
def send_with_retries(client, model_name, messages, functions, stream):
if not client:
raise ValueError("No openai client provided")
if model.deployment_id:
model_name = model.deployment_id
else:
model_name = model.name
kwargs = dict(
model=model_name,
messages=messages,
@ -62,11 +57,11 @@ def send_with_retries(client, model, messages, functions, stream):
return hash_object, res
def simple_send_with_retries(client, model, messages):
def simple_send_with_retries(client, model_name, messages):
try:
_hash, response = send_with_retries(
client=client,
model=model,
model_name=model_name,
messages=messages,
functions=None,
stream=False,