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

补齐query_result中的choices字段 #847

Merged
merged 4 commits into from
Nov 11, 2024
Merged

Conversation

Alex-TG001
Copy link
Collaborator

if "delta" in stream_json:
content = stream_json["delta"].get("content", "")
merged_query += content
if index not in res_choices:
Copy link
Collaborator

Choose a reason for hiding this comment

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

这段逻辑的兼容性不够

  1. 不能预设头包中就包含了所有会出现的字段
  2. 不能假设字段是固定的,到时候有 Diff 就爆炸

@Dobiichi-Origami Dobiichi-Origami merged commit b5cf4f5 into main Nov 11, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants