diff --git a/docs/en/samples/pre_post_processing/python/agent_test.py b/docs/en/samples/pre_post_processing/python/agent_test.py index 188e70c7a6..b69279453f 100644 --- a/docs/en/samples/pre_post_processing/python/agent_test.py +++ b/docs/en/samples/pre_post_processing/python/agent_test.py @@ -16,8 +16,6 @@ import os import pytest from pathlib import Path import asyncio -import sys -import importlib.util ORCH_NAME = os.environ.get("ORCH_NAME") module_path = f"python.{ORCH_NAME}.agent" diff --git a/docs/en/samples/pre_post_processing/python/langchain/agent.py b/docs/en/samples/pre_post_processing/python/langchain/agent.py index ec482dc07f..9a08f07031 100644 --- a/docs/en/samples/pre_post_processing/python/langchain/agent.py +++ b/docs/en/samples/pre_post_processing/python/langchain/agent.py @@ -1,15 +1,10 @@ import asyncio -import re -import json -from typing import Callable, Any from toolbox_langchain import ToolboxClient -from toolbox_core.protocol import Protocol from langchain_google_vertexai import ChatVertexAI from langchain_core.messages import ToolMessage, messages_to_dict from langchain.agents import create_agent from langchain.agents.middleware import ( wrap_tool_call, - AgentState ) system_prompt = """ @@ -85,9 +80,6 @@ async def main(): print("-" * 50) print("Final Client Response:") - serializable_response = { - "messages": messages_to_dict(response["messages"]) - } last_ai_msg = response["messages"][-1].content print(f"AI: {last_ai_msg}")