1 Star 0 Fork 0

橘子233 / 对话应用程序接口(.NET)

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

ChatAPI

API S/C for chating with AIs.

ChatAPI.CLI

Modules

GPT-6B-J

Files:

ChatAPI.CLI/modules/gpt-j-6b/chatapi-gpt-j-6b.py
ChatAPI.CLI/Server/GPTJWrapper.cs #WIP

chatapi-gpt-j-6b.py

Requirement
python -m pip install torch transformers
Quick Start

And running with:

python3 chatapi-gpt-j-6b.py

When you see:

[Info <time>]: Loaded.
[Info <time>]: Running...

That represents the prepare work has been done.

Now, you can send a request by save a file into the requests folder (will be craete at python work dictory):

echo 'I like oranges. How about you?' > requests/1.request #Filename must ends with ".request".

After the program finished work, the request file will be delete and a new file with extname ".back" which including the result of your request will be create:

cat requests/1.back
Exit Program

You can send Ctrl+C key as normal.

Or you can create a file named quit.flag into flags folder:

touch flags/quit.flag

If the program detects the flag file (the detect work is after generate text), the program will quit.

Get Status Info

Or you can create a file named status.flag into flags folder:

touch flags/status.flag

And you will get the status info:

cat flags/status.back

In fact, the Status value will always be running ( because the detect work is after generate text**).**

Reference

@misc{gpt-j,
  author = {Wang, Ben and Komatsuzaki, Aran},
  title = {{GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model}},
  howpublished = {\url{https://github.com/kingoflolz/mesh-transformer-jax}},
  year = 2021,
  month = May
}
Copyright 2023 Orange233 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

与AI模型对话的服务端和客户端。 展开 收起
C#
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/orange23333/ChatAPI.NET.git
git@gitee.com:orange23333/ChatAPI.NET.git
orange23333
ChatAPI.NET
对话应用程序接口(.NET)
main

搜索帮助