use api_base instead of custom_api_base

This commit is contained in:
ishaan-jaff 2023-09-02 17:11:30 -07:00
parent e6836985c8
commit 09ae510a58
9 changed files with 39 additions and 39 deletions

View file

@ -38,7 +38,7 @@ class HuggingfaceRestAPILLM:
self,
model: str,
messages: list,
custom_api_base: str,
api_base: str,
model_response: ModelResponse,
print_verbose: Callable,
optional_params=None,
@ -48,8 +48,8 @@ class HuggingfaceRestAPILLM:
completion_url: str = ""
if "https" in model:
completion_url = model
elif custom_api_base:
completion_url = custom_api_base
elif api_base:
completion_url = api_base
elif "HF_API_BASE" in os.environ:
completion_url = os.getenv("HF_API_BASE", "")
else: