feat: optimize hf inference endpoint (#975)

This commit is contained in:
takatost
2023-08-23 19:47:50 +08:00
committed by GitHub
parent 1fc57d7358
commit a76fde3d23
4 changed files with 59 additions and 11 deletions

View File

@@ -17,7 +17,8 @@ HOSTED_INFERENCE_API_VALIDATE_CREDENTIAL = {
INFERENCE_ENDPOINTS_VALIDATE_CREDENTIAL = {
'huggingfacehub_api_type': 'inference_endpoints',
'huggingfacehub_api_token': 'valid_key',
'huggingfacehub_endpoint_url': 'valid_url'
'huggingfacehub_endpoint_url': 'valid_url',
'task_type': 'text-generation'
}
def encrypt_side_effect(tenant_id, encrypt_key):