Skip to content

Commit

Permalink
feat: change lingyiwangwu to qwen turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
real-jiakai committed Nov 19, 2024
1 parent af1aa22 commit ab31fcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/AISummary/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function AISummary({ contentMarkdown, params, tags }) {
aria-label="选择 AI 模型"
>
<option value="chatgpt">Gemini-1.5-Flash</option>
<option value="lingyiwangwu">Yi-Lightning</option>
<option value="qwen">Qwen-Turbo</option>
</select>
</div>

Expand Down
6 changes: 3 additions & 3 deletions pages/api/lingyiwangwu.js → pages/api/qwen.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import OpenAI from 'openai'

const openai = new OpenAI({
baseURL: process.env.LINGYIWANGWU_BASE_URL,
apiKey: process.env.LINGYIWANGWU_API_KEY
baseURL: process.env.DASHSCOPE_BASE_URL,
apiKey: process.env.DASHSCOPE_API_KEY
})

export default async function handler(req, res) {
Expand All @@ -17,7 +17,7 @@ export default async function handler(req, res) {

try {
const stream = await openai.chat.completions.create({
model: 'yi-lightning',
model: 'qwen-turbo-1101',
messages: [{ role: 'user', content: message }],
stream: true,
})
Expand Down

0 comments on commit ab31fcf

Please sign in to comment.