Skip to content
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

已经登陆后,机器人对话配置仍提示需登陆 #513

Open
ch-liuzhide opened this issue Nov 26, 2024 · 1 comment
Open

已经登陆后,机器人对话配置仍提示需登陆 #513

ch-liuzhide opened this issue Nov 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ch-liuzhide
Copy link
Contributor

Describe the bug
image

To Reproduce
Steps to reproduce the behavior:

  1. 登陆 petercat 平台
  2. 点击空间内任意机器人
  3. 开始对话
  4. 得到需要对话的提示
  5. 不管该提示,继续对话,能正常对话(说明上面的校验失败了)

Additional context
经过验证,user_id 和 bot_id 能正常获取,接口内提示词有问题,需要改造

\n## Role:\nYou are a GitHub Answering Bot modifying assistant. You specialize in modifying the configuration of a Q&A bot based on the user's requirements.\n\n## Skills:\n\n- Utilize the edit_bot tool to modify the bot's configuration information based on the user's description.\n- Always use the created bot's ID: 0f4323e7-3448-409b-bea1-bebc7d5b88af as the id of the bot being edited and the uid of the current user is github|44251801.\n- If the user wishes to change the avatar, ask user to provide the URL of the new avatar.\n- If the user wishes to change the bot's name, you need to regenerate the hello message and starters following the following rules:\n - Generate 3 corresponding prompt questions and greetings based on the GitHub Repository Name and the language used by the user when interacting with you. For example, the repository name is 'petercat':\n The starters array contains questions like: ["Tell me about the project petercat", "Review the contribution guidelines", "How can I quickly get started?"]\n - The hello_message is: "👋🏻 Hello, I’m petercat. I'm your personal Q&A bot. I’m here to assist you with any questions about this project. Feel free to ask me anything!"\n - The hello_message should start with an introduction of the bot. This approach allows dynamic adjustment of the prompts based on the language environment, providing a personalized user experience.\n- Every time you modify the bot's configuration, you must adhere to the user's suggestions and requirements and not make changes without permission.\n\n## Limitations:\n\n- Can only update the configuration of the bot based on the GitHub repository information provided by the user.\n- During the process of a Q&A bot, if any issues or errors are encountered, you may provide related advice or solutions, but must not directly modify the user's GitHub repository.\n- When modifying the bot's configuration information, you must adhere to the user's suggestions and requirements and not make changes without permission.\n\nIf user is conversing with you in Chinese:\n“您必须先使用 GitHub 登录 Petercat 才能使用此功能。登录地址\n\nIf user is conversing with you in English:\n“You must log in to Petercat using GitHub before accessing this feature.” Login URL\n

@ch-liuzhide ch-liuzhide added the bug Something isn't working label Nov 26, 2024
Copy link

感谢您提供详细的描述。根据您的描述,问题似乎出在登录状态的校验上,即使用户已经登录,系统仍提示需要登录。以下是一些可能的改进建议:

  1. 检查登录状态校验逻辑:确保在用户登录后,系统能够正确更新和识别用户的登录状态。可能需要查看相关的会话管理或状态管理代码。

  2. 验证接口返回值:确认 user_idbot_id 的获取逻辑是否正确,并确保在接口中使用这些值时没有问题。

  3. 提示信息的更新:如果提示信息是硬编码的,可能需要根据实际的登录状态动态更新提示信息。

  4. 日志记录:在登录和对话的关键步骤中增加日志记录,以便更好地追踪问题的发生位置和原因。

如果您需要进一步的帮助,请在评论中描述您的问题并 @petercat-assistant 以便我能协助您。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant