mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-01 18:49:27 +02:00
13 lines
386 B
Python
13 lines
386 B
Python
from typing import Type
|
|
|
|
from sqlalchemy.orm import Session
|
|
|
|
from danswer.db.models import Tool as ToolDBModel
|
|
from danswer.tools.built_in_tools import get_built_in_tool_by_id
|
|
from danswer.tools.tool import Tool
|
|
|
|
|
|
def get_tool_cls(tool: ToolDBModel, db_session: Session) -> Type[Tool]:
|
|
# Currently only support built-in tools
|
|
return get_built_in_tool_by_id(tool.id, db_session)
|