(
payload: IPayload,
)
| 157 | `; |
| 158 | |
| 159 | export const createFirstMessage = ( |
| 160 | payload: IPayload, |
| 161 | ): string => { |
| 162 | const { timestamp, user } = payload; |
| 163 | |
| 164 | const firstMessagePrompt = user.personality?.first_message_prompt |
| 165 | ? `Always start the conversation following these instructions from the user: ${user.personality?.first_message_prompt}` |
| 166 | : "Say hello to the user"; |
| 167 | |
| 168 | return firstMessagePrompt; |
| 169 | }; |
| 170 | |
| 171 | export const createSystemPrompt = ( |
| 172 | chatHistory: IConversation[], |