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/continue to generate #401

Merged
merged 17 commits into from
Jun 27, 2024
Merged

Conversation

satoxiw
Copy link
Contributor

@satoxiw satoxiw commented Jun 25, 2024

Issue #, if available:

Description of changes:
#361 のPRで行った"続きを生成"機能をこちらのPRとして分割しました。#361はマージさせず、別途含めているファイル添付も機能を見直し別途PRさせていただきます。

本PRでは、#361で指摘いただいたコメントについて対応しています。下記に#361でいただいたコメントについての対応状況です。

@statefb さんにいただいたご指摘

別途slackでの議論の通りなのですが、空文字に意味を持たせたくないので、項目追加でお願いします!下記のようにChatInput (BE)と、PostMessageRequest (FE) に追加すればOKだと思います!

こちらいただいた対応方法に従って実装を修正しています。ただし、MessageContentcontentを空配列として渡してしまうとValidatorでエラーとなってしまうので、content.bodyに空文字を入力して送信するようにしています。(ただし、受け側の実装では空文字で判断はしていません)

https://github.com/aws-samples/bedrock-claude-chat/compare/v1...satoxiw:bedrock-claude-chat:feat/continue-to-generate?expand=1#diff-b3824293c8f669210fac6969ca83a8a56eb7490d6a1be0ad7f78ef934da1961fR515-R535

ストリーム処理の場合、backend.app.stream.pyのAnthropicStreamHandler、BedrockStreamHandlerの該当箇所を下記のように変更することで、保存前にtrimが可能です。

ご指摘通りの箇所でtrimするように実装修正しました。出力は問題なさそうでした。

https://github.com/aws-samples/bedrock-claude-chat/compare/v1...satoxiw:bedrock-claude-chat:feat/continue-to-generate?expand=1#diff-4ad0d81f00181ba7e06ecf54027552ade1db64bd3bcfd403e9c98d743bfa36e3R98

https://github.com/aws-samples/bedrock-claude-chat/compare/v1...satoxiw:bedrock-claude-chat:feat/continue-to-generate?expand=1#diff-4ad0d81f00181ba7e06ecf54027552ade1db64bd3bcfd403e9c98d743bfa36e3R137

非ストリーム処理で利用されるbackend.app.usecases.chat.pyのchat()では、reply_txtをstripする方針が綺麗にシンプルに実装できるかなと思いましたが、いかがでしょうか?

こちら、そもそも非ストリーム実装が全くできておりませんでした。この後実装追加します。

上記のコメント(continue_generateをinputに追加・保存前にtrim)を反映した場合、下記のようにシンプルになるかと思いましたが、いかがでしょうか?

こちらご指摘の修正でシンプルになりました。

https://github.com/aws-samples/bedrock-claude-chat/compare/v1...satoxiw:bedrock-claude-chat:feat/continue-to-generate?expand=1#diff-30a5880a3990bc0943cc7fb5748e0612709c07a190140ef49c1cf7cc16f99289R184-R186

@wadabee さんにいただたご指摘

Reactの慣習として、テンプレート部分で関数を実行しないので、修正をお願いします。
hooks側で関数を実行して、その実行結果をStateに設定する方法をよく使います。

useEffect hook内でgetShouldContinue()を呼び出すように修正してみました。もう少し良い修正があるのか判断できませんでしたので、改めて修正箇所確認いただければと思います。

https://github.com/aws-samples/bedrock-claude-chat/compare/v1...satoxiw:bedrock-claude-chat:feat/continue-to-generate?expand=1#diff-4f4332c2118277ddc90f75e9489ace8c6be3e9c60c88165e58063e8f25aa4734R100-R107

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@statefb statefb self-requested a review June 25, 2024 11:26
backend/app/routes/schemas/conversation.py Outdated Show resolved Hide resolved
frontend/src/@types/conversation.d.ts Show resolved Hide resolved
frontend/src/i18n/de/index.ts Show resolved Hide resolved
@statefb
Copy link
Contributor

statefb commented Jun 25, 2024

MessageContentのcontentを空配列として渡してしまうとValidatorでエラーとなってしまう

これ、ちなみにどこのバリデーションで引っかかってる感じでしょうか?

@satoxiw
Copy link
Contributor Author

satoxiw commented Jun 26, 2024

MessageContentのcontentを空配列として渡してしまうとValidatorでエラーとなってしまう

これ、ちなみにどこのバリデーションで引っかかってる感じでしょうか?

