Coder Social home page Coder Social logo

llmkira / openaibot Goto Github PK

View Code? Open in Web Editor NEW
1.9K 19.0 224.0 18.22 MB

⚡️ Build Your Own chatgpt Bot|🧀 Discord/Slack/Kook/Telegram |⛓ ToolCall|🔖 Plugin Support | 🌻 out-of-box | gpt-4-turbo

Home Page: https://llmkira.github.io/Docs

License: Apache License 2.0

Python 99.46% Shell 0.35% Dockerfile 0.20%
openai gpt-3 assistant discordbot gpt-agent kook-bot slack-bot gpt-4-turbo gpt-4-vision-preview gpts

openaibot's People

Contributors

chitang233 avatar chiyuki0325 avatar e-sion avatar fossabot avatar frostleafchan avatar huige233 avatar itxcjm avatar lianzizhou avatar purofle avatar sider2vf avatar sparanoid avatar sudoskys avatar wpv-chan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openaibot's Issues

[Bug]运行时区问题

IMG_20221218_085738.jpg
在debian11环境下我先使用 timedatectl 检测系统时区为Asia/Shanghai
但python3运行仍然报错
但我使用 export TZ='Asia/Shanghai'修改时区后再执行 python3 main.py成功运行
Screenshot_2022-12-18-08-56-40-687_com.server.auditor.ssh.client.jpg

Error:'latin-1' codec can't encode characters in position 104-110: ordinal not in range(256)

完全按照README的操作来的

系统:Debian 11
架构:x86_64
python 3.9

启动添加 API KEY 和 白名单 正常
但是发送 /chat 后 log 报错

None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
Downloading: 100%|####################################################################| 1.04M/1.04M [00:00<00:00, 1.06MB/s]
Downloading: 100%|#######################################################################| 456k/456k [00:00<00:00, 594kB/s]
Downloading: 100%|####################################################################| 1.36M/1.36M [00:00<00:00, 1.43MB/s]
Downloading: 100%|#########################################################################| 665/665 [00:00<00:00, 638kB/s]
2022-12-14 11:06:05.318 | ERROR    | App.Event:load_response:180 - RUN:Api Error:'latin-1' codec can't encode characters in position 104-110: ordinal not in range(256)
Run time of job "BotRunner.run.<locals>.get_request_frequency (trigger: interval[0:00:04], next run at: 2022-12-14 11:05:47 EST)" was missed by 0:00:01.345064

chatGPT

后续会用真正的chatGPT替代语言推理 ,跟踪上下文

prompt截取时仅有对话中第二个字

与机器人对话,发现输出的内容基本一致且无意义。观察控制台输出,发现prompt后为发送消息的第二个字。不论输入何种语言均为这样。
image

雲端Danger.form似乎無法正常下載

python main.py

初始化失败 -> https://raw.githubusercontent.com/fwwdn/sensitive-stop-words/master/%E6%94%BF%E6%B2%BB%E7%B1%BB.txt
初始化失败 -> https://raw.githubusercontent.com/TelechaBot/AntiSpam/main/Danger.txt
初始化 -> Danger.form
Traceback (most recent call last):
File "main.py", line 7, in
from App.Controller import BotRunner
File "/home/tk/文档/Openaibot-main/App/Controller.py", line 16, in
from App import Event
File "/home/tk/文档/Openaibot-main/App/Event.py", line 40, in
ContentDfa = DFA(path="./Data/Danger.form")
File "/home/tk/文档/Openaibot-main/utils/Detect.py", line 60, in init
self.get_words()
File "/home/tk/文档/Openaibot-main/utils/Detect.py", line 64, in get_words
with open(self.path, 'r', encoding='utf-8-sig') as f:
FileNotFoundError: [Errno 2] No such file or directory: './Data/Danger.form'

在更新到最新版本后,多API管理出现了问题

使用 curl -LO https://raw.githubusercontent.com/sudoskys/Openaibot/main/setup.sh && sh setup.sh 执行更新并保留原配置后,再次启动机器人,已有的 API key 是正常的,但如果我执行 /add_api_key 以后,再使用 /see_api_key 查看 API key 列表,就会发现只剩下刚刚添加的 API key 了,查看 run.log 无报错,只有执行成功的日志,检查了 Openaibot\Config\api_keys.json ,也只有刚刚添加的 API key ,初步怀疑是 Event.py 的问题

运行python出错

2022-12-16 17:47:27.297 | ERROR | App.Event:private_Chat:347 - You can't write against a read only replica.

[lib]兼容 openai-python

接口一致,所以可以很方便地混用,除了 chatGPT 方案官方不支持。

请注意依赖兼容性。

[BUG] APIBOOM:completion length.

invalid_request_error:This model's maximum context length is 4097 tokens, however you requested 4113 tokens (1613 in your prompt; 2500 for the completion). Please reduce your prompt; or completion length.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.