MCPcopy
hub / github.com/OpenBMB/ChatDev / invoke

Method invoke

runtime/node/executor/agent_executor.py:319–337  ·  view source on GitHub ↗
(
            conversation: List[Message],
            *,
            tools: Optional[List[ToolSpec]] = None,
            **overrides: Any,
        )

Source from the content-addressed store, hash-verified

317 """Create a callable that other components can use to invoke the model."""
318
319 def invoke(
320 conversation: List[Message],
321 *,
322 tools: Optional[List[ToolSpec]] = None,
323 **overrides: Any,
324 ) -> Message:
325 call_options = dict(base_call_options)
326 call_options.update(overrides)
327 timeline = self._build_initial_timeline(conversation)
328 response = self._invoke_provider(
329 provider,
330 client,
331 conversation,
332 timeline,
333 call_options,
334 tools if tools is not None else default_tool_specs,
335 node,
336 )
337 return response.message
338
339 return invoke
340

Callers

nothing calls this directly

Calls 3

_invoke_providerMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected