feat: 修改调用逻辑

This commit is contained in:
王天骄
2026-06-24 11:11:11 +08:00
parent 92eba5adc8
commit 1076bc5838
29 changed files with 69 additions and 81 deletions
+2 -3
View File
@@ -32,7 +32,6 @@ const CLINICAL_BOOK_WORKFLOW_URL = import.meta.env.DEV
? '/dify/v1/workflows/run'
: 'http://8.160.178.88:8088/v1/workflows/run'
const CLINICAL_BOOK_WORKFLOW_API_KEY = 'app-9BapxGXgF2qQi9HHkq4R95Y7'
const CLINICAL_BOOK_WORKFLOW_TRIGGER = '临床思维训练书籍'
export async function createLearningAssistantSession(title?: string) {
const body = title?.trim()
@@ -67,7 +66,7 @@ export async function createLearningAssistantSession(title?: string) {
} as LearningAssistantSession
}
export async function runClinicalThinkingBooksWorkflow(signal?: AbortSignal) {
export async function runClinicalThinkingBooksWorkflow(input: string, signal?: AbortSignal) {
const response = await fetch(CLINICAL_BOOK_WORKFLOW_URL, {
method: 'POST',
headers: {
@@ -77,7 +76,7 @@ export async function runClinicalThinkingBooksWorkflow(signal?: AbortSignal) {
},
body: JSON.stringify({
inputs: {
input: CLINICAL_BOOK_WORKFLOW_TRIGGER
input
},
response_mode: 'blocking',
user: readWorkflowUserId()