@@ -10,7 +10,14 @@ class AiAgentToolQuery:
1010 and its results provided back to the model.
1111 """
1212
13- def __init__ (self , name : str = None , description : str = None , query : str = None ):
13+ def __init__ (
14+ self ,
15+ name : str = None ,
16+ description : str = None ,
17+ query : str = None ,
18+ parameters_sample_object : str = None ,
19+ parameters_schema : str = None ,
20+ ):
1421 self .name = name
1522 self .description = description
1623 self .query = query
@@ -46,7 +53,13 @@ class AiAgentToolAction:
4653 Tool actions represent external functions whose results are provided by the user
4754 """
4855
49- def __init__ (self , name : str = None , description : str = None ):
56+ def __init__ (
57+ self ,
58+ name : str = None ,
59+ description : str = None ,
60+ parameters_sample_object : str = None ,
61+ parameters_schema : str = None ,
62+ ):
5063 self .name = name
5164 self .description = description
5265 self .parameters_sample_object : Optional [str ] = None
@@ -105,12 +118,21 @@ class AiAgentSummarizationByTokens:
105118
106119 DEFAULT_MAX_TOKENS_BEFORE_SUMMARIZATION = 32 * 1024
107120
108- def __init__ (self ):
109- self .summarization_task_beginning_prompt : Optional [str ] = None
110- self .summarization_task_end_prompt : Optional [str ] = None
111- self .result_prefix : Optional [str ] = None
112- self .max_tokens_before_summarization : int = self .DEFAULT_MAX_TOKENS_BEFORE_SUMMARIZATION
113- self .max_tokens_after_summarization : int = 1024
121+ def __init__ (
122+ self ,
123+ summarization_task_beginning_prompt : str = None ,
124+ summarization_task_end_prompt : str = None ,
125+ result_prefix : str = None ,
126+ max_tokens_before_summarization : int = None ,
127+ max_tokens_after_summarization : int = None ,
128+ ):
129+ self .summarization_task_beginning_prompt : Optional [str ] = summarization_task_beginning_prompt
130+ self .summarization_task_end_prompt : Optional [str ] = summarization_task_end_prompt
131+ self .result_prefix : Optional [str ] = result_prefix
132+ self .max_tokens_before_summarization : int = (
133+ max_tokens_before_summarization or self .DEFAULT_MAX_TOKENS_BEFORE_SUMMARIZATION
134+ )
135+ self .max_tokens_after_summarization : int = max_tokens_after_summarization or 1024
114136
115137 def to_json (self ) -> Dict [str , Any ]:
116138 return {
@@ -141,9 +163,13 @@ class AiAgentTruncateChat:
141163
142164 DEFAULT_MESSAGES_LENGTH_BEFORE_TRUNCATE = 500
143165
144- def __init__ (self ):
145- self .messages_length_before_truncate : int = self .DEFAULT_MESSAGES_LENGTH_BEFORE_TRUNCATE
146- self .messages_length_after_truncate : int = self .DEFAULT_MESSAGES_LENGTH_BEFORE_TRUNCATE // 2
166+ def __init__ (self , messages_length_before_truncate : int = None , messages_length_after_truncate : int = None ):
167+ self .messages_length_before_truncate : int = (
168+ messages_length_before_truncate or self .DEFAULT_MESSAGES_LENGTH_BEFORE_TRUNCATE
169+ )
170+ self .messages_length_after_truncate : int = (
171+ messages_length_after_truncate or self .DEFAULT_MESSAGES_LENGTH_BEFORE_TRUNCATE // 2
172+ )
147173
148174 def to_json (self ) -> Dict [str , Any ]:
149175 return {
@@ -168,8 +194,8 @@ class AiAgentHistoryConfiguration:
168194 Defines the configuration for retention and expiration of AI agent chat history documents.
169195 """
170196
171- def __init__ (self ):
172- self .history_expiration_in_sec : Optional [int ] = None
197+ def __init__ (self , history_expiration_in_sec : int = None ):
198+ self .history_expiration_in_sec : Optional [int ] = history_expiration_in_sec
173199
174200 def to_json (self ) -> Dict [str , Any ]:
175201 return {
@@ -223,19 +249,33 @@ class AiAgentConfiguration:
223249 tools (queries/actions), output schema, persistence settings, and connection string.
224250 """
225251
226- def __init__ (self , name : str = None , connection_string_name : str = None , system_prompt : str = None ):
227- self .identifier : Optional [str ] = None
252+ def __init__ (
253+ self ,
254+ name : str ,
255+ connection_string_name : str ,
256+ system_prompt : str ,
257+ identifier : str = None ,
258+ sample_object : str = None ,
259+ output_schema : str = None ,
260+ queries : List [AiAgentToolQuery ] = None ,
261+ actions : List [AiAgentToolAction ] = None ,
262+ persistence : AiAgentPersistenceConfiguration = None ,
263+ parameters : Set [str ] = None ,
264+ chat_trimming : AiAgentChatTrimmingConfiguration = None ,
265+ max_model_iterations_per_call : int = None ,
266+ ):
228267 self .name = name
229268 self .connection_string_name = connection_string_name
230269 self .system_prompt = system_prompt
231- self .sample_object : Optional [str ] = None
232- self .output_schema : Optional [str ] = None
233- self .queries : List [AiAgentToolQuery ] = []
234- self .actions : List [AiAgentToolAction ] = []
235- self .persistence : Optional [AiAgentPersistenceConfiguration ] = None
236- self .parameters : Set [str ] = set ()
237- self .chat_trimming : Optional [AiAgentChatTrimmingConfiguration ] = None
238- self .max_model_iterations_per_call : Optional [int ] = None
270+ self .identifier : Optional [str ] = identifier
271+ self .sample_object : Optional [str ] = sample_object
272+ self .output_schema : Optional [str ] = output_schema
273+ self .queries : List [AiAgentToolQuery ] = queries or []
274+ self .actions : List [AiAgentToolAction ] = actions or []
275+ self .persistence : Optional [AiAgentPersistenceConfiguration ] = persistence
276+ self .parameters : Set [str ] = parameters or set ()
277+ self .chat_trimming : Optional [AiAgentChatTrimmingConfiguration ] = chat_trimming
278+ self .max_model_iterations_per_call : Optional [int ] = max_model_iterations_per_call
239279
240280 def to_json (self ) -> Dict [str , Any ]:
241281 # Convert parameters set to list of parameter objects using list comprehension
0 commit comments