feat(awel): New MessageConverter and more AWEL operators (#1039)

This commit is contained in:
Fangyin Cheng
2024-01-08 09:40:05 +08:00
committed by GitHub
parent 765fb181f6
commit e8861bd8fa
48 changed files with 2333 additions and 719 deletions

View File

@@ -53,8 +53,12 @@ def tongyi_generate_stream(
proxyllm_backend = Generation.Models.qwen_turbo # By Default qwen_turbo
messages: List[ModelMessage] = params["messages"]
convert_to_compatible_format = params.get("convert_to_compatible_format", False)
history = __convert_2_tongyi_messages(messages)
if convert_to_compatible_format:
history = __convert_2_tongyi_messages(messages)
else:
history = ModelMessage.to_openai_messages(messages)
gen = Generation()
res = gen.call(
proxyllm_backend,