From 185e1a9369db800b8c4344814bdfbca5c4c4a0f4 Mon Sep 17 00:00:00 2001 From: BoABC Date: Sat, 2 Nov 2024 11:04:18 -0700 Subject: [PATCH] Add conversation id to metagen request (#3598) --- fastchat/serve/api_provider.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fastchat/serve/api_provider.py b/fastchat/serve/api_provider.py index 2e2f71c6c..e00326b30 100644 --- a/fastchat/serve/api_provider.py +++ b/fastchat/serve/api_provider.py @@ -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() @@ -1195,6 +1196,7 @@ def metagen_api_stream_iter( max_new_tokens, api_key, api_base, + conversation_id, ): try: text_messages = [] @@ -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",