-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qianfan with http proxy #495
Qianfan with http proxy #495
Conversation
@@ -52,11 +53,29 @@ public Qianfan(String type, String accessKey, String secretKey) { | |||
this.client = new QianfanClient(type, accessKey, secretKey); | |||
} | |||
|
|||
|
|||
public Qianfan(ProxyConfig proxyConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前的涉及中,只有鉴权从constructor中传入,其它配置均在Qianfan的实例上调用setXXXConfig实现。这是为了避免后续Config太多,造成重载太多。
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
|
||
public class HttpProxyClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HttpClient是公用的,可以考虑使用HttpClientContext在Request维度传入代理信息,而不是在Client上设置
this.client = new QianfanClient(proxyConfig); | ||
} | ||
|
||
public Qianfan(String accessKey, String secretKey,ProxyConfig proxyConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要reformat
No description provided.