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

async 支持吗 #388

Open
NXL333 opened this issue Nov 5, 2024 · 1 comment
Open

async 支持吗 #388

NXL333 opened this issue Nov 5, 2024 · 1 comment

Comments

@NXL333
Copy link

NXL333 commented Nov 5, 2024

async 支持吗???completion = client.chat.completions.create(
model=model,
messages=messages,
temperature=temperature,
max_tokens=max_tokens,
stream=True
)
assistant_response = ""
for chunk in completion:
assistant_response += chunk.choices[0].delta.content
history[-1][-1] = assistant_response
yield history,chunk_show,支持异步流式调用吗,谢谢

@tuhahaha
Copy link
Collaborator

您好,目前这个框架没有适配异步调用,因为异步涉及的改动会比较多...

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

No branches or pull requests

2 participants