Patches for langchain and removed detic dependencies#987
Conversation
Greptile OverviewGreptile SummaryThis PR removes Detic, CLIP, and detectron2 dependencies from the project while maintaining backward compatibility in the human CLI tool. Key ChangesDependency Removal (
Human CLI Compatibility (
Lock File (
Minor IssuesThe PR leaves some stale configuration references to Note on Existing CodeWhile not introduced by this PR, Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Agent as Agent/LLM
participant Transport as pLCMTransport
participant HumanCLI as HumanCLI App
participant Format as _format_tool_call
Agent->>Transport: Publish AIMessage
Note over Agent,Transport: msg.tool_calls or<br/>msg.additional_kwargs["tool_calls"]
Transport->>HumanCLI: receive_msg(AIMessage)
HumanCLI->>HumanCLI: Check msg.tool_calls attribute
alt msg.tool_calls exists
Note over HumanCLI: Use modern format<br/>{"name": "...", "args": {...}}
else msg.tool_calls is None
HumanCLI->>HumanCLI: Fallback to additional_kwargs
Note over HumanCLI: Use legacy format<br/>{"function": {"name": "...", "arguments": "..."}}
end
loop For each tool_call
HumanCLI->>Format: _format_tool_call(tool_call)
alt Legacy format (has "function" key)
Format->>Format: Extract function.name and function.arguments
else Modern format
Format->>Format: Extract name and args directly
end
alt args is not string
Format->>Format: json.dumps(args)
end
Format-->>HumanCLI: "▶ name(args)"
HumanCLI->>HumanCLI: Display tool call with timestamp
end
|
Additional Comments (2)
|
Remove Detic dependencies and keep tool-call compatibility in human CLI
Summary
pyproject.toml.uv.lockto remove the Detic dependency tree.humanclito read tool calls from normalizedmsg.tool_calls(with legacy fallback).