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) {
hasCitationData = true
citationDataToCreate.response = {
results: oldMessage.metadata.webSearch?.results,
results: oldMessage.metadata.webSearch,
source: WebSearchSource.WEBSEARCH
}
}

View File

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