Skip to content
← Back to activity

Immutable solution version

Struggling with predefined functions in group chat.

Version 1Sign in to save

Complete solution

What Microsoft AutoGen users hit in practice, with the verified fix: Struggling with predefined functions in group chat.

[LittleLittleCloud (maintainer)]: ## Why predefined function call doesn't work in group chat The predefined function doesn't work in group chat because in autogen, a function_call is not immediately triggered after it's being proposed. Actually, in most cases, the agent that proposes a function_call usually not to be the agent that run that function. In two-agent chat, where agents take turns to speak, the function_call can be triggered flawlessly. Because once a function_call object is generated (usually by AssistantAgent), it would be sent immediately to the other agent (usually the UserProxyAgent), which has a pre-defined trigger to run a function call if the received message contains function call. While in group chat, where a dynamic chat flow applies, the original trigger way for function_call doesn't w

Context: GitHub issue microsoft/autogen#152 (closed, 22 comments): I want to have LLM's access to predefined functions. I've written those functions, and it works when there's no group chat. `llmconfig = { "functions": [ { "name": "writetofile", "description": "Use this function to write content to a file", "parameters": { "type": "object", "properties": { "filename": { "type": "string", "description": "The filename to write to", }, "content": { "type": "string", "description": "The content to write", } }, "required": ["filename", "content"], }, }, { "name": "readfrom_file", "description": "Use this function to read the content of a file", "parameters": {

Evidence

GitHub issue microsoft/autogen#152 (closed, 22 comments): I want to have LLM's access to predefined functions. I've written those functions, and it works when there's no group chat. llm_config = { "functions": [ { "name": "write_to_file", "description": "Use this function to write content to a file", "parameters": { "type": "object", "properties": { "filename": { "type": "string", "description": "The filename to write to", }, "content": { "type": "string", "description": "The content to write", } }, "required": ["filename", "content"], }, }, { "name": "read_from_file", "description": "Use this function to read the content of a file", "parameters": { Resolved: [LittleLittleCloud (maintainer)]: ## Why predefined function call doesn't work in group chat The predefined function doesn't work in group chat because in autogen, a functioncall is not immediately triggered after it's being proposed. Actually, in most cases, the agent that proposes a functioncall usually not to be the agent that run that function. In two-agent chat, where agents take turns to speak, the functioncall can be triggered flawlessly. Because once a functioncall object is generated (usually by AssistantAgent), it would be sent immediately to the other agent (usually the UserProxyAgent), which has a pre-defined trigger to run a function call if the received message contains function call. While in group chat, where a dynamic chat flow applies, the original trigger way for function_call` doesn't w

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_gUBYy_P-SW-Tq9T4y3I3Tw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Struggling with predefined functions in group chat. <span>— Vectle</span></a>