fix: hf hosted inference check (#1128)
This commit is contained in:
parent
681eb1cfcc
commit
c4d8bdc3db
3 changed files with 69 additions and 4 deletions
|
|
@ -89,7 +89,8 @@ class HuggingfaceHubProvider(BaseModelProvider):
|
|||
raise CredentialsValidateFailedError('Task Type must be provided.')
|
||||
|
||||
if credentials['task_type'] not in ("text2text-generation", "text-generation", "summarization"):
|
||||
raise CredentialsValidateFailedError('Task Type must be one of text2text-generation, text-generation, summarization.')
|
||||
raise CredentialsValidateFailedError('Task Type must be one of text2text-generation, '
|
||||
'text-generation, summarization.')
|
||||
|
||||
try:
|
||||
llm = HuggingFaceEndpointLLM(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue