Skip to content

Commit

Permalink
chore: add deprecation info
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejmajek committed Aug 20, 2024
1 parent be9e120 commit 002b732
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
25 changes: 21 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pypdf = "^4.2.0"
langchain-ollama = "^0.1.1"

streamlit = "^1.37.1"
deprecated = "^1.2.14"
[tool.poetry.group.dev.dependencies]
ipykernel = "^6.29.4"

Expand Down
4 changes: 4 additions & 0 deletions src/rai/rai/tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import rclpy
import rclpy.qos
from cv_bridge import CvBridge
from deprecated import deprecated
from langchain.tools import BaseTool
from langchain_core.messages import AIMessage, BaseMessage, ToolCall, ToolMessage
from rclpy.duration import Duration
Expand Down Expand Up @@ -95,6 +96,7 @@ def wait_for_message(
return False, None


@deprecated(reason="Multimodal images are handled using rai.messages.multimodal")
def images_to_vendor_format(images: List[str], vendor: str) -> List[Dict[str, Any]]:
if vendor == "openai":
return [
Expand All @@ -110,6 +112,7 @@ def images_to_vendor_format(images: List[str], vendor: str) -> List[Dict[str, An
raise ValueError(f"Vendor {vendor} not supported")


@deprecated(reason="Running tool is langchain.agent based now")
def run_tool_call(
tool_call: ToolCall,
tools: Sequence[BaseTool],
Expand Down Expand Up @@ -140,6 +143,7 @@ def run_tool_call(
return tool_output


@deprecated(reason="Running tool is langchain.agent based now")
def run_requested_tools(
ai_msg: AIMessage,
tools: Sequence[BaseTool],
Expand Down

0 comments on commit 002b732

Please sign in to comment.