feat: 修改调用逻辑
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user