added call to get the content of a file

This commit is contained in:
Markus Pfundstein
2024-11-29 14:00:53 +01:00
parent 1f74864943
commit de5afa7f49
3 changed files with 47 additions and 9 deletions

View File

@@ -46,16 +46,17 @@ def get_tool_handler(name: str) -> tools.ToolHandler | None:
add_tool_handler(tools.ListFilesInDirToolHandler())
add_tool_handler(tools.ListFilesInVaultToolHandler())
add_tool_handler(tools.GetFileContentsToolHandler())
@app.list_resources()
async def list_resources() -> list[Resource]:
return [
Resource(
uri="obisidian:///note/app.log",
name="Application Logs",
mimeType="text/plain"
)
]
#@app.list_resources()
#async def list_resources() -> list[Resource]:
# return [
# Resource(
# uri="obisidian:///note/app.log",
# name="Application Logs",
# mimeType="text/plain"
# )
# ]
@app.list_tools()
async def list_tools() -> list[Tool]: