Skip to content

Commit 9f37a74

Browse files
committed
vscode not saving my stuff :(
1 parent 6b3d0fc commit 9f37a74

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/agentlab/llm/huggingface_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ def __call__(
100100
while True:
101101
try:
102102
temperature = temperature if temperature is not None else self.temperature
103-
response = AIMessage(self.llm(prompt, temperature=temperature))
103+
answer = self.llm(prompt, temperature=temperature)
104+
response = AIMessage(answer)
105+
if hasattr(answer, "details"):
106+
response["log_prob"] = answer.details.log_prob
104107
responses.append(response)
105108
break
106109
except Exception as e:

0 commit comments

Comments
 (0)