add optional web search functionality with UI updates and backend integration
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import {parseSources} from "./chatMessageHelpers.js";
|
||||
|
||||
const VALID_PERSONA_TYPES = new Set(["assistant", "user"]);
|
||||
const VALID_MESSAGE_ROLES = new Set(["user", "bot", "assistant", "system"]);
|
||||
|
||||
@@ -83,6 +85,7 @@ function validateMessage(message, chatIndex, messageIndex, errors) {
|
||||
role: role === "assistant" ? "bot" : role,
|
||||
content,
|
||||
model_name: optionalText(message.model_name || message.modelName),
|
||||
...(message.sources ? {sources: parseSources(message.sources)} : {}),
|
||||
retryVariants,
|
||||
retryActiveIndex: Number.isInteger(Number(message.retryActiveIndex ?? message.retry_active_index))
|
||||
? Number(message.retryActiveIndex ?? message.retry_active_index)
|
||||
|
||||
Reference in New Issue
Block a user