-
Notifications
You must be signed in to change notification settings - Fork 194
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
Feature: make display chunks swithable #298
Conversation
frontend/src/i18n/ja/index.ts
Outdated
@@ -67,6 +68,8 @@ const translation = { | |||
sitemap: | |||
'サイトマップのURLを指定すると、そのサイトマップ内のサイトを自動的にスクレイピングして得られた情報がナレッジとして利用されます。', | |||
file: 'アップロードしたファイルがナレッジとして利用されます。', | |||
citeRetrievedContexts: | |||
'ユーザーの質問に答えるために取得したコンテキストを引用するかどうかを設定します。有効にすると、ユーザーは元のソースURLやファイルにアクセスできます。', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ON/OFF関係なくドキュメントを参考に回答を生成するので、「引用するかどうか」だと誤解を招きそうな表現です。
「引用情報として表示するかどうか」だといかがでしょうか?
@@ -45,11 +45,15 @@ def post_message(request: Request, chat_input: ChatInput): | |||
|
|||
|
|||
@router.post( | |||
"/conversation/related-documents", response_model=list[RelatedDocumentsOutput] | |||
"/conversation/related-documents", | |||
response_model=list[RelatedDocumentsOutput] | None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
レスポンスについて、フロントエンド側の型情報も修正をお願いします!
frontend/src/pages/BotEditPage.tsx
Outdated
<div className="mt-2"> | ||
<div className="font-semibold"> | ||
{t('bot.label.citeRetrievedContexts')} | ||
</div> | ||
<div className="text-sm text-aws-font-color/50"> | ||
{t('bot.help.knowledge.citeRetrievedContexts')} | ||
</div> | ||
<Toggle | ||
value={displayRetrievedChunks} | ||
onChange={setDisplayRetrievedChunks} | ||
/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Issue #, if available:
Closes #248
Description of changes:
GET related-documents
returns nullused_chunks
in the response ofGET /conversations/<conv-id>
will be nullBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.