add huggingface

This commit is contained in:
Krrish Dholakia 2023-08-30 16:05:33 -07:00
parent daa949a539
commit 0ea59702fd
6 changed files with 70 additions and 3 deletions

View file

@ -46,8 +46,8 @@ class HuggingfaceRestAPILLM:
logger_fn=None,
): # logic for parsing in - calling - parsing out model completion calls
completion_url: str = ""
if custom_api_base:
completion_url = custom_api_base
if "https" in model:
completion_url = model
elif "HF_API_BASE" in os.environ:
completion_url = os.getenv("HF_API_BASE", "")
else: