Merge pull request #53 from Brunwo/main
Fix ToolCollection by passing `trust_remote_code`argument.
This commit is contained in:
commit
6520ddeded
|
@ -904,12 +904,12 @@ class ToolCollection:
|
|||
```
|
||||
"""
|
||||
|
||||
def __init__(self, collection_slug: str, token: Optional[str] = None):
|
||||
def __init__(self, collection_slug: str, token: Optional[str] = None, trust_remote_code=False):
|
||||
self._collection = get_collection(collection_slug, token=token)
|
||||
self._hub_repo_ids = {
|
||||
item.item_id for item in self._collection.items if item.item_type == "space"
|
||||
}
|
||||
self.tools = {Tool.from_hub(repo_id) for repo_id in self._hub_repo_ids}
|
||||
self.tools = {Tool.from_hub(repo_id,token,trust_remote_code) for repo_id in self._hub_repo_ids}
|
||||
|
||||
|
||||
def tool(tool_function: Callable) -> Tool:
|
||||
|
|
Loading…
Reference in New Issue