Skip to content

Use function_call to terminate a conversation #133

@LittleLittleCloud

Description

@LittleLittleCloud

We have a couple of users who are hitting an infinite loop(#108) when they start a chat between two agents or a group of chat.

The cause of the infinite loop is that we are using some hard-code rule to determine if a message contains terminate information, which is prone to bugs.

A more robust way is to use a terminate_conversation function call, which returns a hard-coded termination message instead of relying on LLM to generate that TERMINATE signal.
This terminate_conversation solution has two advantages

  • the TERMINATE message will be deterministic.
  • the TERMINATE signal won't be mixed with other content (because it's a funciton_call)

Any suggestion/feedback on creating an example of doing that? I can create an example for groupchat, would be great if someone can create example for twoagent chat.

Metadata

Metadata

Assignees

No one assigned

    Labels

    group chat/teamsgroup-chat-related issuestool-usagesuggestion and execution of function/tool call

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions