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.7.tar.gz
(4.9 MB
view hashes)
Built Distribution
Close
Hashes for openai_kira-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a100a6f55921b5f948d623e2cae53d77cd37e2cb07db58d2be170d4dc1e0e26 |
|
MD5 | 8800c6f27ea5a1215457c90ebe2d6894 |
|
BLAKE2b-256 | 2bdf5b26f5e3dfa67aed87671d2b003788baa6e99c2c2e461bf8270725585305 |