Skip to content

Commit

Permalink
fix ref
Browse files Browse the repository at this point in the history
  • Loading branch information
pbarker committed May 9, 2024
1 parent c6336ff commit 8e6d331
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "toolfuse"
version = "0.1.22"
version = "0.1.23"
description = "Tools for AI agents"
authors = ["Patrick Barker <patrickbarkerco@gmail.com>"]
license = "MIT"
Expand Down
6 changes: 5 additions & 1 deletion toolfuse/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,11 @@ def ref(self) -> V1ToolRef:
if not module:
raise ValueError("Tool not associated with a module")
mod_parts = module.__name__.split(".")
version = pkgversion(mod_parts[0])
version = None
try:
version = pkgversion(mod_parts[0])
except:
pass
return V1ToolRef(module=module.__name__, name=self.name(), version=version)

def add_action(self, method: Callable) -> None:
Expand Down
1 change: 1 addition & 0 deletions toolfuse/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ class V1ToolRef(BaseModel):
module: str
name: str
version: Optional[str] = None
package: Optional[str] = None

0 comments on commit 8e6d331

Please sign in to comment.