You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importOpenAIfrom"openai";constopenai=newOpenAI();constcompletion=awaitopenai.chat.completions.create({model: "gpt-4o",store: true,messages: [{"role": "user","content": "write a haiku about ai"}]});
设备信息
请描述目前使用沙拉查词遇到什么不便
缺乏AI翻译,目前使用ai翻译已经非常常见了,最近DeepSeek大火。
理想情况下,沙拉查词应该怎么做
增加AI翻译选项,其实代码工作量很低,大部分的AI的api是兼容OpenAi API的格式的,只需要写一个就行了。
很多ai的网络请求代码都类似于这样:
只要能自定义请求api网址、密钥、模型id 就行了。剩下content就是划词填入的内容。
替代方案
沉浸式翻译插件已经支持多种ai翻译了。建议抄沉浸式翻译插件
额外信息
Overview - OpenAI API
DeepSeek API 文档
火山方舟-API 参考
The text was updated successfully, but these errors were encountered: