feat: Add generation info to messages
This commit introduces a new feature that displays generation information for each message in the chat. The generation info is displayed in a popover and includes details about the model used, the prompt, and other relevant information. This helps users understand how their messages were generated and troubleshoot any issues that may arise. The generation info is retrieved from the LLM response and is stored in the database alongside other message details. This commit also includes translations for the generation info label in all supported languages.
This commit is contained in:
@@ -33,6 +33,7 @@ type Message = {
|
||||
search?: WebSearch
|
||||
createdAt: number
|
||||
messageType?: string
|
||||
generationInfo?: any
|
||||
}
|
||||
|
||||
type Webshare = {
|
||||
@@ -254,7 +255,8 @@ export const saveMessage = async (
|
||||
images: string[],
|
||||
source?: any[],
|
||||
time?: number,
|
||||
message_type?: string
|
||||
message_type?: string,
|
||||
generationInfo?: any
|
||||
) => {
|
||||
const id = generateID()
|
||||
let createdAt = Date.now()
|
||||
@@ -270,7 +272,8 @@ export const saveMessage = async (
|
||||
images,
|
||||
createdAt,
|
||||
sources: source,
|
||||
messageType: message_type
|
||||
messageType: message_type,
|
||||
generationInfo: generationInfo
|
||||
}
|
||||
const db = new PageAssitDatabase()
|
||||
await db.addMessage(message)
|
||||
|
||||
Reference in New Issue
Block a user