feat(app): remove backend
This commit is contained in:
parent
8a24572cd2
commit
217736d05a
145 changed files with 3546 additions and 10516 deletions
9
src/lib/utils/formatHistory.ts
Normal file
9
src/lib/utils/formatHistory.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { BaseMessage } from '@langchain/core/messages';
|
||||
|
||||
const formatChatHistoryAsString = (history: BaseMessage[]) => {
|
||||
return history
|
||||
.map((message) => `${message._getType()}: ${message.content}`)
|
||||
.join('\n');
|
||||
};
|
||||
|
||||
export default formatChatHistoryAsString;
|
||||
Loading…
Add table
Add a link
Reference in a new issue