mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
add huggingface
This commit is contained in:
parent
daa949a539
commit
0ea59702fd
6 changed files with 70 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue