Fix tool provider credential caching issue (#2433)

This commit is contained in:
Yeuoly
2024-02-12 18:17:43 +08:00
committed by GitHub
parent e1045f01c6
commit 23e95fd7ab
2 changed files with 42 additions and 12 deletions

View File

@@ -85,4 +85,12 @@ class ToolConfiguration(BaseModel):
pass
cache.set(credentials)
return credentials
return credentials
def delete_tool_credentials_cache(self):
cache = ToolProviderCredentialsCache(
tenant_id=self.tenant_id,
identity_id=f'{self.provider_controller.app_type.value}.{self.provider_controller.identity.name}',
cache_type=ToolProviderCredentialsCacheType.PROVIDER
)
cache.delete()