mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-28 05:11:24 +08:00
Fix anthropic request cannot handle webSearch and knowbase references (#7559)
修复 Anthropic 模型请求忽略了知识库和网络搜索引用内容的问题
This commit is contained in:
parent
3048d0850c
commit
1db93e8b56
@ -66,7 +66,7 @@ import {
|
||||
mcpToolCallResponseToAnthropicMessage,
|
||||
mcpToolsToAnthropicTools
|
||||
} from '@renderer/utils/mcp-tools'
|
||||
import { findFileBlocks, findImageBlocks, getMainTextContent } from '@renderer/utils/messageUtils/find'
|
||||
import { findFileBlocks, findImageBlocks } from '@renderer/utils/messageUtils/find'
|
||||
import { buildSystemPrompt } from '@renderer/utils/prompt'
|
||||
|
||||
import { BaseApiClient } from '../BaseApiClient'
|
||||
@ -192,7 +192,7 @@ export class AnthropicAPIClient extends BaseApiClient<
|
||||
const parts: MessageParam['content'] = [
|
||||
{
|
||||
type: 'text',
|
||||
text: getMainTextContent(message)
|
||||
text: await this.getMessageContent(message)
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ const ThinkingTimeSeconds = memo(
|
||||
)
|
||||
|
||||
const CollapseContainer = styled(Collapse)`
|
||||
margin-bottom: 15px;
|
||||
margin: 15px 0;
|
||||
`
|
||||
|
||||
const MessageTitleLabel = styled.div`
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
exports[`ThinkingBlock > basic rendering > should match snapshot 1`] = `
|
||||
.c0 {
|
||||
margin-bottom: 15px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.c1 {
|
||||
|
||||
@ -326,7 +326,7 @@ const PopoverContent = styled.div`
|
||||
`
|
||||
|
||||
const KnowledgePopoverContent = styled(PopoverContent)`
|
||||
max-width: 800px;
|
||||
max-width: 600px;
|
||||
`
|
||||
|
||||
const PopoverContentItem = styled.div`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user