Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions opencontractserver/llms/tools/tool_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ def parameters(self) -> dict[str, Any]:

# Try to infer type from annotation
if param.annotation != inspect.Parameter.empty:
if param.annotation == int:
if param.annotation is int:
param_info["type"] = "integer"
elif param.annotation == float:
elif param.annotation is float:
param_info["type"] = "number"
elif param.annotation == bool:
elif param.annotation is bool:
param_info["type"] = "boolean"
elif param.annotation == list:
elif param.annotation is list:
param_info["type"] = "array"
elif param.annotation == dict:
elif param.annotation is dict:
param_info["type"] = "object"

properties[param_name] = param_info
Expand Down
3 changes: 2 additions & 1 deletion opencontractserver/pipeline/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def run_post_processors(
processor_paths: list[str],
zip_bytes: bytes,
export_data: OpenContractsExportDataJsonPythonType,
input_kwargs: dict[str, Any] = {},
input_kwargs: dict[str, Any] | None = None,
) -> tuple[bytes, OpenContractsExportDataJsonPythonType]:
"""
Load and run post-processors in sequence.
Expand All @@ -459,6 +459,7 @@ def run_post_processors(
- Modified zip bytes
- Modified export data dictionary
"""
input_kwargs = input_kwargs or {}
current_zip_bytes = zip_bytes
current_export_data = export_data

Expand Down
Loading