どこだったか改めて確認(contentを空にしてリクエスト)してみたのですが、遭遇したエラーになりませんでした。別のエラーと間違っていたようでしたので、生成を続ける時にはcontentを空にしてリクエストするように修正します

Comment on lines 340 to 348
{shouldContinue && (
<Button
className="bg-aws-paper p-2 text-sm"
outlined
disabled={disableContinue || props.disabled}
onClick={props.continueGenerate}>
<PiArrowFatLineRight className="mr-2" />
{t('button.continue')}
</Button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disableContinueの時は、ボタンを非表示にした方が良いと思います!
押せる時だけ表示されるボタンなので、押した瞬間に消えて、再度押せる条件が揃ったら出現する方が直感的かなと思いました。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下記のように修正してみました。意図通りの動作になっていると思いますがいかがでしょうか?

        {messages.length > 1 && (
          <div className="absolute -top-14 right-0 flex space-x-2">
            {shouldContinue && !disableContinue && !props.disabled && (
              <Button
                className="bg-aws-paper p-2 text-sm"
                outlined
                onClick={props.continueGenerate}>
                <PiArrowFatLineRight className="mr-2" />
                {t('button.continue')}
              </Button>
            )}
            <Button
              className="bg-aws-paper p-2 text-sm"
              outlined
              disabled={disabledRegenerate || props.disabled}
              onClick={props.onRegenerate}>
              <PiArrowsCounterClockwise className="mr-2" />
              {t('button.regenerate')}
            </Button>
          </div>
        )}

Copy link
Contributor

@wadabee wadabee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@statefb statefb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@statefb statefb merged commit b7c862f into aws-samples:v1 Jun 27, 2024
6 checks passed
@satoxiw satoxiw mentioned this pull request Jun 28, 2024
CharlieGreenman added a commit to RepublicServicesRepository/chat-rsg that referenced this pull request Sep 16, 2024
* fix: close browser after URL processing with Playwright (aws-samples#341) (aws-samples#346)

Co-authored-by: edamame8888 <edamame_8888@yahoo.co.jp>

* Localized generation params text (ja) (aws-samples#343)

* i18n ja (generation param)

* fix

* npm audit (aws-samples#348)

* fix (aws-samples#354)

* fix (aws-samples#355)

* fix css

* fix

* fix

* Feature: Conversation Quick Starter (aws-samples#356)

* add conversation quick start

* fix ci

* fix

* fix

* fix bugs

* fix

* docs: update README.md (aws-samples#363)

comapny -> company

* fix

* Fix publish API error (aws-samples#353)

* Fix publish API error

* Fix conversation not found in publish API caused by permission error

Grant permission for sqs consumer handler to read the secret

* skip CF logging in unsupported regions (aws-samples#367)

* CloudFront does not support standard log delivery in all regions
  * https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html#access-logs-choosing-s3-bucket

* add keyboard command and fix bug

* add ErrorBoundary

* fix ui

* Add agent for published api (aws-samples#373)

* add agent for published api

* format

* fix

* patch (aws-samples#376)

* fix bg-color and i18n en

* add ladle add Alert Stories

* fix

* fix (aws-samples#379)

* create shortcut key modal

* fix lint error

* Bump braces from 3.0.2 to 3.0.3 in /cdk (aws-samples#380)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Introduce poetry (aws-samples#381)

* add poetry

* wip

* fix ga workflow

* fix readme on backend

* fix notation for dev dependencies

* update lock

* downgrade tenacity

* fix (aws-samples#382)

* Bump urllib3 from 2.2.1 to 2.2.2 in /backend (aws-samples#383)

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.2.1...2.2.2)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add support for Sonnet 3.5 (aws-samples#387)

Co-authored-by: Gabriel Koo <gabriel.koo@macbook>

* styled fixed

* rm font-semibold

* fix question icon

* fix button send icon

* fix button send style

* add shift right

* fix

* imple the feature of attach text file

* remove unnecessary icon

* gix send button

* Update index.html (aws-samples#384)

* update

* fix (aws-samples#402)

* fix (aws-samples#407)

* Feat/continue to generate (aws-samples#401)

* imple the feature of continue to generate

* refactor code based on review

* refactor code

* refactor code

* fix lang resources

* fix lang resources

* fix lang resources

* fix test cases

* revert to non ja and en lang resource

* fixed based on review

* add comment for non-striming use

* revert to lang resource

* fixed strip handling of generated messages

* add continue to generate feature for published api

* Fixes to show/hide controls for continue generate button

* fixed button show/hide handling

* fixed button show/hide handling

* add pre-signed url permission (aws-samples#411)

* imple changes based on discussions

* imple changes based on discussions

* fixed for mypi checks

* update file extension determination

* fixed lint suggestion

* fix (aws-samples#414)

* fix

* create useIsWindows hooks

* fix en

* fix button

* rm browser

* button stories

* add button copy

* add stories

* add atoms

* npm audit fix

* fix style

* refactoring routes

* fix

* Changed logic for determining which text files can be attached

* dix dir name

* add meta for norobots (aws-samples#420)

LGTM!

* update componentize attachment icons

* remove unnecessary function definitions

* fixed lint suggestion

* update alert message transition

* update alert to useSnackbar

* update variable name

* fixed lint suggestion

* update cdk version (aws-samples#422)

* add skelton

* add slider

* add status sync bot

* add status sync bot

* SwitchBedrockModel

* add toggle

* add tooltip

* update

* fix

* early retrun

* fix

* fix

* fix

* create post streaming status

* fix (aws-samples#425)

* Bump urllib3 from 2.2.1 to 2.2.2 in /backend/embedding (aws-samples#419)

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.2.1...2.2.2)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: number of NAT gateways is customizable (aws-samples#426)

* NAT Gatewayの数をcdk.jsonでカスタマイズできるようにする

* テストケース修正

* インデント修正

* readme修正

* type修正。NATゲートウェイをNAT Gatewayに表記を統一

* Bump certifi from 2024.6.2 to 2024.7.4 in /backend/embedding (aws-samples#429)

Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.6.2 to 2024.7.4.
- [Commits](certifi/python-certifi@2024.06.02...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Supports multiple IDPs (aws-samples#404)

* Update index.html

* Supports multiple IDPs

* Bump certifi from 2024.6.2 to 2024.7.4 in /backend (aws-samples#431)

Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.6.2 to 2024.7.4.
- [Commits](certifi/python-certifi@2024.06.02...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Feat/ipv6 disabled (aws-samples#427)

* add ipv6 disable feature

* update error messages

* update document

* update document

* fixed issues based on review comments

* fix typo in deploy.yml (aws-samples#437)

* Feature: Use a Bedrock Knowledge Base as RAG source (Backend) (aws-samples#428)

* wip

* refactor: apply sfn to invoke ecs task

* wip

* wip

* fix

* fix fe

* fix poetry timoeut

* fix

* s3 validation

* lint

* omit instruction from kb

* lint

* Fix super-easy deployment script (aws-samples#442)

- Fix BuildSpec errors of CodeBuild
  - Escape double quotes properly.
  - Change type of `version` from string to number.
- Change argument name: `--region` to `--bedrock-region`

* Fix: Ensure full visibility of chat input on narrow screens

- Refactor main container to use flex column layout
Fixes aws-samples#445

* fix

* fix

* fix

* fix

* fix routes

* fix

* fix

* fix

* fix

* Add a command line argument `--version` to bin.sh (aws-samples#444)

* Add a command line argument `--version` to bin.sh
- Add a command line argument `--version` to bin.sh.
- Use the specified version as the tag name for git clone.

* Add guidance for super-easy deployment failures

* Reflect review comments for pull request aws-samples#444
- aws-samples#444 (comment)
- aws-samples#444 (comment)

* fix pb

* add (aws-samples#456)

* add (aws-samples#460)

* update(readme): update contributor highlights (aws-samples#462)

[Workflow Run]: https://github.com/aws-samples/bedrock-claude-chat/actions/runs/9990669915

------

*Automatically created by projen via the "upgrade-contributor-highlights" workflow*

Signed-off-by: github-actions <github-actions@github.com>
Co-authored-by: github-actions <github-actions@github.com>

* Fix: contributor highlight workflow (aws-samples#457)

* fix

* including sore when print top 20

* fix: git commit / pr

* comment out for workflow test

* fix: add base branch

* fix index

* fix

* remove test codes

* remove branch condition

* Refactoring with Bedrock Converse API (aws-samples#448)

* refactor

* fix

* chore: lint

* omit validation

* revert top k

* fix: topk

* fix topk diff

* fix: topk max

* lint

* fix (aws-samples#464)

* Allow `Admin` users to create / publish a customized bot (aws-samples#469)

* Add commit hook  (aws-samples#472)

* create lefthook.yml

* update doc

* fix mypy conf

* fix lefthook

* fix lefthook

* split sub

* fix hook

* fix

* remove test

* remove test

* Non-text document upload directly on chat window (aws-samples#467)

* add

* black format

* chore: lint

* chore: variable name consistency (AttachmentType)

* add checking not to excess 10MB which is api gateway response size limit

* merge v1

* chore: eslint deps ignore

* fix: size limit to 6MB

* change: image size

* chore: remove eslint-disabled-line

* fix: size check bug

* Fix: Screen transition occurs due to unintended key input

* Fix: Destination of screen transition by keyboard shortcut when using custom bot

* Refactor detection logic of keyboard shortcuts

* Fix: Focus moves due to unintentional keystrokes

* Move detection logic of 'focus chat input' keyboard shortcut from `Textarea` to `ChatPage`

* Add attribute to `BotSummary` to determine whether the bot using Bedrock KnowledgeBase (aws-samples#480)

* add

* lint

* Upgrade AWS Amplify to version 6
- aws-amplify 6.4.3
- @aws-amplify/ui-react 6.1.14

* Fixed eslint warning 'tailwindcss/enforces-shorthand'

* Bump fast-xml-parser and @aws-sdk/client-secrets-manager

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) to 4.4.1 and updates ancestor dependency [@aws-sdk/client-secrets-manager](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-secrets-manager). These dependencies need to be updated together.


Updates `fast-xml-parser` from 4.2.5 to 4.4.1
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](NaturalIntelligence/fast-xml-parser@v4.2.5...v4.4.1)

Updates `@aws-sdk/client-secrets-manager` from 3.576.0 to 3.623.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-secrets-manager/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.623.0/clients/client-secrets-manager)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
- dependency-name: "@aws-sdk/client-secrets-manager"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update AWS Amplify to version 6.4.4

* Add youtube overview video link to README (aws-samples#484)

* add

* fix

* embed

* fix

* Add Ladle stories
Added stories
- Helper
  - Shortcuts
- InputText
  - Text
  - URL
  - Date
  - Number
- ListItemBot
  - MyBots
  - RecentlyUsedSharedBots
  - ApiManagement
  - Analytics
- ModalDialog
  - AddApiKey
  - ClearConversations
  - DeleteApi
  - DeleteApiKey
  - DeleteBot
  - DeleteConversation
  - Feedback
  - InstructionsSamples
  - SelectLanguage
    - Performed refactoring
  - ShareBot
- PopoverMenu
  - ChatHeader
- Progress
- Select
  - Ideal
  - Clearable
- Textarea
  - Ideal
  - NoBorder

Fixed story name
- Skelton -> Skeleton
  - Indeal -> Ideal

* Refactor `ChatPage`, `ChatListDrawer` and related components
`useChat`
- Add `conversationError`
  - Move the error handling code to `ChatPage`
- Remove dependencies
  - `useNavigate`
  - `useTranslation`
  - `useSnackbar`

`ChatMessage`
- Move the action handling code to `ChatPage`
  - Submit feedback
- Move the code to get related documents to `ChatPage`
- Remove dependencies
  - `useChat`

`InputChatContent`
- Move the appearance control code to `ChatPage`
  - hasRegenerate / disabledRegenerate
  - hasContinue / disabledContinue
  - isLoading
- Remove dependencies
  - `useChat`

`TextInputChatContent`
- Move the appearance control code to `ChatPage`
  - hasRegenerate / disabledRegenerate
  - isLoading
- Remove dependencies
  - `useChat`

`ChatListDrawer`
- Move the action handling code to `AppContent`
  - Delete conversation
  - Update conversation title
- Move the appearance control code to `AppContent`
  - isAdmin
- Remove dependencies
  - `useNavigate`
  - `useUser`

`Menu`
- Move the action handling code to `AppContent`
  - Select language
  - Clear conversations
- Remove dependencies
  - `useNavigate`
  - `useConversation`

`AppContent`
- Accept the action handling code from `Menu` and `ChatListDrawer`
  - Select language
  - Clear conversations
  - Delete conversation
  - Update conversation title

`ChatPage`
- Accept the code to get related documents from `ChatMessage`
- Accept the appearance control code from `InputChatContent` and `TextInputChatContent`
- Accept the error handling code from `useChat`

Add Ladle stories
- Agent
  - InputChatContent
  - InputChatContentHasRegenerate
  - ProcessingIndicator
  - Tools
- ChatListDrawer (using msw: mock service wrapper)
  - Admin
  - NonAdmin
- ChatMessage
  - Conversation
- InputChatContent
  - Ideal
  - HasRegenerate
  - HasContinue

* Fix eslint warnings
ChatMessage.tsx
- react-hooks/exhaustive-deps

ListItemBot.stories.tsx
- tailwindcss/enforces-shorthand

* Fixed eslint errors
ChatListDrawer
- Unused eslint-disable directive

ChatMessage
- Unused eslint-disable directive

* Bump aiohttp from 3.9.5 to 3.10.2 in /backend/embedding (aws-samples#487)

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.5 to 3.10.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.9.5...v3.10.2)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Rename some properties of `InputChatContent`, `TextInputChatContent`
- hasRegenerate -> canRegenerate
- hasContinue -> canContinue

* Return error detail when streaming (aws-samples#489)

* add

* merge

* lint

* Exclude some folders when docker build (aws-samples#473)

* Exclude specific folders with exclude when creating a Docker image

* backendのreadmeにpoetryのinstallを追記

* excludeを共通化

* 不要な修正を削除

* constantsに移動

* Memorize related documents of messages in `ChatPage`.
- Add memorized `ChatMessage` as `ChatMessageWithRelatedDocuments`.

* Refactor `ChatListDrawer` and related components.
`ChatListDrawer`
- Move the code to get bots and conversations to `AppContent`
  - conversations
  - starredBots
  - recentlyUsedUnsterredBots
- Remove dependencies
  - `useConversation`
  - `useBot`

`AppContent`
- Accept the code to get bots and conversations from `ChatListDrawer`
  - conversations
  - starredBots
  - recentlyUsedUnsterredBots

* Bump nltk from 3.8.1 to 3.9 in /backend/embedding (aws-samples#495)

* Bump nltk from 3.8.1 to 3.9 in /backend/embedding

Bumps [nltk](https://github.com/nltk/nltk) from 3.8.1 to 3.9.
- [Changelog](https://github.com/nltk/nltk/blob/develop/ChangeLog)
- [Commits](nltk/nltk@3.8.1...3.9)

---
updated-dependencies:
- dependency-name: nltk
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump nltk from 3.9 to 3.9.1 in /backend/embedding

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yukinobu Mine <yukimine@amazon.co.jp>

* Bump axios from 1.7.3 to 1.7.4 in /frontend (aws-samples#496)

Bumps [axios](https://github.com/axios/axios) from 1.7.3 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.7.3...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Revert "Bump nltk from 3.8.1 to 3.9 in /backend/embedding (aws-samples#495)"

This reverts commit 9fddfc4.

* Fix: Pass the parent's message ID correctly to `trace_to_root()` function. (aws-samples#500)

- app.usecases.chat.chat()
- app.websocket.process_chat_input()

* upgrade unstructured version

* fix: fix error - 2 validation errors for HumanMessage content str type expected (aws-samples#498)

llm returns like this
```
content='SELECT "screenname", "screentype", "playertype", "clienttype", "screenversion", "deviceid", "pairingcode", "state", "osname", "fwver", "appver", "createdtime", "updatedtime", "description", "ipaddress", "subnet", "modelname", "organizationid", "placeid", "location", "playercapabilityversion", "rmcapabilityversion", "agenttype", "playingthumbnailid", "playingcontentid", "playingcontentname", "playingprogramid", "playingprogramname", "resolution", "standbymode", "hwduid", "securekey", "rm", "player"\nFROM public."dms_screen"\nWHERE "screenid" = \'5F-C5-A2-1E-C9-11\'\nLIMIT 10;' additional_kwargs={'usage': {'prompt_tokens': 410, 'completion_tokens': 209, 'total_tokens': 619}, 'stop_reason': 'end_turn', 'model_id': 'anthropic.claude-3-sonnet-20240229-v1:0'} response_metadata={'usage': {'prompt_tokens': 410, 'completion_tokens': 209, 'total_tokens': 619}, 'stop_reason': 'end_turn', 'model_id': 'anthropic.claude-3-sonnet-20240229-v1:0'} id='run-55883457-174d-4d18-a24c-86fc7848b94a-0' usage_metadata={'input_tokens': 410, 'output_tokens': 209, 'total_tokens': 619}
```

That's why following error occured.

```
ValidationError: 2 validation errors for HumanMessage content str type expected (type=type_error.str) content value is not a valid list (type=type_error.list)
```

So I added StrOutputParser() on the llm_chain, and it works

* embeddingコンテナにAmazonECSTaskExecutionRolePolicyのポリシーを追加 (aws-samples#501)

* Bump aws-cdk from 2.147.3 to 2.148.1 in /cdk (aws-samples#506)

Bumps [aws-cdk](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk) from 2.147.3 to 2.148.1.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits/v2.148.1/packages/aws-cdk)

---
updated-dependencies:
- dependency-name: aws-cdk
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump micromatch from 4.0.5 to 4.0.8 in /cdk

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/micromatch@4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* implement BotEditPageV2 with KB supported

* addressed review comments

* revert start and copy link actions to be enabled

* fix eslint warning

* fix build fail

* add kb id

* addressed review comments
- file name change from 'BotEditPageV2' to 'BotKbEditPage'
- add none option for opensearch analyzer
- fix cursor style for Slider disabled state
- send knowledgeBaseId when creation and editing a bot
- change s3 url placeholder value

* commit forgotten changes

* enhance Select component to display description

* add: migration guide

* addressed review comments
- modify resource for opensearch
- send null knowlegeBaseId
- fix hasBedrockKnowledgeBase type

* addressed review comments
- add VITE_APP_ENABLE_KB in .env.template

* fix doc

* fix doc link

* Fix "desciription" typo and automatically load agent tool name and description from language file. (aws-samples#514)

* Fix "desciription" typo
Modify formatDescription.ts so that when new tools are created and the name and description are defined in the language file it will automatically use the specified name and description

* Remove line in AGENT.md saying to update formatDescription.ts
Remove switch statement from formatDescription.ts

* Bump cryptography from 43.0.0 to 43.0.1 in /backend/embedding

Bumps [cryptography](https://github.com/pyca/cryptography) from 43.0.0 to 43.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@43.0.0...43.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump micromatch from 4.0.7 to 4.0.8 in /frontend

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/micromatch@4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Refactoring: Agent (aws-samples#513)

* refactor: tool

* wip: agent runner

* wip

* completed: agent class

* websocket

* fix

* change: status label

* wip: agent card

* inplemented: frontend

* fix frontend

* remove unused codes and modules

* update poetry lock

* crud thinking log (be)

* wip

* implemented

* reflect fb

* fix style and icon

* enclose card as agent message

* change: prop name as isAgentTHinking

* fix

* avoid re-rendering agent card when scroll

* use pydantic to convert to JSON Schema

* add knowledge tool

* update docs

* chore: lint

* chore: lint

* chore: lint

* fix style

---------

Co-authored-by: Yusuke Wada <wadaysk@amazon.co.jp>

* Bump path-to-regexp from 6.2.2 to 6.3.0 in /frontend (aws-samples#529)

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 6.2.2 to 6.3.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](pillarjs/path-to-regexp@v6.2.2...v6.3.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update to trigger build

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: github-actions <github-actions@github.com>
Co-authored-by: Takehiro Suzuki <tmgf.15.su@gmail.com>
Co-authored-by: edamame8888 <edamame_8888@yahoo.co.jp>
Co-authored-by: Yusuke Wada <52243855+wadabee@users.noreply.github.com>
Co-authored-by: 2814109 <2814109k@gmail.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: Kelvin Chan <50619735+khchan123@users.noreply.github.com>
Co-authored-by: Steve Keppeler <keppeler@amazon.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Koo <hi@gabrielkoo.com>
Co-authored-by: Gabriel Koo <gabriel.koo@macbook>
Co-authored-by: Satoshi Watanabe <watsatos@amazon.co.jp>
Co-authored-by: Taikono-Himazin <kazu@po.harenet.ne.jp>
Co-authored-by: Satoshi Watanabe <94025610+satoxiw@users.noreply.github.com>
Co-authored-by: Kγ0suKε <49641703+k70suK3-k06a7ash1@users.noreply.github.com>
Co-authored-by: fsatsuki <98732283+fsatsuki@users.noreply.github.com>
Co-authored-by: okamoto-aws <140481730+okamoto-aws@users.noreply.github.com>
Co-authored-by: Yukinobu Mine <14157373+Yukinobu-Mine@users.noreply.github.com>
Co-authored-by: mnmn0 <minamino@mobamasu.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Yukinobu Mine <yukimine@amazon.co.jp>
Co-authored-by: fsatsuki <fsatsuki@amazon.co.jp>
Co-authored-by: 윤창헌 <drskur@me.com>
Co-authored-by: Chikako Oyanagi <coyanagiaws@gmail.com>
Co-authored-by: Callum Tomkins <65548777+CallumCPP@users.noreply.github.com>
Co-authored-by: Yusuke Wada <wadaysk@amazon.co.jp>
Co-authored-by: Charlie Greenman <charlie.greenman1@gmail.com>
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.

3 participants