Skip to content

Commit 92451b0

Browse files
Fix absolute rating
1 parent 3166e7e commit 92451b0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

optillm/cepo/cepo.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ def rate_completions_absolute(system_prompt: str, initial_query: str, client: An
736736
}
737737

738738
rating_response = client.chat.completions.create(**provider_request)
739-
rating_response, _, completion_tokens = llm_call_reason_effort_fallback(
739+
rating_response, _, completion_tokens_ = llm_call_reason_effort_fallback(
740740
client=client,
741741
provider_request=provider_request,
742742
reasoning_effort_levels=["high", "medium"],
@@ -748,8 +748,7 @@ def rate_completions_absolute(system_prompt: str, initial_query: str, client: An
748748
response_dict = rating_response.model_dump() if hasattr(rating_response, 'model_dump') else rating_response
749749
optillm.conversation_logger.log_provider_call(request_id, provider_request, response_dict)
750750

751-
completion_tokens += rating_response.usage.completion_tokens
752-
rating_response = rating_response.choices[0].message.content.strip()
751+
completion_tokens += completion_tokens_
753752

754753
cb_log[f"rating_response_{i}"] = rating_response
755754
if cepo_config.print_output:

0 commit comments

Comments
 (0)