Skip to content

Commit 3048128

Browse files
committed
RDBC-934 Deprecate schema_type parameter
1 parent c9eccfd commit 3048128

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ravendb/documents/operations/ai/agents/add_or_update_ai_agent_operation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22
import json
3+
import warnings
34
from typing import Optional, Type, Dict, Any, TYPE_CHECKING
45

56
from ravendb.documents.operations.definitions import MaintenanceOperation
@@ -28,6 +29,13 @@ def from_json(cls, json_dict: Dict[str, Any]) -> AiAgentConfigurationResult:
2829

2930
class AddOrUpdateAiAgentOperation(MaintenanceOperation[AiAgentConfigurationResult]):
3031
def __init__(self, configuration: AiAgentConfiguration, schema_type: Type = None):
32+
if schema_type is not None:
33+
warnings.warn(
34+
"The 'schema_type' parameter is deprecated and will be removed in 8.0 version of Python client."
35+
" Use 'sample_object' or 'output_schema' inside AiAgentConfiguration instead.",
36+
DeprecationWarning,
37+
stacklevel=2
38+
)
3139
if configuration is None:
3240
raise ValueError("configuration cannot be None")
3341

0 commit comments

Comments
 (0)