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

feat: support showing markdown image #462

Merged
merged 1 commit into from
Dec 3, 2024
Merged

feat: support showing markdown image #462

merged 1 commit into from
Dec 3, 2024

Conversation

NingLu
Copy link
Collaborator

@NingLu NingLu commented Dec 3, 2024

Fixes #

🤖 AI-Generated PR Description (Powered by Amazon Bedrock)

Description

This pull request includes modifications to the prompt_utils.py file in the common_utils module, which handles the logic for generating prompts for the chatbot. Additionally, changes have been made to the ChatBot.tsx file in the portal/src/pages/chatbot directory, which is responsible for rendering the chatbot interface in the web application.

The main goal of these changes is to enhance the chatbot's ability to generate more relevant and contextual responses based on the user's input. The modifications in prompt_utils.py improve the prompt generation process by incorporating additional context and user-specific information. The updates in ChatBot.tsx ensure that the generated prompts are properly handled and displayed in the chatbot interface.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

File Stats Summary

File number involved in this PR: 2, unfold to see the details:

The file changes summary is as follows:

Files
Changes
Change Summary
source/portal/src/pages/chatbot/ChatBot.tsx 5 added, 5 removed The code change enables the display of AI-generated images within the chat messages by appending the image URLs to the message content.
source/lambda/online/common_logic/common_utils/prompt_utils.py 1 added, 0 removed 该代码更改添加了一条新的响应规则,要求在回答中保留并原样输出任何 Markdown 格式的图片,而不对其进行修改。此外,它还强调了回答应该简洁明了,如果问题与给定内容无关,则直接回答"根据内部知识库,找不到相关内容。"

@NingLu NingLu merged commit d831239 into dev Dec 3, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant