public abstract class OpenAiAuthInterceptor extends Object implements okhttp3.Interceptor
| Constructor and Description |
|---|
OpenAiAuthInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
okhttp3.Request |
auth(String key,
okhttp3.Request original)
默认的鉴权处理方法
|
String |
getKey()
获取请求key
|
protected abstract void |
noHaveActiveKeyWarring()
所有的key都失效后,自定义预警配置
可以通过warringConfig配置参数实现飞书、钉钉、企业微信、邮箱预警等
|
protected abstract List<String> |
onErrorDealApiKeys(String errorKey)
自定义apiKeys的处理逻辑
|
protected abstract List<String> onErrorDealApiKeys(String errorKey)
errorKey - 错误的keyprotected abstract void noHaveActiveKeyWarring()
public final String getKey()
public okhttp3.Request auth(String key, okhttp3.Request original)
key - api keyoriginal - 源请求体Copyright © 2023 grt1228. All rights reserved.