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

Add conversation id to metagen request #3598

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fastchat/serve/api_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def get_api_provider_stream_iter(
max_new_tokens,
api_base=model_api_dict["api_base"],
api_key=model_api_dict["api_key"],
conversation_id=state.conv_id,
)
else:
raise NotImplementedError()
Expand Down Expand Up @@ -1195,6 +1196,7 @@ def metagen_api_stream_iter(
max_new_tokens,
api_key,
api_base,
conversation_id,
):
try:
text_messages = []
Expand Down Expand Up @@ -1227,6 +1229,7 @@ def metagen_api_stream_iter(
"model": model_name,
"chunks_delimited": True,
"messages": messages,
"conversation_id": conversation_id,
"options": {
"max_tokens": max_new_tokens,
"generation_algorithm": "top_p",
Expand Down
Loading