appendChatMessage appends a non-user message to the batch insert params.
( params *database.InsertChatMessagesParams, msg chatMessage, )
| 4054 | |
| 4055 | // appendChatMessage appends a non-user message to the batch insert params. |
| 4056 | func appendChatMessage( |
| 4057 | params *database.InsertChatMessagesParams, |
| 4058 | msg chatMessage, |
| 4059 | ) { |
| 4060 | if msg.role == database.ChatMessageRoleUser { |
| 4061 | panic("developer error: use appendUserChatMessage for user-role messages") |
| 4062 | } |
| 4063 | appendMessageFields(params, msg, "") |
| 4064 | } |
| 4065 | |
| 4066 | // appendUserChatMessage inserts a user message with its apiKeyID preserved. |
| 4067 | func appendUserChatMessage( |
no test coverage detected