mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 09:01:06 +03:00
minor convert chat history to text empty array fix
This commit is contained in:
@@ -533,7 +533,7 @@ export const mapChatHistory = (options: ICommonObject): ChatMessageHistory => {
|
|||||||
* @param {IMessage[]} chatHistory
|
* @param {IMessage[]} chatHistory
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export const convertChatHistoryToText = (chatHistory: IMessage[]): string => {
|
export const convertChatHistoryToText = (chatHistory: IMessage[] = []): string => {
|
||||||
return chatHistory
|
return chatHistory
|
||||||
.map((chatMessage) => {
|
.map((chatMessage) => {
|
||||||
if (chatMessage.type === 'apiMessage') {
|
if (chatMessage.type === 'apiMessage') {
|
||||||
|
|||||||
Reference in New Issue
Block a user