🪨 fix: Formatting Edge Case Handling for Bedrock Messages (#4016)

* refactor: Remove console.log statement in SelectDropDown component

* fix(bedrock): edge case - message.content as string creating message formatting issue
This commit is contained in:
Danny Avila 2024-09-12 06:06:22 -04:00 committed by GitHub
parent c3dc03b063
commit 9a393be012
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -142,6 +142,9 @@ const formatAgentMessages = (payload) => {
const messages = [];
for (const message of payload) {
if (typeof message.content === 'string') {
message.content = [{ type: ContentTypes.TEXT, [ContentTypes.TEXT]: message.content }];
}
if (message.role !== 'assistant') {
messages.push(formatMessage({ message, langChain: true }));
continue;

View file

@ -102,7 +102,6 @@ function SelectDropDown({
const hasSearchRender = searchRender != null;
const options = hasSearchRender ? filteredValues : availableValues;
console.log({ hasSearchRender, options });
const renderIcon = showOptionIcon && value != null && (value as OptionWithIcon).icon != null;
return (