Skip to content

Commit 8705145

Browse files
authored
Only pass messages to function if they exist (#30)
1 parent d375379 commit 8705145

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/humanloop/eval_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def process_datapoint(datapoint: Datapoint):
325325
start_time = datetime.now()
326326
datapoint_dict = datapoint.dict()
327327
try:
328-
if "messages" in datapoint_dict:
328+
if "messages" in datapoint_dict and datapoint_dict["messages"] is not None:
329329
output = function_(
330330
**datapoint_dict["inputs"], messages=datapoint_dict["messages"]
331331
)

0 commit comments

Comments
 (0)