feat: 换一批注入用户画像,生成更贴合用户自身的示例问题
This commit is contained in:
@@ -38,6 +38,7 @@ import {
|
||||
DialogTrigger,
|
||||
} from '@/components/ui/dialog'
|
||||
import { api } from '@/lib/api'
|
||||
import { getPhone } from '@/lib/auth'
|
||||
import { cn } from '@/lib/utils'
|
||||
import type { AskResponse, EmotionMode, ExpertService, HistoryMessage, KnowledgeDoc, RiskCard, Scene, SessionMode } from '@/types'
|
||||
|
||||
@@ -544,11 +545,12 @@ export function ChatPanel({
|
||||
}, answers.length > 0 ? answers : undefined)
|
||||
}
|
||||
|
||||
/** AI 换一批示例问题 */
|
||||
/** AI 换一批示例问题(注入用户画像,个性化推荐) */
|
||||
const handleRefreshSamples = async () => {
|
||||
setRefreshing(true)
|
||||
try {
|
||||
const res = await api.generateSamples(scene, topic, dynamicSamples)
|
||||
const phone = getPhone() || undefined
|
||||
const res = await api.generateSamples(scene, topic, dynamicSamples, phone)
|
||||
setDynamicSamples(res.samples)
|
||||
} catch {
|
||||
toast.error('换一批失败,请稍后重试')
|
||||
|
||||
Reference in New Issue
Block a user