Skip to content

Fixed an issue where response_to_user is called #1083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

yileicn
Copy link
Collaborator

@yileicn yileicn commented Jun 27, 2025

User description

Fixed an issue where response_to_user is called when the user wants to end the conversation. It should call route_to_agent with converation_end as true


PR Type

Bug fix


Description

  • Fixed conversation routing logic for end conversation requests

  • Added explicit handling for conversation termination scenarios

  • Reordered instruction steps to prioritize conversation end detection


Changes walkthrough 📝

Relevant files
Bug fix
instruction.liquid
Add conversation end handling logic                                           

src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instructions/instruction.liquid

  • Added new step to handle conversation end requests by calling
    route_to_agent with conversation_end as true
  • Renumbered existing greeting handling step from 5 to 6
  • Modified instruction flow to prioritize conversation termination
    detection
  • +2/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • …o end the conversation. It should call route_to_agent with converation_end as true
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Logic Order

    The conversation end detection is placed after agent selection and argument extraction steps. This could lead to unnecessary processing before detecting that the user wants to end the conversation. Consider moving this check earlier in the flow.

    5. If user wants to end the conversation, call route_to_agent function with conversation_end as true.
    6. If user is greeting, you can call function response_to_user with a greeting message.

    Copy link

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @Oceania2018
    Copy link
    Member

    Add conversation_end to response_to_user

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants