mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 07:35:18 +00:00
x
This commit is contained in:
parent
6d22f40a0b
commit
22cee5d983
@ -659,7 +659,8 @@ class ChildTool(BaseTool):
|
|||||||
return (), tool_input.copy()
|
return (), tool_input.copy()
|
||||||
else:
|
else:
|
||||||
# This code path is not expected to be reachable.
|
# This code path is not expected to be reachable.
|
||||||
raise TypeError(f"Invalid tool input type: {type(tool_input)}")
|
msg = f"Invalid tool input type: {type(tool_input)}"
|
||||||
|
raise TypeError(msg)
|
||||||
|
|
||||||
def run(
|
def run(
|
||||||
self,
|
self,
|
||||||
|
@ -2,16 +2,12 @@
|
|||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import pytest
|
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
import threading
|
import threading
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from pydantic import BaseModel, Field, ValidationError
|
|
||||||
from pydantic.v1 import BaseModel as BaseModelV1
|
|
||||||
from pydantic.v1 import ValidationError as ValidationErrorV1
|
|
||||||
from typing import (
|
from typing import (
|
||||||
Annotated,
|
Annotated,
|
||||||
Any,
|
Any,
|
||||||
@ -23,6 +19,11 @@ from typing import (
|
|||||||
Union,
|
Union,
|
||||||
cast,
|
cast,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from pydantic import BaseModel, Field, ValidationError
|
||||||
|
from pydantic.v1 import BaseModel as BaseModelV1
|
||||||
|
from pydantic.v1 import ValidationError as ValidationErrorV1
|
||||||
from typing_extensions import TypedDict
|
from typing_extensions import TypedDict
|
||||||
|
|
||||||
from langchain_core import tools
|
from langchain_core import tools
|
||||||
@ -2690,4 +2691,3 @@ def test_tool_invoke_does_not_mutate_inputs() -> None:
|
|||||||
"id": "call_0_82c17db8-95df-452f-a4c2-03f809022134",
|
"id": "call_0_82c17db8-95df-452f-a4c2-03f809022134",
|
||||||
"type": "tool_call",
|
"type": "tool_call",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1027,7 +1027,7 @@ typing = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "langchain-tests"
|
name = "langchain-tests"
|
||||||
version = "0.3.15"
|
version = "0.3.16"
|
||||||
source = { directory = "../standard-tests" }
|
source = { directory = "../standard-tests" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "httpx" },
|
{ name = "httpx" },
|
||||||
|
Loading…
Reference in New Issue
Block a user