chore: increase chat timeout (#768)
This commit is contained in:
parent
54b811125e
commit
773efcd91a
|
|
@ -6,6 +6,7 @@ use shared_entity::dto::ai_dto::{
|
||||||
SummarizeRowResponse, TranslateRowParams, TranslateRowResponse,
|
SummarizeRowResponse, TranslateRowParams, TranslateRowResponse,
|
||||||
};
|
};
|
||||||
use shared_entity::response::{AppResponse, AppResponseError};
|
use shared_entity::response::{AppResponse, AppResponseError};
|
||||||
|
use std::time::Duration;
|
||||||
use tracing::instrument;
|
use tracing::instrument;
|
||||||
|
|
||||||
impl Client {
|
impl Client {
|
||||||
|
|
@ -46,6 +47,7 @@ impl Client {
|
||||||
.http_client_with_auth(Method::POST, &url)
|
.http_client_with_auth(Method::POST, &url)
|
||||||
.await?
|
.await?
|
||||||
.json(¶ms)
|
.json(¶ms)
|
||||||
|
.timeout(Duration::from_secs(30))
|
||||||
.send()
|
.send()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|
@ -66,6 +68,7 @@ impl Client {
|
||||||
.http_client_with_auth(Method::POST, &url)
|
.http_client_with_auth(Method::POST, &url)
|
||||||
.await?
|
.await?
|
||||||
.json(¶ms)
|
.json(¶ms)
|
||||||
|
.timeout(Duration::from_secs(30))
|
||||||
.send()
|
.send()
|
||||||
.await?;
|
.await?;
|
||||||
log_request_id(&resp);
|
log_request_id(&resp);
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ use shared_entity::dto::ai_dto::{
|
||||||
use shared_entity::response::{AppResponse, AppResponseError};
|
use shared_entity::response::{AppResponse, AppResponseError};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::task::{Context, Poll};
|
use std::task::{Context, Poll};
|
||||||
|
use std::time::Duration;
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
||||||
impl Client {
|
impl Client {
|
||||||
|
|
@ -111,6 +112,7 @@ impl Client {
|
||||||
let resp = self
|
let resp = self
|
||||||
.http_client_with_auth(Method::GET, &url)
|
.http_client_with_auth(Method::GET, &url)
|
||||||
.await?
|
.await?
|
||||||
|
.timeout(Duration::from_secs(30))
|
||||||
.send()
|
.send()
|
||||||
.await?;
|
.await?;
|
||||||
log_request_id(&resp);
|
log_request_id(&resp);
|
||||||
|
|
@ -130,6 +132,7 @@ impl Client {
|
||||||
let resp = self
|
let resp = self
|
||||||
.http_client_with_auth(Method::GET, &url)
|
.http_client_with_auth(Method::GET, &url)
|
||||||
.await?
|
.await?
|
||||||
|
.timeout(Duration::from_secs(30))
|
||||||
.send()
|
.send()
|
||||||
.await?;
|
.await?;
|
||||||
log_request_id(&resp);
|
log_request_id(&resp);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue