瀏覽代碼

fix: tool can not run (#12054)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
tags/0.15.0
yihong 10 月之前
父節點
當前提交
0ea6a926c5
No account linked to committer's email address
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      api/models/tools.py

+ 3
- 3
api/models/tools.py 查看文件

@@ -1,5 +1,5 @@
import json
from typing import Optional
from typing import Any, Optional

import sqlalchemy as sa
from sqlalchemy import ForeignKey, func
@@ -282,8 +282,8 @@ class ToolConversationVariables(db.Model): # type: ignore[name-defined]
updated_at = db.Column(db.DateTime, nullable=False, server_default=func.current_timestamp())

@property
def variables(self) -> dict:
return dict(json.loads(self.variables_str))
def variables(self) -> Any:
return json.loads(self.variables_str)


class ToolFile(db.Model): # type: ignore[name-defined]

Loading…
取消
儲存