lionagi 0.17.10__py3-none-any.whl → 0.18.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. lionagi/__init__.py +1 -2
  2. lionagi/_class_registry.py +1 -2
  3. lionagi/_errors.py +1 -2
  4. lionagi/adapters/async_postgres_adapter.py +2 -10
  5. lionagi/config.py +1 -2
  6. lionagi/fields/action.py +1 -2
  7. lionagi/fields/base.py +3 -0
  8. lionagi/fields/code.py +3 -0
  9. lionagi/fields/file.py +3 -0
  10. lionagi/fields/instruct.py +1 -2
  11. lionagi/fields/reason.py +1 -2
  12. lionagi/fields/research.py +3 -0
  13. lionagi/libs/__init__.py +1 -2
  14. lionagi/libs/file/__init__.py +1 -2
  15. lionagi/libs/file/chunk.py +1 -2
  16. lionagi/libs/file/process.py +1 -2
  17. lionagi/libs/schema/__init__.py +1 -2
  18. lionagi/libs/schema/as_readable.py +1 -2
  19. lionagi/libs/schema/extract_code_block.py +1 -2
  20. lionagi/libs/schema/extract_docstring.py +1 -2
  21. lionagi/libs/schema/function_to_schema.py +1 -2
  22. lionagi/libs/schema/load_pydantic_model_from_schema.py +1 -2
  23. lionagi/libs/schema/minimal_yaml.py +98 -0
  24. lionagi/libs/validate/__init__.py +1 -2
  25. lionagi/libs/validate/common_field_validators.py +1 -2
  26. lionagi/libs/validate/validate_boolean.py +1 -2
  27. lionagi/ln/fuzzy/_string_similarity.py +1 -2
  28. lionagi/ln/types.py +32 -5
  29. lionagi/models/__init__.py +1 -2
  30. lionagi/models/field_model.py +9 -1
  31. lionagi/models/hashable_model.py +4 -2
  32. lionagi/models/model_params.py +1 -2
  33. lionagi/models/operable_model.py +1 -2
  34. lionagi/models/schema_model.py +1 -2
  35. lionagi/operations/ReAct/ReAct.py +475 -239
  36. lionagi/operations/ReAct/__init__.py +1 -2
  37. lionagi/operations/ReAct/utils.py +4 -2
  38. lionagi/operations/__init__.py +1 -2
  39. lionagi/operations/act/__init__.py +2 -0
  40. lionagi/operations/act/act.py +206 -0
  41. lionagi/operations/brainstorm/__init__.py +1 -2
  42. lionagi/operations/brainstorm/brainstorm.py +1 -2
  43. lionagi/operations/brainstorm/prompt.py +1 -2
  44. lionagi/operations/builder.py +1 -2
  45. lionagi/operations/chat/__init__.py +1 -2
  46. lionagi/operations/chat/chat.py +131 -116
  47. lionagi/operations/communicate/communicate.py +102 -44
  48. lionagi/operations/flow.py +5 -6
  49. lionagi/operations/instruct/__init__.py +1 -2
  50. lionagi/operations/instruct/instruct.py +1 -2
  51. lionagi/operations/interpret/__init__.py +1 -2
  52. lionagi/operations/interpret/interpret.py +66 -22
  53. lionagi/operations/operate/__init__.py +1 -2
  54. lionagi/operations/operate/operate.py +213 -108
  55. lionagi/operations/parse/__init__.py +1 -2
  56. lionagi/operations/parse/parse.py +171 -144
  57. lionagi/operations/plan/__init__.py +1 -2
  58. lionagi/operations/plan/plan.py +1 -2
  59. lionagi/operations/plan/prompt.py +1 -2
  60. lionagi/operations/select/__init__.py +1 -2
  61. lionagi/operations/select/select.py +79 -19
  62. lionagi/operations/select/utils.py +2 -3
  63. lionagi/operations/types.py +120 -25
  64. lionagi/operations/utils.py +1 -2
  65. lionagi/protocols/__init__.py +1 -2
  66. lionagi/protocols/_concepts.py +1 -2
  67. lionagi/protocols/action/__init__.py +1 -2
  68. lionagi/protocols/action/function_calling.py +3 -20
  69. lionagi/protocols/action/manager.py +34 -4
  70. lionagi/protocols/action/tool.py +1 -2
  71. lionagi/protocols/contracts.py +1 -2
  72. lionagi/protocols/forms/__init__.py +1 -2
  73. lionagi/protocols/forms/base.py +1 -2
  74. lionagi/protocols/forms/flow.py +1 -2
  75. lionagi/protocols/forms/form.py +1 -2
  76. lionagi/protocols/forms/report.py +1 -2
  77. lionagi/protocols/generic/__init__.py +1 -2
  78. lionagi/protocols/generic/element.py +17 -65
  79. lionagi/protocols/generic/event.py +1 -2
  80. lionagi/protocols/generic/log.py +17 -14
  81. lionagi/protocols/generic/pile.py +3 -4
  82. lionagi/protocols/generic/processor.py +1 -2
  83. lionagi/protocols/generic/progression.py +1 -2
  84. lionagi/protocols/graph/__init__.py +1 -2
  85. lionagi/protocols/graph/edge.py +1 -2
  86. lionagi/protocols/graph/graph.py +1 -2
  87. lionagi/protocols/graph/node.py +1 -2
  88. lionagi/protocols/ids.py +1 -2
  89. lionagi/protocols/mail/__init__.py +1 -2
  90. lionagi/protocols/mail/exchange.py +1 -2
  91. lionagi/protocols/mail/mail.py +1 -2
  92. lionagi/protocols/mail/mailbox.py +1 -2
  93. lionagi/protocols/mail/manager.py +1 -2
  94. lionagi/protocols/mail/package.py +1 -2
  95. lionagi/protocols/messages/__init__.py +28 -2
  96. lionagi/protocols/messages/action_request.py +87 -186
  97. lionagi/protocols/messages/action_response.py +74 -133
  98. lionagi/protocols/messages/assistant_response.py +131 -161
  99. lionagi/protocols/messages/base.py +27 -20
  100. lionagi/protocols/messages/instruction.py +281 -626
  101. lionagi/protocols/messages/manager.py +113 -64
  102. lionagi/protocols/messages/message.py +88 -199
  103. lionagi/protocols/messages/system.py +53 -125
  104. lionagi/protocols/operatives/__init__.py +1 -2
  105. lionagi/protocols/operatives/operative.py +1 -2
  106. lionagi/protocols/operatives/step.py +1 -2
  107. lionagi/protocols/types.py +1 -4
  108. lionagi/service/connections/__init__.py +1 -2
  109. lionagi/service/connections/api_calling.py +1 -2
  110. lionagi/service/connections/endpoint.py +1 -10
  111. lionagi/service/connections/endpoint_config.py +1 -2
  112. lionagi/service/connections/header_factory.py +1 -2
  113. lionagi/service/connections/match_endpoint.py +1 -2
  114. lionagi/service/connections/mcp/__init__.py +1 -2
  115. lionagi/service/connections/mcp/wrapper.py +1 -2
  116. lionagi/service/connections/providers/__init__.py +1 -2
  117. lionagi/service/connections/providers/anthropic_.py +1 -2
  118. lionagi/service/connections/providers/claude_code_cli.py +1 -2
  119. lionagi/service/connections/providers/exa_.py +1 -2
  120. lionagi/service/connections/providers/nvidia_nim_.py +2 -27
  121. lionagi/service/connections/providers/oai_.py +30 -96
  122. lionagi/service/connections/providers/ollama_.py +4 -4
  123. lionagi/service/connections/providers/perplexity_.py +1 -2
  124. lionagi/service/hooks/__init__.py +1 -1
  125. lionagi/service/hooks/_types.py +1 -1
  126. lionagi/service/hooks/_utils.py +1 -1
  127. lionagi/service/hooks/hook_event.py +1 -1
  128. lionagi/service/hooks/hook_registry.py +1 -1
  129. lionagi/service/hooks/hooked_event.py +3 -4
  130. lionagi/service/imodel.py +1 -2
  131. lionagi/service/manager.py +1 -2
  132. lionagi/service/rate_limited_processor.py +1 -2
  133. lionagi/service/resilience.py +1 -2
  134. lionagi/service/third_party/anthropic_models.py +1 -2
  135. lionagi/service/third_party/claude_code.py +4 -4
  136. lionagi/service/third_party/openai_models.py +433 -0
  137. lionagi/service/token_calculator.py +1 -2
  138. lionagi/session/__init__.py +1 -2
  139. lionagi/session/branch.py +171 -180
  140. lionagi/session/session.py +4 -11
  141. lionagi/tools/__init__.py +1 -2
  142. lionagi/tools/base.py +1 -2
  143. lionagi/tools/file/__init__.py +1 -2
  144. lionagi/tools/file/reader.py +3 -4
  145. lionagi/tools/types.py +1 -2
  146. lionagi/utils.py +1 -2
  147. lionagi/version.py +1 -1
  148. {lionagi-0.17.10.dist-info → lionagi-0.18.0.dist-info}/METADATA +1 -2
  149. lionagi-0.18.0.dist-info/RECORD +191 -0
  150. lionagi/operations/_act/__init__.py +0 -3
  151. lionagi/operations/_act/act.py +0 -87
  152. lionagi/protocols/messages/templates/README.md +0 -28
  153. lionagi/protocols/messages/templates/action_request.jinja2 +0 -5
  154. lionagi/protocols/messages/templates/action_response.jinja2 +0 -9
  155. lionagi/protocols/messages/templates/assistant_response.jinja2 +0 -6
  156. lionagi/protocols/messages/templates/instruction_message.jinja2 +0 -61
  157. lionagi/protocols/messages/templates/system_message.jinja2 +0 -11
  158. lionagi/protocols/messages/templates/tool_schemas.jinja2 +0 -7
  159. lionagi/service/connections/providers/types.py +0 -28
  160. lionagi/service/third_party/openai_model_names.py +0 -198
  161. lionagi/service/types.py +0 -59
  162. lionagi-0.17.10.dist-info/RECORD +0 -199
  163. {lionagi-0.17.10.dist-info → lionagi-0.18.0.dist-info}/WHEEL +0 -0
  164. {lionagi-0.17.10.dist-info → lionagi-0.18.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,47 +1,26 @@
1
- # Copyright (c) 2023 - 2025, HaiyangLi <quantocean.li at gmail dot com>
2
- #
1
+ # Copyright (c) 2023-2025, HaiyangLi <quantocean.li at gmail dot com>
3
2
  # SPDX-License-Identifier: Apache-2.0
4
3
 
5
- import logging
4
+ import warnings
6
5
  from typing import TYPE_CHECKING, Literal
7
6
 
8
7
  from pydantic import BaseModel, JsonValue
9
8
 
10
9
  from lionagi.fields.instruct import Instruct
10
+ from lionagi.ln.fuzzy import FuzzyMatchKeysParams
11
11
  from lionagi.models import FieldModel, ModelParams
12
- from lionagi.protocols.operatives.step import Operative, Step
13
12
  from lionagi.protocols.types import Instruction, Progression, SenderRecipient
14
- from lionagi.service.imodel import iModel
15
13
  from lionagi.session.branch import AlcallParams
16
14
 
15
+ from ..types import ActionParam, ChatParam, HandleValidation, ParseParam
16
+
17
17
  if TYPE_CHECKING:
18
+ from lionagi.protocols.operatives.step import Operative
19
+ from lionagi.service.imodel import iModel
18
20
  from lionagi.session.branch import Branch, ToolRef
19
21
 
20
22
 
21
- def _handle_response_format_kwargs(
22
- operative_model: type[BaseModel] = None,
23
- request_model: type[BaseModel] = None,
24
- response_format: type[BaseModel] = None,
25
- ):
26
- if operative_model:
27
- logging.warning(
28
- "`operative_model` is deprecated. Use `response_format` instead."
29
- )
30
- if (
31
- (operative_model and response_format)
32
- or (operative_model and request_model)
33
- or (response_format and request_model)
34
- ):
35
- raise ValueError(
36
- "Cannot specify both `operative_model` and `response_format` (or `request_model`) "
37
- "as they are aliases of each other."
38
- )
39
-
40
- # Use the final chosen format
41
- return response_format or operative_model or request_model
42
-
43
-
44
- async def operate(
23
+ def prepare_operate_kw(
45
24
  branch: "Branch",
46
25
  *,
47
26
  instruct: Instruct = None,
@@ -51,18 +30,17 @@ async def operate(
51
30
  sender: SenderRecipient = None,
52
31
  recipient: SenderRecipient = None,
53
32
  progression: Progression = None,
54
- imodel: iModel = None, # deprecated, alias of chat_model
55
- chat_model: iModel = None,
33
+ imodel: "iModel" = None, # deprecated, alias of chat_model
34
+ chat_model: "iModel" = None,
56
35
  invoke_actions: bool = True,
57
36
  tool_schemas: list[dict] = None,
58
37
  images: list = None,
59
38
  image_detail: Literal["low", "high", "auto"] = None,
60
- parse_model: iModel = None,
39
+ parse_model: "iModel" = None,
61
40
  skip_validation: bool = False,
62
41
  tools: "ToolRef" = None,
63
42
  operative: "Operative" = None,
64
43
  response_format: type[BaseModel] = None, # alias of operative.request_type
65
- return_operative: bool = False,
66
44
  actions: bool = False,
67
45
  reason: bool = False,
68
46
  call_params: AlcallParams = None,
@@ -72,21 +50,38 @@ async def operate(
72
50
  exclude_fields: list | dict | None = None,
73
51
  request_params: ModelParams = None,
74
52
  request_param_kwargs: dict = None,
75
- response_params: ModelParams = None,
76
- response_param_kwargs: dict = None,
77
- handle_validation: Literal[
78
- "raise", "return_value", "return_none"
79
- ] = "return_value",
53
+ handle_validation: HandleValidation = "return_value",
80
54
  operative_model: type[BaseModel] = None,
81
55
  request_model: type[BaseModel] = None,
82
56
  include_token_usage_to_model: bool = False,
57
+ clear_messages: bool = False,
83
58
  **kwargs,
84
59
  ) -> list | BaseModel | None | dict | str:
85
- response_format = _handle_response_format_kwargs(
86
- operative_model, request_model, response_format
87
- )
60
+ # Handle deprecated parameters
61
+ if operative_model:
62
+ warnings.warn(
63
+ "Parameter 'operative_model' is deprecated. Use 'response_format' instead.",
64
+ DeprecationWarning,
65
+ stacklevel=2,
66
+ )
67
+ if imodel:
68
+ warnings.warn(
69
+ "Parameter 'imodel' is deprecated. Use 'chat_model' instead.",
70
+ DeprecationWarning,
71
+ stacklevel=2,
72
+ )
88
73
 
89
- # Decide which chat model to use
74
+ if (
75
+ (operative_model and response_format)
76
+ or (operative_model and request_model)
77
+ or (response_format and request_model)
78
+ ):
79
+ raise ValueError(
80
+ "Cannot specify both `operative_model` and `response_format` (or `request_model`) "
81
+ "as they are aliases of each other."
82
+ )
83
+
84
+ response_format = response_format or operative_model or request_model
90
85
  chat_model = chat_model or imodel or branch.chat_model
91
86
  parse_model = parse_model or chat_model
92
87
 
@@ -109,103 +104,213 @@ async def operate(
109
104
  if action_strategy:
110
105
  instruct.action_strategy = action_strategy
111
106
 
112
- # 1) Create or update the Operative
107
+ # Build the Operative - always create it for backwards compatibility
108
+ from lionagi.protocols.operatives.step import Step
109
+
113
110
  operative = Step.request_operative(
114
111
  request_params=request_params,
115
112
  reason=instruct.reason,
116
- actions=instruct.actions,
113
+ actions=instruct.actions or actions,
117
114
  exclude_fields=exclude_fields,
118
115
  base_type=response_format,
119
116
  field_models=field_models,
120
117
  **(request_param_kwargs or {}),
121
118
  )
119
+ # Use the operative's request_type which is a proper Pydantic model
120
+ # created from field_models if provided
121
+ final_response_format = operative.request_type
122
122
 
123
- # If the instruction signals actions, ensure tools are provided
124
- if instruct.actions:
125
- tools = tools or True
126
-
127
- # If we want to auto-invoke tools, fetch or generate the schemas
128
- if invoke_actions and tools:
129
- tool_schemas = tool_schemas or branch.acts.get_tool_schema(tools=tools)
130
-
131
- # 2) Send the instruction to the chat model
132
- ins, res = await branch.chat(
133
- instruction=instruct.instruction,
123
+ # Build contexts
124
+ chat_param = ChatParam(
134
125
  guidance=instruct.guidance,
135
126
  context=instruct.context,
136
- sender=sender,
137
- recipient=recipient,
138
- response_format=operative.request_type,
127
+ sender=sender or branch.user or "user",
128
+ recipient=recipient or branch.id,
129
+ response_format=final_response_format,
139
130
  progression=progression,
140
- imodel=chat_model, # or the override
131
+ tool_schemas=tool_schemas,
141
132
  images=images,
142
133
  image_detail=image_detail,
143
- tool_schemas=tool_schemas,
144
- return_ins_res_message=True,
134
+ plain_content=None,
145
135
  include_token_usage_to_model=include_token_usage_to_model,
146
- **kwargs,
136
+ imodel=chat_model,
137
+ imodel_kw=kwargs,
147
138
  )
148
- branch.msgs.add_message(instruction=ins)
149
- branch.msgs.add_message(assistant_response=res)
150
139
 
151
- # 3) Populate the operative with the raw response
152
- operative.response_str_dict = res.response
140
+ parse_param = None
141
+ if final_response_format and not skip_validation:
142
+ from ..parse.parse import get_default_call
153
143
 
154
- # 4) Possibly skip validation
155
- if skip_validation:
156
- return operative if return_operative else operative.response_str_dict
157
-
158
- # 5) Parse or validate the response into the operative's model
159
- response_model = operative.update_response_model(res.response)
160
- if not isinstance(response_model, BaseModel):
161
- # If the response isn't directly a model, attempt a parse
162
- response_model = await branch.parse(
163
- text=res.response,
164
- request_type=operative.request_type,
165
- max_retries=operative.max_retries,
144
+ parse_param = ParseParam(
145
+ response_format=final_response_format,
146
+ fuzzy_match_params=FuzzyMatchKeysParams(),
147
+ handle_validation="return_value",
148
+ alcall_params=get_default_call(),
149
+ imodel=parse_model,
150
+ imodel_kw={},
151
+ )
152
+
153
+ action_param = None
154
+ if invoke_actions and (instruct.actions or actions):
155
+ from ..act.act import _get_default_call_params
156
+
157
+ action_param = ActionParam(
158
+ action_call_params=call_params or _get_default_call_params(),
159
+ tools=tools,
160
+ strategy=action_strategy
161
+ or instruct.action_strategy
162
+ or "concurrent",
163
+ suppress_errors=True,
164
+ verbose_action=verbose_action,
165
+ )
166
+
167
+ return {
168
+ "instruction": instruct.instruction,
169
+ "chat_param": chat_param,
170
+ "parse_param": parse_param,
171
+ "action_param": action_param,
172
+ "handle_validation": handle_validation,
173
+ "invoke_actions": invoke_actions,
174
+ "skip_validation": skip_validation,
175
+ "clear_messages": clear_messages,
176
+ }
177
+
178
+
179
+ async def operate(
180
+ branch: "Branch",
181
+ instruction: JsonValue | Instruction,
182
+ chat_param: ChatParam,
183
+ action_param: ActionParam | None = None,
184
+ parse_param: ParseParam | None = None,
185
+ handle_validation: HandleValidation = "return_value",
186
+ invoke_actions: bool = True,
187
+ skip_validation: bool = False,
188
+ clear_messages: bool = False,
189
+ reason: bool = False,
190
+ field_models: list[FieldModel] | None = None,
191
+ ) -> BaseModel | dict | str | None:
192
+
193
+ # 1. communicate chat context building to avoid changing parameters
194
+ # Start with base chat param
195
+ _cctx = chat_param
196
+ _pctx = (
197
+ parse_param.with_updates(handle_validation="return_value")
198
+ if parse_param
199
+ else ParseParam(
200
+ response_format=chat_param.response_format,
201
+ imodel=branch.parse_model,
166
202
  handle_validation="return_value",
167
203
  )
168
- operative.response_model = operative.update_response_model(
169
- text=response_model
204
+ )
205
+
206
+ # Update tool schemas if needed
207
+ if tools := (action_param.tools or True) if action_param else None:
208
+ tool_schemas = branch.acts.get_tool_schema(tools=tools)
209
+ _cctx = _cctx.with_updates(tool_schemas=tool_schemas)
210
+
211
+ # Extract model class from response_format (can be class, instance, or dict)
212
+ model_class = None
213
+ if chat_param.response_format is not None:
214
+ if isinstance(chat_param.response_format, type) and issubclass(
215
+ chat_param.response_format, BaseModel
216
+ ):
217
+ model_class = chat_param.response_format
218
+ elif isinstance(chat_param.response_format, BaseModel):
219
+ model_class = type(chat_param.response_format)
220
+
221
+ def normalize_field_model(fms):
222
+ if not fms:
223
+ return []
224
+ if not isinstance(fms, list):
225
+ return [fms]
226
+ return fms
227
+
228
+ fms = normalize_field_model(field_models)
229
+ operative = None
230
+
231
+ if model_class:
232
+ from lionagi.protocols.operatives.step import Step
233
+
234
+ operative = Step.request_operative(
235
+ reason=reason,
236
+ actions=bool(action_param is not None),
237
+ base_type=model_class,
238
+ field_models=fms,
170
239
  )
240
+ # Update contexts with new response format
241
+ _cctx = _cctx.with_updates(response_format=operative.request_type)
242
+ _pctx = _pctx.with_updates(response_format=operative.request_type)
243
+ elif field_models:
244
+ dict_ = {}
245
+ for fm in fms:
246
+ if fm.name:
247
+ dict_[fm.name] = str(fm.annotated())
248
+ # Update contexts with dict format
249
+ _cctx = _cctx.with_updates(response_format=dict_)
250
+ _pctx = _pctx.with_updates(response_format=dict_)
251
+
252
+ from ..communicate.communicate import communicate
171
253
 
172
- # If we still fail to parse, handle according to user preference
173
- if not isinstance(response_model, BaseModel):
254
+ result = await communicate(
255
+ branch,
256
+ instruction,
257
+ _cctx,
258
+ _pctx,
259
+ clear_messages,
260
+ skip_validation=skip_validation,
261
+ request_fields=None,
262
+ )
263
+ if skip_validation:
264
+ return result
265
+ if model_class and not isinstance(result, model_class):
174
266
  match handle_validation:
175
267
  case "return_value":
176
- return response_model
268
+ return result
177
269
  case "return_none":
178
270
  return None
179
271
  case "raise":
180
272
  raise ValueError(
181
273
  "Failed to parse the LLM response into the requested format."
182
274
  )
183
-
184
- # 6) If no tool invocation is needed, return result or operative
185
275
  if not invoke_actions:
186
- return operative if return_operative else operative.response_model
276
+ return result
187
277
 
188
- # 7) If the model indicates an action is required, call the tools
189
- if (
190
- getattr(response_model, "action_required", None) is True
191
- and getattr(response_model, "action_requests", None) is not None
192
- ):
193
- action_strategy = (
194
- action_strategy or instruct.action_strategy or "concurrent"
195
- )
196
- action_response_models = await branch.act(
197
- response_model.action_requests,
198
- strategy=action_strategy,
199
- verbose_action=verbose_action,
200
- call_params=call_params,
201
- )
202
- # Possibly refine the operative with the tool outputs
203
- operative = Step.respond_operative(
204
- response_params=response_params,
205
- operative=operative,
206
- additional_data={"action_responses": action_response_models},
207
- **(response_param_kwargs or {}),
278
+ requests = (
279
+ getattr(result, "action_requests", None)
280
+ if model_class
281
+ else result.get("action_requests", None)
282
+ )
283
+
284
+ action_response_models = None
285
+ if action_param and requests is not None:
286
+ from ..act.act import act
287
+
288
+ action_response_models = await act(
289
+ branch,
290
+ requests,
291
+ action_param,
208
292
  )
209
293
 
210
- # Return final result or the full operative
211
- return operative if return_operative else operative.response_model
294
+ if not action_response_models:
295
+ return result
296
+
297
+ # Filter out None values from action responses
298
+ action_response_models = [
299
+ r for r in action_response_models if r is not None
300
+ ]
301
+
302
+ if not action_response_models: # All were None
303
+ return result
304
+
305
+ if not model_class: # Dict response
306
+ result.update({"action_responses": action_response_models})
307
+ return result
308
+
309
+ from lionagi.protocols.operatives.step import Step
310
+
311
+ operative.response_model = result
312
+ operative = Step.respond_operative(
313
+ operative=operative,
314
+ additional_data={"action_responses": action_response_models},
315
+ )
316
+ return operative.response_model
@@ -1,3 +1,2 @@
1
- # Copyright (c) 2023 - 2025, HaiyangLi <quantocean.li at gmail dot com>
2
- #
1
+ # Copyright (c) 2023-2025, HaiyangLi <quantocean.li at gmail dot com>
3
2
  # SPDX-License-Identifier: Apache-2.0