22 lines
673 B
Python
22 lines
673 B
Python
"""Docs connector: read documents (stub; extend with PDF/Office)."""
|
|
|
|
from typing import Any
|
|
|
|
from fusionagi.tools.connectors.base import BaseConnector
|
|
|
|
|
|
class DocsConnector(BaseConnector):
|
|
name = "docs"
|
|
|
|
def __init__(self) -> None:
|
|
pass
|
|
|
|
def invoke(self, action: str, params: dict[str, Any]) -> Any:
|
|
if action == "read":
|
|
path = params.get("path", "")
|
|
return {"content": "", "path": path, "error": "DocsConnector stub: implement read"}
|
|
return {"error": f"Unknown action: {action}"}
|
|
|
|
def schema(self) -> dict[str, Any]:
|
|
return {"name": self.name, "actions": ["read"], "parameters": {"path": "string"}}
|