Use reqwest 0.12 with rustls-tls and add timeouts
Also improve review prompt with line calculation instructions, switch feedback to French, and enable reasoning for OpenRouter.
This commit is contained in:
+3
-2
@@ -69,10 +69,11 @@ pub struct Bot {
|
||||
impl Bot {
|
||||
pub fn new(config: EnvConfig) -> anyhow::Result<Self> {
|
||||
Ok(Self {
|
||||
gitea_api: GiteaAPI::new(&config.gitea_url, &config.gitea_token),
|
||||
gitea_api: GiteaAPI::new(&config.gitea_url, &config.gitea_token, config.gitea_timeout),
|
||||
open_router_client: OpenRouterClient::new(
|
||||
&config.open_router_api_key,
|
||||
&config.open_router_model,
|
||||
config.open_router_timeout,
|
||||
)?,
|
||||
config,
|
||||
})
|
||||
@@ -116,7 +117,7 @@ impl Bot {
|
||||
.download_git_diff(&review_payload.pull_request.diff_url)
|
||||
.await?;
|
||||
|
||||
let bot_request = &&REVIEW_PROMPT
|
||||
let bot_request = REVIEW_PROMPT
|
||||
.replace("{subject}", &review_payload.pull_request.title)
|
||||
.replace("{comment}", &review_payload.comment.body)
|
||||
.replace("{diff}", &git_diff);
|
||||
|
||||
Reference in New Issue
Block a user