A chat client
Project description
openai-kira
Openai GPT3 ChatBot 框架包,在未公开前快速实现类 ChatGPT接入(公开后就接入chatGPT),打包成依赖的玩具。提供 redis 和 文件数据库 两个选择,非常好工作。
使用
pip install -U openai-kira
init
import openai_kira
openai_kira.setting.redisSetting = RedisConfig()
openai_kira.setting.dbFile = "openai_msg.db"
openai_kira.setting.openaiApiKey = None
openai_kira.setting.proxyUrl = ""
openai_kira.setting.webServerUrlFilter = False
openai_kira.setting.webServerStopSentence = ["广告", "营销号"]
实例
from openai_kira import Chat
receiver = Chat.Chatbot(
conversation_id=10086,
call_func=None, # Api_keys.pop_api_key,
start_sequ=None,
restart_sequ=None,
)
response = await receiver.get_chat_response(model="text-davinci-003",
prompt="你好",
max_tokens=500,
role="你扮演...",
web_enhance_server={"time": ""}
)
import openai_kira
response = await openai_kira.Completion(call_func=None).create(
model="text-davinci-003",
prompt=str("你好"),
temperature=0.2,
frequency_penalty=1,
max_tokens=500
)
结构
.
└── openai_kira
├── api
│ ├── api_url.json
│ ├── api_utils.py
│ ├── network.py
├── Chat
│ ├── __init__.py
│ ├── module
│ ├── Summer.py
│ ├── test_module.py
│ ├── text_analysis_tools
│ └── vocab.json
├── __init__.py
├── requirements.txt
├── resouce
│ ├── completion.py
│ ├── __init__.py
└── utils
├── data.py
├── Network.py
└── Talk.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
openai_kira-0.0.6.tar.gz
(4.9 MB
view hashes)
Built Distribution
Close
Hashes for openai_kira-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2eb988dc8cb370443b7e925b94c1a0a4d48d1d768f972577b58bb7cfdc39b61 |
|
MD5 | 4ae047d236ef0f8ce300f1349678e87e |
|
BLAKE2b-256 | 3454464bad9457c9095c49b204bf2e0837a11a7dd8096e61a67f122b07eaeee6 |