mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-27 06:18:05 +00:00
x
This commit is contained in:
@@ -12,6 +12,10 @@ from langchain_core.utils.function_calling import (
|
|||||||
from langchain_robocorp.toolkits import ActionServerToolkit
|
from langchain_robocorp.toolkits import ActionServerToolkit
|
||||||
|
|
||||||
from ._fixtures import FakeChatLLMT
|
from ._fixtures import FakeChatLLMT
|
||||||
|
from pydantic import __version__
|
||||||
|
|
||||||
|
# Get the version tuple (it may contain a suffix like 'rc1')
|
||||||
|
VERSION_TUPLE = tuple(int(x) if x.isdigit() else x for x in __version__.split("."))
|
||||||
|
|
||||||
|
|
||||||
def test_initialization() -> None:
|
def test_initialization() -> None:
|
||||||
@@ -91,6 +95,8 @@ Strictly adhere to the schema."""
|
|||||||
assert set(params["properties"].keys()) == {"sheet", "rows_to_add"}
|
assert set(params["properties"].keys()) == {"sheet", "rows_to_add"}
|
||||||
|
|
||||||
desc = "The columns that make up the row"
|
desc = "The columns that make up the row"
|
||||||
|
|
||||||
|
if VERSION_TUPLE < (2, 9):
|
||||||
expected = {
|
expected = {
|
||||||
"description": "the rows to be added to the sheet",
|
"description": "the rows to be added to the sheet",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
@@ -121,6 +127,28 @@ Strictly adhere to the schema."""
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
else:
|
||||||
|
expected = {
|
||||||
|
"properties": {
|
||||||
|
"rows": {
|
||||||
|
"description": "The rows that need to be added",
|
||||||
|
"items": {
|
||||||
|
"properties": {
|
||||||
|
"columns": {
|
||||||
|
"description": "The columns that make up the row",
|
||||||
|
"items": {"type": "string"},
|
||||||
|
"type": "array",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["columns"],
|
||||||
|
"type": "object",
|
||||||
|
},
|
||||||
|
"type": "array",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["rows"],
|
||||||
|
"type": "object",
|
||||||
|
}
|
||||||
assert params["properties"]["rows_to_add"] == expected
|
assert params["properties"]["rows_to_add"] == expected
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user