From f5982ed90d94ab094a428b3be8fd4b60fd66303d Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 8 Apr 2026 21:55:03 +0300 Subject: [PATCH 1/2] fix: correct repository URLs and docstring examples --- langchain_opengradient/toolkits.py | 5 ++--- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/langchain_opengradient/toolkits.py b/langchain_opengradient/toolkits.py index 6d06010..a91d3d1 100644 --- a/langchain_opengradient/toolkits.py +++ b/langchain_opengradient/toolkits.py @@ -151,7 +151,7 @@ def create_run_model_tool( self, model_cid: str, tool_name: str, - model_input_provider: Callable[..., InferenceResult], + model_input_provider: Callable[..., dict], model_output_formatter: Callable[..., str], tool_input_schema: Optional[Type[BaseModel]] = None, tool_description: str = "Executes the given ML model", @@ -215,7 +215,7 @@ def GetInputData(): eth_volatility_tool = toolkit.create_run_model_tool( model_cid = "QmRhcpDXfYCKsimTmJYrAVM4Bbvck59Zb2onj3MHv9Kw5N", tool_name = "one_hour_eth_usdt_volatility", - model_input_provider = GetInputData(), + model_input_provider = GetInputData, model_output_formatter = lambda x: format( float(x.model_output["Y"].item()), ".3%" @@ -276,7 +276,6 @@ def create_read_workflow_tool( toolkit = OpenGradientToolkit() btc_workflow_tool = toolkit.create_read_workflow_tool( - tool_type=ToolType.LANGCHAIN, workflow_contract_address="0x6e0641925b845A1ca8aA9a890C4DEF388E9197e0", tool_name="ETH_Price_Forecast", tool_description="Reads latest forecast for ETH price", diff --git a/pyproject.toml b/pyproject.toml index f68dfaf..c399ab4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,14 +8,14 @@ version = "0.1.1" description = "An integration package connecting OpenGradient and LangChain" authors = [] readme = "README.md" -repository = "https://github.com/langchain-ai/langchain" +repository = "https://github.com/OpenGradient/og-langchain" license = "MIT" [tool.mypy] disallow_untyped_defs = "True" [tool.poetry.urls] -"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/opengradient" +"Source Code" = "https://github.com/OpenGradient/og-langchain" "Release Notes" = "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22opengradient%3D%3D0%22&expanded=true" [tool.poetry.dependencies] From 9dd8322956f8d80013be40515e4f1ecad6d03ad8 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 8 Apr 2026 22:53:10 +0300 Subject: [PATCH 2/2] fix: correct remaining Release Notes URL pointing to langchain-ai --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c399ab4..f0165ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ disallow_untyped_defs = "True" [tool.poetry.urls] "Source Code" = "https://github.com/OpenGradient/og-langchain" -"Release Notes" = "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22opengradient%3D%3D0%22&expanded=true" +"Release Notes" = "https://github.com/OpenGradient/og-langchain/releases" [tool.poetry.dependencies] python = ">=3.9,<4.0"