feat: optimize hf inference endpoint (#975)

This commit is contained in:
takatost 2023-08-23 19:47:50 +08:00 committed by GitHub
commit a76fde3d23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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):