提交 441b545a authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 2a06bae8
......@@ -65,23 +65,23 @@ export function useAI(config) {
}
// DeepSeek
async function deepseek(data) {
const apiKey = 'sk-f1a6f0a7013241de8393cb2cb108e777'
const resp = await axios.post(
'/api/deepseek/chat/completions',
{
model: 'deepseek-chat',
messages: [{ role: 'user', content: data.content }],
},
{
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${apiKey}` },
}
)
if (resp.data) {
const [choice = {}] = resp.data.choices
messages.value.push({ role: 'assistant', content: choice.message.content.replaceAll('\n', '<br/>') })
}
}
// async function deepseek(data) {
// const apiKey = 'sk-f1a6f0a7013241de8393cb2cb108e777'
// const resp = await axios.post(
// '/api/deepseek/chat/completions',
// {
// model: 'deepseek-chat',
// messages: [{ role: 'user', content: data.content }],
// },
// {
// headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${apiKey}` },
// }
// )
// if (resp.data) {
// const [choice = {}] = resp.data.choices
// messages.value.push({ role: 'assistant', content: choice.message.content.replaceAll('\n', '<br/>') })
// }
// }
// 硅基流动
async function siliconflow(data) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论