We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
in the [claude.py](https://github.com/Amm1rr/WebAI-to-API/blob/master/src/claude.py) line 239:
line 239
answer = "" with httpx.stream("POST", url, headers=headers, data=payload) as r: for text in r.iter_text(): response_parse_text = await parse_text(text) text_res = "" if response_parse_text: for text in response_parse_text: text_res += text answer = ''.join(text_res) print(answer) yield answer
I was testing the streaming output results and found that you need to add a async method right behind the yeild in the async function. for example:
yield answer await asyncio.sleep(0)
Otherwise the function will be blocked until all the streaming data are received. There are two ways to solve it:
async def stream_message
I have no idea make this happen, if you figure it out what is happening, catch me later.
The text was updated successfully, but these errors were encountered:
Thank you, I have fixed that.
Sorry, something went wrong.
No branches or pull requests
in the [claude.py](https://github.com/Amm1rr/WebAI-to-API/blob/master/src/claude.py)
line 239
:I was testing the streaming output results and found that you need to add a async method right behind the yeild in the async function. for example:
Otherwise the function will be blocked until all the streaming data are received. There are two ways to solve it:
async def stream_message
sync,I have no idea make this happen, if you figure it out what is happening, catch me later.
The text was updated successfully, but these errors were encountered: