Skip to content

Commit 94fad78

Browse files
committed
override approach if set in messages
1 parent 0df5291 commit 94fad78

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

optillm.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,10 @@ def proxy():
288288

289289
system_prompt, initial_query, message_optillm_approach = parse_conversation(messages)
290290

291-
# Use optillm_approach from extra_body if present, otherwise use from messages
292-
if not optillm_approach and message_optillm_approach:
291+
if message_optillm_approach:
293292
optillm_approach = message_optillm_approach
294293

295-
if optillm_approach:
294+
if optillm_approach != "auto":
296295
model = f"{optillm_approach}-{model}"
297296

298297
base_url = server_config['base_url']

optillm/bon.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def best_of_n_sampling(system_prompt: str, initial_query: str, client, model: st
1818
temperature=1
1919
)
2020
completions = [choice.message.content for choice in response.choices]
21+
logger.info(f"Generated {len(completions)} initial completions. Tokens used: {response.usage.completion_tokens}")
2122
bon_completion_tokens += response.usage.completion_tokens
2223

2324
# Rate the completions

0 commit comments

Comments
 (0)