Skip to content

Commit

Permalink
Update bridge_openrouter.py (#2132)
Browse files Browse the repository at this point in the history
fix openrouter api 400 post bug

Co-authored-by: lan <56376794+lostatnight@users.noreply.github.com>
  • Loading branch information
oovvxxss and oovvxxss authored Feb 7, 2025
1 parent 8a0d96a commit 6dda206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request_llms/bridge_openrouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def generate_payload(inputs:str, llm_kwargs:dict, history:list, system_prompt:st
model, _ = read_one_api_model_name(model)
if llm_kwargs['llm_model'].startswith('openrouter-'):
model = llm_kwargs['llm_model'][len('openrouter-'):]
model= read_one_api_model_name(model)
model, _= read_one_api_model_name(model)
if model == "gpt-3.5-random": # 随机选择, 绕过openai访问频率限制
model = random.choice([
"gpt-3.5-turbo",
Expand Down

0 comments on commit 6dda206

Please sign in to comment.