NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Feature Request] 如何调用讯飞和百度的deepseek模型

Open Noah-zero opened this issue 10 months ago • 6 comments

🥰 需求描述

目前讯飞deepseek的api是免费使用的,对比了一堆云之后发现百度的api是目前看下来最便宜的。所以想试着调用这两个平台的deepseek。

🧐 解决方案

想知道如何调用这两个平台的api

📝 补充信息

Image 这是目前参考#6204做的填的,但是失败了,显示 { "error": true, "message": "Failed to fetch" }

似乎是模型名的问题,但是不清楚模型名该怎么填

这是根据讯飞官方文档写的调用api的代码: def chat(self, message): # r1 self.add_message("user", message) model = "xdeepseekv3" try: response = self.client.chat.completions.create( model= model, messages= self.conversation_history, stream=True, temperature=0.7, max_tokens=4096, extra_headers={"lora_id": "0"},
stream_options={"include_usage": True} )

这是讯飞的接口信息:

Image

Noah-zero avatar Feb 19 '25 02:02 Noah-zero

Bot detected the issue body's language is not English, translate it automatically.


Title: [Feature Request] How to call iFlytek and Baidu's deepseek model

Issues-translate-bot avatar Feb 19 '25 02:02 Issues-translate-bot

同问,调用通义千问deepseek返回一样的提示

Kylewwb avatar Feb 20 '25 00:02 Kylewwb

Bot detected the issue body's language is not English, translate it automatically.


The same question is called Tongyi Qianwen deepseek to return the same prompt

Issues-translate-bot avatar Feb 20 '25 00:02 Issues-translate-bot

遇上同样的问题

ranoa2006 avatar Feb 21 '25 05:02 ranoa2006

Bot detected the issue body's language is not English, translate it automatically.


Encountered the same problem

Issues-translate-bot avatar Feb 21 '25 05:02 Issues-translate-bot

chrome 可以检查到你访问的具体 api url,目前感觉 url 的拼接有一些问题,你只需要自己修改一下代码的 constant.ts 文件中过加入对一个模型名称即可。

Image Image

我这里加入了火山引擎的 deepseek 模型,由于火山的endpoint较为工整,我只需要加入模型名称。

Image

Shadow-Alex avatar Mar 11 '25 17:03 Shadow-Alex