Refactor custom tool execution utilities

This commit is contained in:
Ashwin Bharambe 2024-08-25 14:34:20 -07:00
parent 440d125ea0
commit ceef117abc
9 changed files with 209 additions and 145 deletions

View file

@ -30,6 +30,8 @@ async def get_provider_impl(config: FaissImplConfig, _deps: Dict[Api, ProviderSp
return impl
# This should be a broader utility
# This should support local file URLs and data URLs also
async def content_from_doc(doc: MemoryBankDocument) -> str:
if isinstance(doc.content, URL):
async with httpx.AsyncClient() as client: