Skip to content
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

fix bug: qianfan_api.py _achat_completion_stream add request_timeout #1442

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

duanguo108
Copy link

fix bug: qianfan_api.py _achat_completion_stream add request_timeout

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.21%. Comparing base (c036574) to head (e4b8288).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@               Coverage Diff                @@
##           v0.8-release    #1442      +/-   ##
================================================
- Coverage         82.40%   82.21%   -0.20%     
================================================
  Files               249      245       -4     
  Lines             13839    13689     -150     
================================================
- Hits              11404    11254     -150     
  Misses             2435     2435              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -117,7 +117,7 @@ async def acompletion(self, messages: list[dict], timeout: int = USE_CONFIG_TIME
return await self._achat_completion(messages, timeout=self.get_timeout(timeout))

async def _achat_completion_stream(self, messages: list[dict], timeout: int = USE_CONFIG_TIMEOUT) -> str:
resp = await self.aclient.ado(**self._const_kwargs(messages=messages, stream=True))
resp = await self.aclient.ado(**self._const_kwargs(messages=messages, stream=True),request_timeout = timeout)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the same code on lines 107 and 112, like #1460

@geekan geekan merged commit 05e7cbf into geekan:v0.8-release Oct 11, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants