diff --git a/libs/partners/robocorp/langchain_robocorp/_common.py b/libs/partners/robocorp/langchain_robocorp/_common.py index 77880005b188b..3ff0b4af2292f 100644 --- a/libs/partners/robocorp/langchain_robocorp/_common.py +++ b/libs/partners/robocorp/langchain_robocorp/_common.py @@ -2,13 +2,13 @@ from dataclasses import dataclass from typing import Any, Dict, List, Set, Tuple, Union, cast +from langchain_core.utils.json_schema import dereference_refs +from langchain_core.utils.pydantic import is_basemodel_instance from pydantic import ( BaseModel, Field, create_model, ) -from langchain_core.utils.json_schema import dereference_refs -from langchain_core.utils.pydantic import is_basemodel_instance @dataclass(frozen=True) diff --git a/libs/partners/robocorp/langchain_robocorp/toolkits.py b/libs/partners/robocorp/langchain_robocorp/toolkits.py index c16f70a31e298..3e9f9dfbfbfe0 100644 --- a/libs/partners/robocorp/langchain_robocorp/toolkits.py +++ b/libs/partners/robocorp/langchain_robocorp/toolkits.py @@ -13,11 +13,11 @@ from langchain_core.language_models.chat_models import BaseChatModel from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import PromptTemplate -from pydantic import BaseModel, Field, PrivateAttr, create_model from langchain_core.runnables import Runnable, RunnablePassthrough from langchain_core.tools import BaseTool, StructuredTool, Tool from langchain_core.tracers.context import _tracing_v2_is_enabled from langsmith import Client +from pydantic import BaseModel, ConfigDict, Field, PrivateAttr, create_model from langchain_robocorp._common import ( get_param_fields, @@ -27,8 +27,6 @@ from langchain_robocorp._prompts import ( API_CONTROLLER_PROMPT, ) -from pydantic import ConfigDict - LLM_TRACE_HEADER = "X-action-trace" @@ -112,7 +110,9 @@ class ActionServerToolkit(BaseModel): """Enable reporting Langsmith trace to Action Server runs""" _run_details: dict = PrivateAttr({}) - model_config = ConfigDict(arbitrary_types_allowed=True,) + model_config = ConfigDict( + arbitrary_types_allowed=True, + ) def get_tools( self,