forked from phoenix/litellm-mirror
fix(factory.py): support 'add_generation_prompt' field for hf chat templates
Fixes https://github.com/BerriAI/litellm/pull/5178#issuecomment-2306362008
This commit is contained in:
parent
afb00a27cb
commit
874d58fe8a
3 changed files with 84 additions and 7 deletions
|
@ -179,6 +179,9 @@ class HuggingfaceConfig:
|
|||
optional_params["decoder_input_details"] = True
|
||||
return optional_params
|
||||
|
||||
def get_hf_api_key(self) -> Optional[str]:
|
||||
return litellm.utils.get_secret("HUGGINGFACE_API_KEY")
|
||||
|
||||
|
||||
def output_parser(generated_text: str):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue