Skip to content

Commit 0812012

Browse files
committed
next
1 parent 3cae6af commit 0812012

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

science/completion.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,6 @@ def get_completion_answer(user_id: Optional[int], question: str) -> str:
302302
store_message(
303303
user_id,
304304
message,
305-
function_ids=message.get("function_ids", []),
306-
webhook_ids=message.get("webhook_ids", []),
307305
)
308306
store_message(user_id, {"role": "assistant", "content": answer})
309307

science/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ def store_message(
6565
db = get_client()
6666
create_input = {"userId": user_id, "role": data["role"], "content": data["content"]}
6767

68-
if data["function_ids"]:
68+
if data.get("function_ids"):
6969
create_input["functions"] = {
7070
"create": [
7171
{"functionPublicId": fid}
7272
for fid in data["function_ids"]
7373
]
7474
}
75-
if data["webhook_ids"]:
75+
if data.get("webhook_ids"):
7676
create_input["webhooks"] = {
7777
"create": [
7878
{"webhookPublicId": wid}

0 commit comments

Comments
 (0)