fix(providers): stop killing streaming responses at the total request timeout (#10620)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
This commit is contained in:
@@ -265,6 +265,7 @@ impl GithubCopilotProvider {
|
||||
is_user_initiated: bool,
|
||||
payload: &mut Value,
|
||||
has_images: bool,
|
||||
streaming: bool,
|
||||
) -> Result<Response, ProviderError> {
|
||||
let (endpoint, token) = self.get_api_info().await?;
|
||||
let auth = AuthMethod::BearerToken(token);
|
||||
@@ -281,6 +282,7 @@ impl GithubCopilotProvider {
|
||||
api_client
|
||||
.request(path)
|
||||
.model_headers(model_config)?
|
||||
.streaming(streaming)
|
||||
.response_post(payload)
|
||||
.await
|
||||
.map_err(|e| e.into())
|
||||
@@ -420,6 +422,7 @@ impl GithubCopilotProvider {
|
||||
is_user_initiated,
|
||||
&mut payload_clone,
|
||||
has_images,
|
||||
true,
|
||||
)
|
||||
.await?;
|
||||
handle_status(resp).await
|
||||
@@ -467,6 +470,7 @@ impl GithubCopilotProvider {
|
||||
is_user_initiated,
|
||||
&mut payload_clone,
|
||||
has_images,
|
||||
true,
|
||||
)
|
||||
.await?;
|
||||
handle_status(resp).await
|
||||
@@ -497,6 +501,7 @@ impl GithubCopilotProvider {
|
||||
is_user_initiated,
|
||||
&mut payload_clone,
|
||||
has_images,
|
||||
false,
|
||||
)
|
||||
.await
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user