Merge branch 'frontier' into azure_multiple_models

This commit is contained in:
binary-husky
2023-10-27 23:35:50 +08:00
committed by GitHub
11 changed files with 121 additions and 61 deletions

View File

@@ -318,7 +318,10 @@ def generate_payload(inputs, llm_kwargs, history, system_prompt, stream):
what_i_ask_now["role"] = "user"
what_i_ask_now["content"] = inputs
messages.append(what_i_ask_now)
model = llm_kwargs['llm_model'].strip('api2d-')
model = llm_kwargs['llm_model']
if llm_kwargs['llm_model'].startswith('api2d-'):
model = llm_kwargs['llm_model'][len('api2d-'):]
if model == "gpt-3.5-random": # 随机选择, 绕过openai访问频率限制
model = random.choice([
"gpt-3.5-turbo",