Skip to content

Commit 185e1a9

Browse files
author
BoABC
authored
Add conversation id to metagen request (#3598)
1 parent b27d617 commit 185e1a9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fastchat/serve/api_provider.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ def get_api_provider_stream_iter(
244244
max_new_tokens,
245245
api_base=model_api_dict["api_base"],
246246
api_key=model_api_dict["api_key"],
247+
conversation_id=state.conv_id,
247248
)
248249
else:
249250
raise NotImplementedError()
@@ -1195,6 +1196,7 @@ def metagen_api_stream_iter(
11951196
max_new_tokens,
11961197
api_key,
11971198
api_base,
1199+
conversation_id,
11981200
):
11991201
try:
12001202
text_messages = []
@@ -1227,6 +1229,7 @@ def metagen_api_stream_iter(
12271229
"model": model_name,
12281230
"chunks_delimited": True,
12291231
"messages": messages,
1232+
"conversation_id": conversation_id,
12301233
"options": {
12311234
"max_tokens": max_new_tokens,
12321235
"generation_algorithm": "top_p",

0 commit comments

Comments
 (0)