请教一下gptel如何配置aliyun大模型API?

(gptel-make-openai "Aliyuncs"
    :host "dashscope.aliyuncs.com"                  ; host
    :endpoint "/compatible-mode/v1"
    :stream t                                 ; Enable streaming responses
    :key #'gptel-api-key-from-auth-source     ; Secure key retrieval (from .authinfo)
    :models '("qwen3.5-plus")
    )

按照官网的文档配置了,结果报错:

Querying Aliyuncs...
Aliyuncs error: (HTTP/2 404) Malformed JSON in response.
(gptel-make-openai "Aliyuncs"
    :host "dashscope.aliyuncs.com"                  ; host
    :endpoint "/compatible-mode/v1/chat/completions"
    :stream t                                 ; Enable streaming responses
    :key #'gptel-api-key-from-auth-source     ; Secure key retrieval (from .authinfo)
    :models '("qwen3.5-plus")
    )

1 个赞

我看了你的帖子也想试一下gptel,老哥能把gptel的配置贴一下吗,我折腾了一会好像各种问题。

我的 gptel 相关配置:Spikemacs/lisp/init-ai.el at 044ccd591ac3676b99acb306cddbd3379a2710a1 · Spike-Leung/Spikemacs · GitHub

它需要配置 authinfo:

gptel 配置可能困扰一些的就是怎么配置 authinfo,其他的其实 GitHub - karthink/gptel: A simple, extensible LLM client for Emacs · GitHub 里写的挺清楚了。

1 个赞

多谢老哥,参考了一下能把qwen的免费额度跑起来测试了

兄弟配过kimi coding plan的API么,这个我怎么都折腾不行

照理说和你配置阿里云的没啥区别,无非是 host,endpoint,key,model 这些调整一下,具体值去翻翻 Kimi 的文档。