Skip to content

Commit 69e5287

Browse files
authored
[Fix] Fix imgedit eval logic for call openai client (EvolvingLMMs-Lab#966)
1 parent 8daf445 commit 69e5287

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lmms_eval/tasks/imgedit/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,16 @@ def _call_openai_for_evaluation(
189189
try:
190190
# Build message content
191191
content = [
192-
{"type": "text", "text": full_prompt},
193192
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{original_b64}"}},
194193
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{edited_b64}"}},
194+
{"type": "text", "text": full_prompt},
195195
]
196196

197197
response = client.chat.completions.create(
198198
model=IMGEDIT_MODEL_NAME,
199199
messages=[{"role": "user", "content": content}],
200200
max_tokens=512,
201+
temperature=0.1,
201202
)
202203

203204
return response.choices[0].message.content

0 commit comments

Comments
 (0)