fix: update webSearch type and results structure in upgrade logic (#5512)

This commit is contained in:
MyPrototypeWhat 2025-04-30 00:16:58 +08:00 committed by GitHub
parent 8fe44e1cd0
commit 37f09d3cb8
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,7 @@ export async function upgradeToV7(tx: Transaction): Promise<void> {
if (oldMessage.metadata?.webSearch) { if (oldMessage.metadata?.webSearch) {
hasCitationData = true hasCitationData = true
citationDataToCreate.response = { citationDataToCreate.response = {
results: oldMessage.metadata.webSearch?.results, results: oldMessage.metadata.webSearch,
source: WebSearchSource.WEBSEARCH source: WebSearchSource.WEBSEARCH
} }
} }

View File

@ -87,7 +87,7 @@ export type LegacyMessage = {
// Zhipu or Hunyuan // Zhipu or Hunyuan
webSearchInfo?: any[] webSearchInfo?: any[]
// Web search // Web search
webSearch?: WebSearchResponse webSearch?: WebSearchProviderResponse
// MCP Tools // MCP Tools
mcpTools?: MCPToolResponse[] mcpTools?: MCPToolResponse[]
// Generate Image // Generate Image