fix bedesten

This commit is contained in:
saidsurucu
2025-07-18 09:56:22 +03:00
parent 34216a9557
commit c092a7af45
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -58,9 +58,14 @@ class BedestenApiClient:
logger.info(f"BedestenApiClient: Mapped birimAdi '{original_birim_adi}' to '{mapped_birim_adi}'")
try:
# Create request dict and remove birimAdi if empty
request_dict = search_request.model_dump()
if not request_dict["data"]["birimAdi"]: # Remove if empty string
del request_dict["data"]["birimAdi"]
response = await self.http_client.post(
self.SEARCH_ENDPOINT,
json=search_request.model_dump()
json=request_dict
)
response.raise_for_status()
response_json = response.json()
+2
View File
@@ -1072,6 +1072,7 @@ KARAR_TURU_ADI_TO_GUID_ENUM_MAP = {
}
# --- MCP Tools for Yargitay ---
"""
@app.tool(
description="Search Yargıtay decisions with 52 chamber filtering and advanced operators",
annotations={
@@ -1160,6 +1161,7 @@ async def get_yargitay_document_markdown(id: str) -> YargitayDocumentMarkdown:
except Exception as e:
logger.exception(f"Error in tool 'get_yargitay_document_markdown'.")
raise
"""
# --- MCP Tools for Danistay ---
"""