mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-17 07:00:15 +00:00
fix(model): Fix some model missing stop tokens bug
This commit is contained in:
@@ -164,6 +164,7 @@ class LLMModelAdaper:
|
|||||||
|
|
||||||
# Overwrite model params:
|
# Overwrite model params:
|
||||||
params["stop"] = conv.stop_str
|
params["stop"] = conv.stop_str
|
||||||
|
params["stop_token_ids"] = conv.stop_token_ids
|
||||||
|
|
||||||
return params, model_context
|
return params, model_context
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class ChatFactory(metaclass=Singleton):
|
|||||||
implementation = None
|
implementation = None
|
||||||
for cls in chat_classes:
|
for cls in chat_classes:
|
||||||
if cls.chat_scene == chat_mode:
|
if cls.chat_scene == chat_mode:
|
||||||
metadata = {"cls": str(cls), "params": kwargs}
|
metadata = {"cls": str(cls)}
|
||||||
with root_tracer.start_span(
|
with root_tracer.start_span(
|
||||||
"get_implementation_of_chat", metadata=metadata
|
"get_implementation_of_chat", metadata=metadata
|
||||||
):
|
):
|
||||||
|
Reference in New Issue
Block a user