|
|
@ -2,6 +2,7 @@ import { getSystemConfig, fetchPost } from "@/system/config"; |
|
|
|
import { useAssistantStore } from '@/stores/assistant'; |
|
|
|
import { useModelStore } from "@/stores/model"; |
|
|
|
export async function askAi(question: any, action: string) { |
|
|
|
try { |
|
|
|
const assistantStore = useAssistantStore(); |
|
|
|
const modelStore = useModelStore(); |
|
|
|
const config = getSystemConfig(); |
|
|
@ -41,5 +42,9 @@ export async function askAi(question: any, action: string) { |
|
|
|
} |
|
|
|
const data = await complain.json() |
|
|
|
return data.choices[0].message.content |
|
|
|
} catch (error) { |
|
|
|
return '请求失败'+error |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |