AI_Hub_Discord Bot
1.0.0
部署您自己的多ai應用程序不和諧機器人。

/gpt
/gpt4
/img
[ChatGPT]:
/gpt:
+ <prompts [message]>
+ <api_key [OpenAI API Key]>
+ <model [System, User(Default), Assistant]>
+ <engine [gpt-3.5-turbo(Default), gpt-4, gpt-4-32k]> # GPT model
+ <top_p [0.0~1.0, https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p]>
+ <temperature [0.0~2.0, https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature]>
+ <presence_penalty [-2.0 ~ 2.0, https://platform.openai.com/docs/api-reference/completions/create#completions/create-presence_penalty]>
+ <frequency_penalty [-2.0 ~ 2.0, https://platform.openai.com/docs/api-reference/completions/create#completions/create-frequency_penalty]>
+ <reply_count [Defaults: 1, https://platform.openai.com/docs/api-reference/completions/create#completions/create-n]>
+ <rollback> [Rollback the conversation by n messages]
+ <reset> [Reset the conversation]
+ coming soon...
[Bing ChatGPT]:
/gpt4:
+ <prompts [message]>
+ <style [Creative, Balanced(Default), Precise]> # Conversation style
[Bard]:
/bard:
+ <prompts [message]>
+ <token [SESSION("__Secure-1PSID" cookie, https://github.com/acheong08/Bard#authentication)]>
[Bing Image Creator]:
/img:
+ <prompts [image description]>
+ <width> # Image width
+ <height> # Image height
+ <auth_cookies [_U cookie, https://github.com/acheong08/BingImageCreator#getting-authentication]>
[DALL·E]:
/dall:
+ <prompts [image description]>
+ <api_key [OpenAI API Key]>
+ <parameter [1~10, https://platform.openai.com/docs/api-reference/images/create#images/create-n]>
+ <size [256x256, 512x512, 1024x1024]>
[Command Description]:
/help
More...
免費計劃:每月使用$ 5.00,執行時間限制為500小時。 512MB的RAM,2個VCPU和1GB磁盤。
git clone https://github.com/Lin-Rexter/AI_Hub_Discord-Bot.git
2-1。重命名文件.env.example為.env
2-2。
# ## "OPENAI_API_KEY", "AUTH_COOKIE", "BARD_TOKEN", "CHATGPT_MODEL", "RESPONSE_STYLE": The value returned from the command will be used first. # Discord: # Discord Bot token # https://discord.com/developers/applications DISCORD_TOKEN = " " # Discord Administrator ID(Administrator ID to mention when an unexpected error occurred in executing the command) DISCORD_ADMIN_ID = " " # ChatGPT(Official)、 DALL·E: # [ChatGPT,DALL·E authentication](OpenAI API key) # https://platform.openai.com/account/api-keys OPENAI_API_KEY = " " # Default ChatGPT_Model(gpt-3.5-turbo, gpt-4, gpt-4-32k) CHATGPT_MODEL = " gpt-3.5-turbo " # Bing Image Creator: # Bing Image Creator authentication(_U cookie) # https://github.com/acheong08/BingImageCreator#getting-authentication # If you use cookies.json(Step 3), you do not need to set AUTH_COOKIE = " " # Google Bard: # Google Bard authentication[SESSION("__Secure-1PSID" cookie)] # https://github.com/acheong08/Bard#authentication BARD_TOKEN = " " # Bing ChatGPT: # Default Bing ChatGPT response style(creative, balanced, precise) RESPONSE_STYLE = " balanced " # Bing ChatGPT authentication(Paste cookies: https://github.com/acheong08/EdgeGPT#getting-authentication-required) BING_CHAT_COOKIES =
3-1。重命名文件cookies.example.json到cookies.json
3-2。將餅乾粘貼到cookies.json
3-1。編輯詩歌配置設置如果您喜歡在項目目錄中具有虛擬環境
poetry config virtualenvs.in-project true
3-2。安裝pyproject.toml中指定的依賴項
poetry install
3-3。激活虛擬環境
- 使用默認Python版本
poetry shell
- 如果要指定Python版本
poetry env use 3.9
3-4。運行機器人
- 如果您使用
poetry shellpython ./bot.py
- 如果您不使用
poetry shellpoetry run python ./bot.py
麻省理工學院