microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.44k stars 6.56k forks source link

Enhancing AI Paste Functionality with Third-Party OpenAI API Support #34458

Closed Zawinzala closed 2 weeks ago

Zawinzala commented 2 months ago

Description of the new feature / enhancement

I would like to suggest an enhancement for the AI paste functionality. It would be more versatile if it could support third-party calls to the OpenAI API.

希望ai粘贴功能,能支持第三方调用的openai api 才能更通用。

Scenario when this would be used?

粘贴功能

Supporting information

保证非广告,就是粘贴一下我使用的这个第三方服务的逻辑方便参考和开发,其他的第三方转发的api也都大同小异:

接入与使用
平台内置的[聊天功能](https://api.bianxie.ai/chat)请按照ChatGPT Next Web设置,详见《[NextChat (ChatGPT Next Web)使用便携AI聚合API教程](https://bianxieai.com/nextchat-chatgpt-next-web-openai-api-tutorial.html)》。

软件/代码/插件接入使用便携AI聚合API需要两个数据:

BASE_URL:有的软件里也叫API URL或者OPENAI_API_BASE,都是一个意思,就是说你从这个链接调用服务;
API Key:就是令牌,以sk-开头的一长串字符。
1、BASE_URL是什么?

BASE_URL就是中转服务器地址,也就是你的请求是通过这个链接发送给中转服务器的。

便携AI聚合API有三个接入地址,一般推荐选择第一个或者第二个:

中转API调用地址①(中国香港服务器,直连线路,带宽大):https://api.bianxie.ai/
中转API调用地址②(国内上海服务器,带宽稍小):https://api.bianxieai.com/
中转API调用地址③(国外服务器,也可以直连,备用):https://api.a8.hk/
Okysu commented 2 months ago

I have a similar requirement, but I've found that they're using the Azure SDK, which only supports custom endpoints for Azure OpenAI.

我也有这样的需求,不过我发现,他们使用的是Azure的SDK,只支持Azure OpenAI的自定义Endpoint

crutkas commented 2 weeks ago

/dup #32960

microsoft-github-policy-service[bot] commented 2 weeks ago

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!