novelai-bot icon indicating copy to clipboard operation
novelai-bot copied to clipboard

私服怎么搭建?

Open batvbs opened this issue 2 years ago • 4 comments

To expose an API endpoint of your app in these API docs, set the api_name parameter of the event listener. For more information, see the "API Page" section in the guides. To hide this API page, set show_api=False in the Blocks.launch() method.

See the "view api" link in footer of the app above? This is a page that documents the REST API that users can use to query the function. apps can also generate an API page, though the API has to be explicitly named for each event listener, such asInterfaceBlocks btn.click(add, [num1, num2], output, api_name="addition") This will document the endpoint to the automatically generated API page. /api/addition/ 很明显api需要自己设置,可我不清楚参数啊~

batvbs avatar Oct 14 '22 12:10 batvbs

在网上下载naifu的一键包,启动完成后会有个IP,一般是0.0.0.0:6969换成127.0.0.1:6969填写到你的插件里就行,示例截图: image

MXDexRazero avatar Oct 14 '22 14:10 MXDexRazero

在网上下载naifu的一键包,启动完成后会有个IP,一般是0.0.0.0:6969换成127.0.0.1:6969填写到你的插件里就行,示例截图: image

如果ai是放在外部服务器的,那就写外部服务器的IP地址

MXDexRazero avatar Oct 14 '22 14:10 MXDexRazero

在网上下载naifu的一键包,启动完成后会有个IP,一般是0.0.0.0:6969换成127.0.0.1:6969填写到你的插件里就行,示例截图:

如果ai是放在外部服务器的,那就写外部服务器的IP地址

不支持webui吗?

batvbs avatar Oct 17 '22 14:10 batvbs

There isn't common specifications of APIs for webui currently, so we have no idea how to support it. This PR is trying to add a usable API for webui but still in progress. If it finally got merged, it would not be difficult to add the corresponding support. webui 目前还没有通用的 API 规范,所以我们不知道如何支持它。 此 PR 正在尝试为 webui 添加一个可用的 API,但仍在进行中。 如果最终合并,那么添加相应的支持就不难了。

MaikoTan avatar Oct 17 '22 23:10 MaikoTan

Propose to close this PR and trace webui API support in #59 .

建议关闭此 PR 并在 #59 中跟踪 webui API 支持。

MaikoTan avatar Oct 19 '22 08:10 MaikoTan

确实可以关闭了,不过官网目前还需要一篇 naifu 搭建指南,你愿意来写吗?@MaikoTan


Generated by koishi-plugin-github.

shigma avatar Oct 19 '22 08:10 shigma

确实可以关闭了,不过官网目前还需要一篇 naifu 搭建指南,你愿意来写吗?@MaikoTan

Generated by koishi-plugin-github.

I haven't touch NAIFU for several days, and I have only built it on Linux successfully. Give me more time I can produce my 2 cents in next days. 好几天没碰NAIFU了,只在Linux上搭建成功。 给我更多的时间,我可以在接下来的几天里生产出我的 2 美分。

MaikoTan avatar Oct 19 '22 08:10 MaikoTan