Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions dimos/utils/cli/human/humancli.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from __future__ import annotations

from datetime import datetime
import json
import textwrap
import threading
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -140,7 +141,9 @@ def receive_msg(msg) -> None: # type: ignore[no-untyped-def]
)
elif isinstance(msg, AIMessage):
content = msg.content or ""
tool_calls = msg.additional_kwargs.get("tool_calls", [])
tool_calls = getattr(msg, "tool_calls", None) or msg.additional_kwargs.get(
"tool_calls", []
)

# Display the main content first
if content:
Expand Down Expand Up @@ -174,9 +177,10 @@ def receive_msg(msg) -> None: # type: ignore[no-untyped-def]

def _format_tool_call(self, tool_call: ToolCall) -> str:
"""Format a tool call for display."""
f = tool_call.get("function", {})
name = f.get("name", "unknown") # type: ignore[attr-defined]
return f"▶ {name}({f.get('arguments', '')})" # type: ignore[attr-defined]
name = tool_call.get("name", "unknown")
args = tool_call.get("args", {})
args_str = json.dumps(args, separators=(",", ":"))
return f"▶ {name}({args_str})"

def _add_message(self, timestamp: str, sender: str, content: str, color: str) -> None:
"""Add a message to the chat log."""
Expand Down
16 changes: 1 addition & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ misc = [

# Perception Dependencies
"scikit-learn",
"clip",
"timm>=1.0.15",
"opencv-contrib-python==4.10.0.84",

Expand Down Expand Up @@ -205,17 +204,6 @@ cuda = [
"mmengine>=0.10.3",
"mmcv>=2.1.0",
"xformers>=0.0.20",

# Detic GPU stack
"mss",
"dataclasses",
"ftfy",
"regex",
"fasttext",
"lvis",
"nltk",
"clip",
"detectron2",
]

dev = [
Expand Down Expand Up @@ -381,11 +369,9 @@ ignore = [

[tool.uv]
# Build dependencies for packages that don't declare them properly
extra-build-dependencies = { detectron2 = ["torch"], contact-graspnet-pytorch = ["numpy"] }
extra-build-dependencies = { contact-graspnet-pytorch = ["numpy"] }

default-groups = []

[tool.uv.sources]
clip = { git = "https://github.com/openai/CLIP.git" }
contact-graspnet-pytorch = { git = "https://github.com/dimensionalOS/contact_graspnet_pytorch.git" }
detectron2 = { git = "https://github.com/facebookresearch/detectron2.git", tag = "v0.6" }
Loading
Loading