├── .gitbook └── assets │ ├── JRWY2}JTST9R]F3OY4EKT{2.png │ ├── WNGVV37)W{@W_MZIT60CPNC.png │ ├── image (1).png │ ├── image (10).png │ ├── image (11).png │ ├── image (12).png │ ├── image (13) (1).png │ ├── image (13).png │ ├── image (14).png │ ├── image (15).png │ ├── image (16).png │ ├── image (17).png │ ├── image (18).png │ ├── image (19).png │ ├── image (2).png │ ├── image (20).png │ ├── image (21).png │ ├── image (22).png │ ├── image (23) (1).png │ ├── image (23).png │ ├── image (24).png │ ├── image (25).png │ ├── image (26) (1).png │ ├── image (26).png │ ├── image (27).png │ ├── image (28).png │ ├── image (29) (1).png │ ├── image (29).png │ ├── image (3).png │ ├── image (30).png │ ├── image (31).png │ ├── image (32).png │ ├── image (33).png │ ├── image (34).png │ ├── image (35).png │ ├── image (36).png │ ├── image (37).png │ ├── image (38).png │ ├── image (39) (1).png │ ├── image (39).png │ ├── image (4).png │ ├── image (40).png │ ├── image (41) (1).png │ ├── image (41).png │ ├── image (42).png │ ├── image (43).png │ ├── image (44).png │ ├── image (45).png │ ├── image (46).png │ ├── image (47).png │ ├── image (48).png │ ├── image (49).png │ ├── image (5).png │ ├── image (50).png │ ├── image (51).png │ ├── image (52).png │ ├── image (53) (1).png │ ├── image (53).png │ ├── image (54).png │ ├── image (55).png │ ├── image (6) (1).png │ ├── image (6).png │ ├── image (7).png │ ├── image (8).png │ ├── image (9).png │ └── image.png ├── LICENSE ├── README.md ├── SUMMARY.md ├── bu-shu-jiao-cheng └── kuai-su-bu-shu-jiao-cheng │ ├── README.md │ ├── aidlux-bu-shu-jiao-cheng.md │ ├── linux-yi-jian-bu-shu-jiao-cheng.md │ ├── windows-kuai-su-bu-shu-jiao-cheng-gocqhttp-ban.md │ ├── windows-kuai-su-bu-shu-jiao-cheng.md │ └── wip-railway-bu-shu.md ├── chang-jian-wen-ti-jie-da ├── chatgpt-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md ├── gocqhttp-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md ├── ji-qi-ren-zai-shi-yong-guo-cheng-zhong-de-chang-jian-wen-ti.md ├── mirai-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md └── webui-chang-jian-wen-ti-jie-da.md ├── e-du-xi-tong-hei-bai-ming-dan.md ├── pei-zhi-wen-jian-jiao-cheng ├── ai-hua-tu.md ├── chu-fa-xing-shi-yu-zhi-ling.md ├── dui-jie-liao-tian-ping-tai │ ├── README.md │ ├── dui-jie-discord.md │ ├── dui-jie-ge-ren-wei-xin.md │ ├── dui-jie-mirai.md │ ├── dui-jie-onebot-gocqhttp.md │ ├── dui-jie-qi-ye-wei-xin.md │ └── dui-jie-telegram.md ├── hui-fu-nei-rong │ ├── README.md │ └── bai-du-yun-hui-fu-shen-he.md ├── jie-ru-ai-ping-tai │ ├── README.md │ ├── jie-ru-chatglm.md │ ├── jie-ru-claude.md │ ├── jie-ru-google-bard.md │ ├── jie-ru-new-bing-sydney.md │ ├── jie-ru-openai-de-chatgpt.md │ ├── jie-ru-poe.com.md │ ├── jie-ru-wen-xin-yi-yan.md │ └── jie-ru-xun-fei-xing-huo-da-mo-xing.md ├── wan-zheng-pei-zhi-wen-jian-yang-li.md ├── wen-zi-zhuan-tu-pian.md └── wen-zi-zhuan-yu-yin │ ├── README.md │ ├── azure-tts-yu-yin-jie-ru-jiao-cheng.md │ ├── edge-tts-yu-yin-jie-ru-jiao-cheng.md │ └── vits-yu-yin-jie-ru-jiao-cheng.md └── yu-she-xi-tong.md /.gitbook/assets/JRWY2}JTST9R]F3OY4EKT{2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/JRWY2}JTST9R]F3OY4EKT{2.png -------------------------------------------------------------------------------- /.gitbook/assets/WNGVV37)W{@W_MZIT60CPNC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/WNGVV37)W{@W_MZIT60CPNC.png -------------------------------------------------------------------------------- /.gitbook/assets/image (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (10).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (10).png -------------------------------------------------------------------------------- /.gitbook/assets/image (11).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (11).png -------------------------------------------------------------------------------- /.gitbook/assets/image (12).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (12).png -------------------------------------------------------------------------------- /.gitbook/assets/image (13) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (13) (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (13).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (13).png -------------------------------------------------------------------------------- /.gitbook/assets/image (14).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (14).png -------------------------------------------------------------------------------- /.gitbook/assets/image (15).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (15).png -------------------------------------------------------------------------------- /.gitbook/assets/image (16).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (16).png -------------------------------------------------------------------------------- /.gitbook/assets/image (17).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (17).png -------------------------------------------------------------------------------- /.gitbook/assets/image (18).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (18).png -------------------------------------------------------------------------------- /.gitbook/assets/image (19).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (19).png -------------------------------------------------------------------------------- /.gitbook/assets/image (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (2).png -------------------------------------------------------------------------------- /.gitbook/assets/image (20).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (20).png -------------------------------------------------------------------------------- /.gitbook/assets/image (21).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (21).png -------------------------------------------------------------------------------- /.gitbook/assets/image (22).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (22).png -------------------------------------------------------------------------------- /.gitbook/assets/image (23) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (23) (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (23).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (23).png -------------------------------------------------------------------------------- /.gitbook/assets/image (24).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (24).png -------------------------------------------------------------------------------- /.gitbook/assets/image (25).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (25).png -------------------------------------------------------------------------------- /.gitbook/assets/image (26) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (26) (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (26).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (26).png -------------------------------------------------------------------------------- /.gitbook/assets/image (27).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (27).png -------------------------------------------------------------------------------- /.gitbook/assets/image (28).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (28).png -------------------------------------------------------------------------------- /.gitbook/assets/image (29) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (29) (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (29).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (29).png -------------------------------------------------------------------------------- /.gitbook/assets/image (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (3).png -------------------------------------------------------------------------------- /.gitbook/assets/image (30).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (30).png -------------------------------------------------------------------------------- /.gitbook/assets/image (31).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (31).png -------------------------------------------------------------------------------- /.gitbook/assets/image (32).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (32).png -------------------------------------------------------------------------------- /.gitbook/assets/image (33).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (33).png -------------------------------------------------------------------------------- /.gitbook/assets/image (34).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (34).png -------------------------------------------------------------------------------- /.gitbook/assets/image (35).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (35).png -------------------------------------------------------------------------------- /.gitbook/assets/image (36).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (36).png -------------------------------------------------------------------------------- /.gitbook/assets/image (37).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (37).png -------------------------------------------------------------------------------- /.gitbook/assets/image (38).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (38).png -------------------------------------------------------------------------------- /.gitbook/assets/image (39) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (39) (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (39).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (39).png -------------------------------------------------------------------------------- /.gitbook/assets/image (4).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (4).png -------------------------------------------------------------------------------- /.gitbook/assets/image (40).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (40).png -------------------------------------------------------------------------------- /.gitbook/assets/image (41) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (41) (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (41).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (41).png -------------------------------------------------------------------------------- /.gitbook/assets/image (42).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (42).png -------------------------------------------------------------------------------- /.gitbook/assets/image (43).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (43).png -------------------------------------------------------------------------------- /.gitbook/assets/image (44).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (44).png -------------------------------------------------------------------------------- /.gitbook/assets/image (45).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (45).png -------------------------------------------------------------------------------- /.gitbook/assets/image (46).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (46).png -------------------------------------------------------------------------------- /.gitbook/assets/image (47).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (47).png -------------------------------------------------------------------------------- /.gitbook/assets/image (48).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (48).png -------------------------------------------------------------------------------- /.gitbook/assets/image (49).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (49).png -------------------------------------------------------------------------------- /.gitbook/assets/image (5).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (5).png -------------------------------------------------------------------------------- /.gitbook/assets/image (50).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (50).png -------------------------------------------------------------------------------- /.gitbook/assets/image (51).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (51).png -------------------------------------------------------------------------------- /.gitbook/assets/image (52).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (52).png -------------------------------------------------------------------------------- /.gitbook/assets/image (53) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (53) (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (53).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (53).png -------------------------------------------------------------------------------- /.gitbook/assets/image (54).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (54).png -------------------------------------------------------------------------------- /.gitbook/assets/image (55).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (55).png -------------------------------------------------------------------------------- /.gitbook/assets/image (6) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (6) (1).png -------------------------------------------------------------------------------- /.gitbook/assets/image (6).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (6).png -------------------------------------------------------------------------------- /.gitbook/assets/image (7).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (7).png -------------------------------------------------------------------------------- /.gitbook/assets/image (8).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (8).png -------------------------------------------------------------------------------- /.gitbook/assets/image (9).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image (9).png -------------------------------------------------------------------------------- /.gitbook/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lss233/chatgpt-for-bot-docs/28daa369775949014c60b9986c0f586d135034bd/.gitbook/assets/image.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | 69 | Section 1 -- Definitions. 70 | 71 | a. Adapted Material means material subject to Copyright and Similar 72 | Rights that is derived from or based upon the Licensed Material 73 | and in which the Licensed Material is translated, altered, 74 | arranged, transformed, or otherwise modified in a manner requiring 75 | permission under the Copyright and Similar Rights held by the 76 | Licensor. For purposes of this Public License, where the Licensed 77 | Material is a musical work, performance, or sound recording, 78 | Adapted Material is always produced where the Licensed Material is 79 | synched in timed relation with a moving image. 80 | 81 | b. Adapter's License means the license You apply to Your Copyright 82 | and Similar Rights in Your contributions to Adapted Material in 83 | accordance with the terms and conditions of this Public License. 84 | 85 | c. Copyright and Similar Rights means copyright and/or similar rights 86 | closely related to copyright including, without limitation, 87 | performance, broadcast, sound recording, and Sui Generis Database 88 | Rights, without regard to how the rights are labeled or 89 | categorized. For purposes of this Public License, the rights 90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 91 | Rights. 92 | 93 | d. Effective Technological Measures means those measures that, in the 94 | absence of proper authority, may not be circumvented under laws 95 | fulfilling obligations under Article 11 of the WIPO Copyright 96 | Treaty adopted on December 20, 1996, and/or similar international 97 | agreements. 98 | 99 | e. Exceptions and Limitations means fair use, fair dealing, and/or 100 | any other exception or limitation to Copyright and Similar Rights 101 | that applies to Your use of the Licensed Material. 102 | 103 | f. Licensed Material means the artistic or literary work, database, 104 | or other material to which the Licensor applied this Public 105 | License. 106 | 107 | g. Licensed Rights means the rights granted to You subject to the 108 | terms and conditions of this Public License, which are limited to 109 | all Copyright and Similar Rights that apply to Your use of the 110 | Licensed Material and that the Licensor has authority to license. 111 | 112 | h. Licensor means the individual(s) or entity(ies) granting rights 113 | under this Public License. 114 | 115 | i. Share means to provide material to the public by any means or 116 | process that requires permission under the Licensed Rights, such 117 | as reproduction, public display, public performance, distribution, 118 | dissemination, communication, or importation, and to make material 119 | available to the public including in ways that members of the 120 | public may access the material from a place and at a time 121 | individually chosen by them. 122 | 123 | j. Sui Generis Database Rights means rights other than copyright 124 | resulting from Directive 96/9/EC of the European Parliament and of 125 | the Council of 11 March 1996 on the legal protection of databases, 126 | as amended and/or succeeded, as well as other essentially 127 | equivalent rights anywhere in the world. 128 | 129 | k. You means the individual or entity exercising the Licensed Rights 130 | under this Public License. Your has a corresponding meaning. 131 | 132 | 133 | Section 2 -- Scope. 134 | 135 | a. License grant. 136 | 137 | 1. Subject to the terms and conditions of this Public License, 138 | the Licensor hereby grants You a worldwide, royalty-free, 139 | non-sublicensable, non-exclusive, irrevocable license to 140 | exercise the Licensed Rights in the Licensed Material to: 141 | 142 | a. reproduce and Share the Licensed Material, in whole or 143 | in part; and 144 | 145 | b. produce, reproduce, and Share Adapted Material. 146 | 147 | 2. Exceptions and Limitations. For the avoidance of doubt, where 148 | Exceptions and Limitations apply to Your use, this Public 149 | License does not apply, and You do not need to comply with 150 | its terms and conditions. 151 | 152 | 3. Term. The term of this Public License is specified in Section 153 | 6(a). 154 | 155 | 4. Media and formats; technical modifications allowed. The 156 | Licensor authorizes You to exercise the Licensed Rights in 157 | all media and formats whether now known or hereafter created, 158 | and to make technical modifications necessary to do so. The 159 | Licensor waives and/or agrees not to assert any right or 160 | authority to forbid You from making technical modifications 161 | necessary to exercise the Licensed Rights, including 162 | technical modifications necessary to circumvent Effective 163 | Technological Measures. For purposes of this Public License, 164 | simply making modifications authorized by this Section 2(a) 165 | (4) never produces Adapted Material. 166 | 167 | 5. Downstream recipients. 168 | 169 | a. Offer from the Licensor -- Licensed Material. Every 170 | recipient of the Licensed Material automatically 171 | receives an offer from the Licensor to exercise the 172 | Licensed Rights under the terms and conditions of this 173 | Public License. 174 | 175 | b. No downstream restrictions. You may not offer or impose 176 | any additional or different terms or conditions on, or 177 | apply any Effective Technological Measures to, the 178 | Licensed Material if doing so restricts exercise of the 179 | Licensed Rights by any recipient of the Licensed 180 | Material. 181 | 182 | 6. No endorsement. Nothing in this Public License constitutes or 183 | may be construed as permission to assert or imply that You 184 | are, or that Your use of the Licensed Material is, connected 185 | with, or sponsored, endorsed, or granted official status by, 186 | the Licensor or others designated to receive attribution as 187 | provided in Section 3(a)(1)(A)(i). 188 | 189 | b. Other rights. 190 | 191 | 1. Moral rights, such as the right of integrity, are not 192 | licensed under this Public License, nor are publicity, 193 | privacy, and/or other similar personality rights; however, to 194 | the extent possible, the Licensor waives and/or agrees not to 195 | assert any such rights held by the Licensor to the limited 196 | extent necessary to allow You to exercise the Licensed 197 | Rights, but not otherwise. 198 | 199 | 2. Patent and trademark rights are not licensed under this 200 | Public License. 201 | 202 | 3. To the extent possible, the Licensor waives any right to 203 | collect royalties from You for the exercise of the Licensed 204 | Rights, whether directly or through a collecting society 205 | under any voluntary or waivable statutory or compulsory 206 | licensing scheme. In all other cases the Licensor expressly 207 | reserves any right to collect such royalties. 208 | 209 | 210 | Section 3 -- License Conditions. 211 | 212 | Your exercise of the Licensed Rights is expressly made subject to the 213 | following conditions. 214 | 215 | a. Attribution. 216 | 217 | 1. If You Share the Licensed Material (including in modified 218 | form), You must: 219 | 220 | a. retain the following if it is supplied by the Licensor 221 | with the Licensed Material: 222 | 223 | i. identification of the creator(s) of the Licensed 224 | Material and any others designated to receive 225 | attribution, in any reasonable manner requested by 226 | the Licensor (including by pseudonym if 227 | designated); 228 | 229 | ii. a copyright notice; 230 | 231 | iii. a notice that refers to this Public License; 232 | 233 | iv. a notice that refers to the disclaimer of 234 | warranties; 235 | 236 | v. a URI or hyperlink to the Licensed Material to the 237 | extent reasonably practicable; 238 | 239 | b. indicate if You modified the Licensed Material and 240 | retain an indication of any previous modifications; and 241 | 242 | c. indicate the Licensed Material is licensed under this 243 | Public License, and include the text of, or the URI or 244 | hyperlink to, this Public License. 245 | 246 | 2. You may satisfy the conditions in Section 3(a)(1) in any 247 | reasonable manner based on the medium, means, and context in 248 | which You Share the Licensed Material. For example, it may be 249 | reasonable to satisfy the conditions by providing a URI or 250 | hyperlink to a resource that includes the required 251 | information. 252 | 253 | 3. If requested by the Licensor, You must remove any of the 254 | information required by Section 3(a)(1)(A) to the extent 255 | reasonably practicable. 256 | 257 | 4. If You Share Adapted Material You produce, the Adapter's 258 | License You apply must not prevent recipients of the Adapted 259 | Material from complying with this Public License. 260 | 261 | 262 | Section 4 -- Sui Generis Database Rights. 263 | 264 | Where the Licensed Rights include Sui Generis Database Rights that 265 | apply to Your use of the Licensed Material: 266 | 267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 268 | to extract, reuse, reproduce, and Share all or a substantial 269 | portion of the contents of the database; 270 | 271 | b. if You include all or a substantial portion of the database 272 | contents in a database in which You have Sui Generis Database 273 | Rights, then the database in which You have Sui Generis Database 274 | Rights (but not its individual contents) is Adapted Material; and 275 | 276 | c. You must comply with the conditions in Section 3(a) if You Share 277 | all or a substantial portion of the contents of the database. 278 | 279 | For the avoidance of doubt, this Section 4 supplements and does not 280 | replace Your obligations under this Public License where the Licensed 281 | Rights include other Copyright and Similar Rights. 282 | 283 | 284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 285 | 286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 296 | 297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 306 | 307 | c. The disclaimer of warranties and limitation of liability provided 308 | above shall be interpreted in a manner that, to the extent 309 | possible, most closely approximates an absolute disclaimer and 310 | waiver of all liability. 311 | 312 | 313 | Section 6 -- Term and Termination. 314 | 315 | a. This Public License applies for the term of the Copyright and 316 | Similar Rights licensed here. However, if You fail to comply with 317 | this Public License, then Your rights under this Public License 318 | terminate automatically. 319 | 320 | b. Where Your right to use the Licensed Material has terminated under 321 | Section 6(a), it reinstates: 322 | 323 | 1. automatically as of the date the violation is cured, provided 324 | it is cured within 30 days of Your discovery of the 325 | violation; or 326 | 327 | 2. upon express reinstatement by the Licensor. 328 | 329 | For the avoidance of doubt, this Section 6(b) does not affect any 330 | right the Licensor may have to seek remedies for Your violations 331 | of this Public License. 332 | 333 | c. For the avoidance of doubt, the Licensor may also offer the 334 | Licensed Material under separate terms or conditions or stop 335 | distributing the Licensed Material at any time; however, doing so 336 | will not terminate this Public License. 337 | 338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 339 | License. 340 | 341 | 342 | Section 7 -- Other Terms and Conditions. 343 | 344 | a. The Licensor shall not be bound by any additional or different 345 | terms or conditions communicated by You unless expressly agreed. 346 | 347 | b. Any arrangements, understandings, or agreements regarding the 348 | Licensed Material not stated herein are separate from and 349 | independent of the terms and conditions of this Public License. 350 | 351 | 352 | Section 8 -- Interpretation. 353 | 354 | a. For the avoidance of doubt, this Public License does not, and 355 | shall not be interpreted to, reduce, limit, restrict, or impose 356 | conditions on any use of the Licensed Material that could lawfully 357 | be made without permission under this Public License. 358 | 359 | b. To the extent possible, if any provision of this Public License is 360 | deemed unenforceable, it shall be automatically reformed to the 361 | minimum extent necessary to make it enforceable. If the provision 362 | cannot be reformed, it shall be severed from this Public License 363 | without affecting the enforceability of the remaining terms and 364 | conditions. 365 | 366 | c. No term or condition of this Public License will be waived and no 367 | failure to comply consented to unless expressly agreed to by the 368 | Licensor. 369 | 370 | d. Nothing in this Public License constitutes or may be interpreted 371 | as a limitation upon, or waiver of, any privileges and immunities 372 | that apply to the Licensor or You, including from the legal 373 | processes of any jurisdiction or authority. 374 | 375 | 376 | ======================================================================= 377 | 378 | Creative Commons is not a party to its public 379 | licenses. Notwithstanding, Creative Commons may elect to apply one of 380 | its public licenses to material it publishes and in those instances 381 | will be considered the “Licensor.” The text of the Creative Commons 382 | public licenses is dedicated to the public domain under the CC0 Public 383 | Domain Dedication. Except for the limited purpose of indicating that 384 | material is shared under a Creative Commons public license or as 385 | otherwise permitted by the Creative Commons policies published at 386 | creativecommons.org/policies, Creative Commons does not authorize the 387 | use of the trademark "Creative Commons" or any other trademark or logo 388 | of Creative Commons without its prior written consent including, 389 | without limitation, in connection with any unauthorized modifications 390 | to any of its public licenses or any other arrangements, 391 | understandings, or agreements concerning use of licensed material. For 392 | the avoidance of doubt, this paragraph does not form part of the 393 | public licenses. 394 | 395 | Creative Commons may be contacted at creativecommons.org. 396 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 👋 ChatGPT for Bot 使用文档 2 | 3 | ## **V3 版本文档编写中** 4 | 5 | 当前正在浏览的是 V2 版本的使用文档, V3 版本的文档正在编写中。 6 | 7 | ## Overview 8 | 9 | ChatGPT for Bot 是一个支持多平台、多语言模型的聊天机器人项目。 10 | 11 | 它可以让你在聊天平台上对接语言模型,实现和语言模型的直接对话。 12 | 13 | ## 14 | 15 |
16 | 17 | ## 快捷链接 18 | 19 | {% content-ref url="bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/" %} 20 | [kuai-su-bu-shu-jiao-cheng](bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/) 21 | {% endcontent-ref %} 22 | 23 | {% embed url="https://github.com/lss233/chatgpt-mirai-qq-bot/wiki/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E5%88%97%E8%A1%A8" %} 24 | 25 | ## 开始使用 26 | 27 | 我们建议您按照菜单顺序自上而下阅读项目文档。 28 | 29 | ## 帮助我们完善文档 30 | 31 | 我们的文档在 GitHub 开源,你可以从这个地址访问: 32 | 33 | {% embed url="https://github.com/lss233/chatgpt-for-bot-docs" %} 34 | 35 | 本文档基于 CC-BY 4.0 协议开源。 36 | -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Table of contents 2 | 3 | * [👋 ChatGPT for Bot 使用文档](README.md) 4 | 5 | ## 💿 部署教程 6 | 7 | * [💡 快速部署教程](bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/README.md) 8 | * [Windows 快速部署教程(go-cqhttp版)](bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/windows-kuai-su-bu-shu-jiao-cheng-gocqhttp-ban.md) 9 | * [Windows 快速部署教程 (Mirai 版)](bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/windows-kuai-su-bu-shu-jiao-cheng.md) 10 | * [Linux 一键部署教程](bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/linux-yi-jian-bu-shu-jiao-cheng.md) 11 | * [PaaS 平台部署(Railway)](bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/wip-railway-bu-shu.md) 12 | 13 | ## 配置文件教程 14 | 15 | * [📰 完整配置文件样例](pei-zhi-wen-jian-jiao-cheng/wan-zheng-pei-zhi-wen-jian-yang-li.md) 16 | * [📪 对接聊天平台](pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/README.md) 17 | * [🦠 对接 Mirai](pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-mirai.md) 18 | * [🙇 对接 OneBot (go-cqhttp)](pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-onebot-gocqhttp.md) 19 | * [🛫 对接 Telegram](pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-telegram.md) 20 | * [🎧 对接 Discord](pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-discord.md) 21 | * [🧑‍🍳 🧑🍳 对接企业微信](pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-qi-ye-wei-xin.md) 22 | * [😁 对接个人微信](pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-ge-ren-wei-xin.md) 23 | * [📎 接入 AI 平台](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/README.md) 24 | * [🤨 接入 OpenAI 的 ChatGPT](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-openai-de-chatgpt.md) 25 | * [😅 接入 New Bing (Sydney)](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-new-bing-sydney.md) 26 | * [🤹 接入 Google Bard](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-google-bard.md) 27 | * [🤣 接入 文心一言](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-wen-xin-yi-yan.md) 28 | * [🧑‍🎓 🧑🎓 接入 ChatGLM](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-chatglm.md) 29 | * [👨‍🎨 👨🎨 接入 Poe.com](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-poe.com.md) 30 | * [🥸 接入 Claude](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-claude.md) 31 | * [⭐ 接入 讯飞星火大模型](pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-xun-fei-xing-huo-da-mo-xing.md) 32 | * [🎤 文字转语音](pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/README.md) 33 | * [Azure TTS 语音接入教程](pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/azure-tts-yu-yin-jie-ru-jiao-cheng.md) 34 | * [VITS 语音接入教程](pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/vits-yu-yin-jie-ru-jiao-cheng.md) 35 | * [Edge TTS 语音接入教程](pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/edge-tts-yu-yin-jie-ru-jiao-cheng.md) 36 | * [🖼️ 文字转图片](pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-tu-pian.md) 37 | * [🐉 AI 画图](pei-zhi-wen-jian-jiao-cheng/ai-hua-tu.md) 38 | * [💬 回复内容](pei-zhi-wen-jian-jiao-cheng/hui-fu-nei-rong/README.md) 39 | * [百度云回复审核](pei-zhi-wen-jian-jiao-cheng/hui-fu-nei-rong/bai-du-yun-hui-fu-shen-he.md) 40 | * [🚁 触发形式与指令](pei-zhi-wen-jian-jiao-cheng/chu-fa-xing-shi-yu-zhi-ling.md) 41 | 42 | *** 43 | 44 | * [🐈 预设系统](yu-she-xi-tong.md) 45 | * [🐙 额度系统 & 黑白名单](e-du-xi-tong-hei-bai-ming-dan.md) 46 | 47 | ## 常见问题解答 48 | 49 | * [🎨 ChatGPT 启动过程中的常见问题](chang-jian-wen-ti-jie-da/chatgpt-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md) 50 | * [🖥️ Mirai 启动过程中的常见问题](chang-jian-wen-ti-jie-da/mirai-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md) 51 | * [🧳 go-cqhttp 启动过程中的常见问题](chang-jian-wen-ti-jie-da/gocqhttp-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md) 52 | * [😓 机器人在使用过程中的常见问题](chang-jian-wen-ti-jie-da/ji-qi-ren-zai-shi-yong-guo-cheng-zhong-de-chang-jian-wen-ti.md) 53 | * [🚆 WebUI 常见问题解答](chang-jian-wen-ti-jie-da/webui-chang-jian-wen-ti-jie-da.md) 54 | -------------------------------------------------------------------------------- /bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/README.md: -------------------------------------------------------------------------------- 1 | # 💡 快速部署教程 2 | 3 | 我们支持 Windows 和 Linux 平台,对于不同的平台,有不同的快速部署脚本。 4 | 5 | 下面这两篇教程将以部署 QQ 机器人为例,介绍在不同平台下的快速部署方法。 6 | 7 | 对于 Windows,请阅读: 8 | 9 | {% content-ref url="windows-kuai-su-bu-shu-jiao-cheng-gocqhttp-ban.md" %} 10 | [windows-kuai-su-bu-shu-jiao-cheng-gocqhttp-ban.md](windows-kuai-su-bu-shu-jiao-cheng-gocqhttp-ban.md) 11 | {% endcontent-ref %} 12 | 13 | {% content-ref url="windows-kuai-su-bu-shu-jiao-cheng.md" %} 14 | [windows-kuai-su-bu-shu-jiao-cheng.md](windows-kuai-su-bu-shu-jiao-cheng.md) 15 | {% endcontent-ref %} 16 | 17 | 对于 Linux,请阅读: 18 | 19 | {% content-ref url="linux-yi-jian-bu-shu-jiao-cheng.md" %} 20 | [linux-yi-jian-bu-shu-jiao-cheng.md](linux-yi-jian-bu-shu-jiao-cheng.md) 21 | {% endcontent-ref %} 22 | 23 | 对于只想用旧手机搭建,不想租服务器的用户,请阅读: 24 | 25 | 26 | {% content-ref url="aidlux-bu-shu-jiao-cheng.md" %} 27 | [aidlux-bu-shu-jiao-cheng.md](aidlux-bu-shu-jiao-cheng.md) 28 | {% endcontent-ref %} 29 | -------------------------------------------------------------------------------- /bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/aidlux-bu-shu-jiao-cheng.md: -------------------------------------------------------------------------------- 1 | # AidLux 部署教程(纯用手机进行部署,不需要租服务器) 2 | {% hint style="info" %} 本文难度:低 3 | 建议外挂 Clash 全局代理 {% endhint %} 4 | 5 | 你需要准备的有:一台 arm64 旧手机和正常的网络 6 | 7 | 最好可以使用 AidLux 作为模拟器,但是理论上来说可以使用任何安卓的 Debian 模拟器 8 | 9 | ```bash 10 | # 优点:低功耗,环保,废物利用? 11 | ``` 12 | 13 | ## 0x00 手动部署总体视频教程 14 | 视频教程链接 [ACFUN](https://m.acfun.cn/v/?ac=41422759) 15 | 16 | 17 | ## 0x01 一键安装 18 | 打开 [发布页](https://github.com/lss233/chatgpt-mirai-qq-bot) 19 | ![image](https://github.com/B17w153/chatgpt-for-bot-docs/assets/134407644/ce9f6b7f-eb39-478d-b532-aa5feec8d68e) 20 | 21 | 22 | 注意! 23 | 24 | 这个脚本是后来乱写的懒人脚本,可能与教程的目录设置上有些出入,但总体的思想是一样的。 25 | 26 | go-cqhttp 安装目录为 `/home/onebot` 27 | 28 | chatgpt-mirai-qq-bot目录为 `/home/GPT/chatgpt-mirai-qq-bot` 29 | 30 | 需要自己配置文件! 31 | 32 | ## 0x02 配置文件参考 33 | 我所用到的: 34 | 35 | [Go-cqhttp配置教程](https://github.com/lss233/chatgpt-for-bot-docs/blob/main/pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-onebot-gocqhttp.md) 36 | 37 | [OpenAI配置教程](https://github.com/lss233/chatgpt-for-bot-docs/blob/main/pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-openai-de-chatgpt.md) 38 | 39 | [机器人配置文件教程](https://github.com/lss233/chatgpt-for-bot-docs/blob/main/pei-zhi-wen-jian-jiao-cheng/wan-zheng-pei-zhi-wen-jian-yang-li.md) 40 | 41 | 其他配置文件汇总: 42 | 43 | [汇总](https://github.com/lss233/chatgpt-for-bot-docs/blob/main/SUMMARY.md) 44 | -------------------------------------------------------------------------------- /bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/linux-yi-jian-bu-shu-jiao-cheng.md: -------------------------------------------------------------------------------- 1 | # Linux 一键部署教程 2 | 3 | {% hint style="info" %} 4 | 本文难度:**中** 5 | 6 | 建议使用海外服务器 7 | {% endhint %} 8 | 9 | 为了避免在你的 Linux 服务器上装一大票软件污染环境,我们使用了 Docker 来帮助你管理程序。 10 | 11 | 你需要准备的有:一台版本比较新的 Linux 系统,它可以是 Ubuntu、 CentOS 或者是其他有 Docker 的系统。 12 | 13 | 你的服务器至少需要的软件: curl 14 | 15 | ## 0x00 获取最新版本的 Linux 一键部署脚本 16 | 17 | 打开项目的发布页面:[https://github.com/lss233/chatgpt-mirai-qq-bot/releases](https://github.com/lss233/chatgpt-mirai-qq-bot/releases) 18 | 19 | 排在最顶部的版本通常旁边有一个蓝色的 `Latest` 标识,这就说明它是项目的最新版本。 20 | 21 |
22 | 23 | 你要做的就是复制这里面的命令,然后粘贴到你的 Linux 终端中并回车,它就会开始安装。 24 | 25 | ## 0x01 启动一键部署脚本 26 | 27 | 接下来你可以参考 Windows 快速部署教程来完成安装。 28 | 29 | -------------------------------------------------------------------------------- /bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/windows-kuai-su-bu-shu-jiao-cheng-gocqhttp-ban.md: -------------------------------------------------------------------------------- 1 | # Windows 快速部署教程(go-cqhttp版) 2 | 3 | {% hint style="info" %} 4 | 本文难度:**低** 5 | 6 | 适合新人部署 7 | {% endhint %} 8 | 9 | 你可以观看由热心网友**錦依喵**制作的视频教程: 10 | 11 | {% embed url="https://v.ixigua.com/UJbX38n/" %} 12 | 13 | -------------------------------------------------------------------------------- /bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/windows-kuai-su-bu-shu-jiao-cheng.md: -------------------------------------------------------------------------------- 1 | # Windows 快速部署教程 (Mirai 版) 2 | 3 | {% hint style="info" %} 4 | 本文难度:**玄学** 5 | 6 | 曾经适合新人部署,但现在经常登录失败。 7 | {% endhint %} 8 | 9 | 如果你想在 Windows 上部署这个项目,那么你将需要: 10 | 11 | * Python 3.11 或以上 12 | * 本项目 13 | 14 | 如果你想部署成 QQ 机器人,那么还需要 Java、mirai、mirai-console-loader、mirai-api-http 等一大票东西。 15 | 16 | 不过别担心,只要使用 Windows 快速部署包,这些东西都会有的。 17 | 18 | ## 0x00 获取最新版本的 Windows 快速部署包 19 | 20 | 打开项目的发布页面:[https://github.com/lss233/chatgpt-mirai-qq-bot/releases](https://github.com/lss233/chatgpt-mirai-qq-bot/releases) 21 | 22 | 排在最顶部的版本通常旁边有一个蓝色的 `Latest` 标识,这就说明它是项目的最新版本。 23 | 24 | 你可以在这张卡片的下方找到一个名为 `Windows-quickstart-refs.tags.vx.x.x.zip` 的文件,其中, `x.x.x` 为版本号。这就是最新版本的 Windows 快速部署包,点击即可下载。 25 | 26 |
27 | 28 | ## 0x01 解压,初始化 29 | 30 | 快速部署包下载完成后,第一件事就是解压。 31 | 32 | 解压完成后,你可以看见一个文件夹,进去之后是这样: 33 | 34 |
35 | 36 | 我们需要执行 `初始化.cmd` 。它会为你安装一些依赖和插件。 37 | 38 | 启动 `初始化.cmd` 之后的界面如下图所示,你要做的就是**按照程序的指示**,不断地按回车。 39 | 40 |
41 | 42 | 随后,一个记事本会被弹出,这是初始化程序想让你填写配置文件。 43 | 44 | 这个时候,你可以参考这里的教程来填写配置文件: 45 | 46 | {% content-ref url="../../pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/" %} 47 | [dui-jie-liao-tian-ping-tai](../../pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/) 48 | {% endcontent-ref %} 49 | 50 | {% content-ref url="../../pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/" %} 51 | [jie-ru-ai-ping-tai](../../pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/) 52 | {% endcontent-ref %} 53 | 54 | 完成之后,保存文件,然后关闭记事本,根据程序的指示结束初始化。 55 | 56 | 57 | 58 | ## 0x02 首次启动 ChatGPT 59 | 60 | 首次启动的过程是最艰难的,有 80% 的小白止步于此,但它其实很容易。 61 | 62 | 我们先双击 `启动 ChatGPT.cmd` ,如果你的运气爆棚,你会看见类似这样的提示: 63 | 64 |
65 | 66 | 如果你遇到了错误,别急,请参考下面这个链接来排查你的问题: 67 | 68 | {% content-ref url="./" %} 69 | [.](./) 70 | {% endcontent-ref %} 71 | 72 | 当你的 ChatGPT 顺利启动以后,保持这个窗口开着别关!接下来,我们启动 Mirai。 73 | 74 | ## 0x03 首次启动 Mirai 75 | 76 | 启动 Mirai 的过程是萌新的第二场噩梦,但它其实也很容易。 77 | 78 | 首先,双击 `启动 Mirai.cmd`,然后等待程序启动完毕。 79 | 80 | 如果你看见了红色的错误提示,无需理会。 81 | 82 |
83 | 84 | 但是当你看到这样一行日志的时候,说明它已经启动完毕了,接下来我们要做的就是登录 QQ。 85 | 86 | ### 登录 QQ 87 | 88 | 选中这个 `启动 Mirai.cmd` 之后出现的黑色窗口,然后输入下面的命令: 89 | 90 | `login 你机器人的QQ号 你机器人的密码 MACOS` 91 | 92 | 然后轻轻敲一下回车。这个时候,Mirai 就会尝试登录你提供的账号。 93 | 94 |
95 | 96 | ### 完成滑动验证 97 | 98 | 接下来,Mirai 很有可能会要求你提供验证码。这个验证码其实就和你平时登录 QQ 时做的验证码是一样的。 99 | 100 |
101 | 102 | 我们用鼠标选中 Mirai 提供的那一段链接,然后按一下 **鼠标右键**,这段链接就会被复制。 103 | 104 | 打开浏览器,在地址栏中粘贴你复制的链接并回车,你会看见一个这样的页面: 105 | 106 |
107 | 108 | 接下来,我们对着页面的空白处按下 F12,打开 **开发人员工具**。 109 | 110 | 切换到 Network(网络) 选项卡,然后在这个框中输入 `verify` 111 | 112 |
113 | 114 | 我们放着这个窗口不管,回到刚刚那个网页,把所有的滑动验证完成,直到它不再出现新的验证码。 115 | 116 | 这个时候,回到**开发人员工具**的窗口,你会发现多出了几个 `cap_union_new_verify`。 117 | 118 | 我们选中最后一个,然后点击右边的 **Preview**(或者叫预览) 。 119 | 120 | 然后右键 ticket 后面的那串代码,点击复制。 121 | 122 |
123 | 124 | 回到 `启动 Mirai.cmd`的那个黑色窗口,按下鼠标右键,那串代码就会被粘贴到里面。 125 | 126 | 我们按下回车,继续。 127 | 128 | 129 | 130 | ### 完成手机短信验证 131 | 132 | 接下来,Mirai 很有可能会让你进行短信验证。通常到了这一步的时候,你离整个项目顺利运行已经不远了。 133 | 134 | 看到下面这段提示后,我们输入 `yes` 回车。 135 | 136 |
137 | 138 | 随后你的手机上将会收到一条短信验证码,把验证码中的数字输入到窗口中,然后回车。 139 | 140 | 141 | 142 | #### 设置自动登录 143 | 144 | 当你看见这样的提示时,说明 Mirai 已经成功登录并接管了你机器人的 QQ。 145 | 146 |
147 | 148 | 你当然不想让登录的过程如此复杂,所以接下来我们要设置自动登录 149 | 150 | 在窗口中输入以下几条命令: 151 | 152 | ``` 153 | autologin add 你机器人的QQ号 你机器人的QQ密码 154 | autologin setConfig 你机器人的QQ号 PROTOCOL MACOS 155 | ``` 156 | 157 | 这样,下次启动 Mirai 时,它就会自动登录你机器人的 QQ。 158 | 159 | 160 | 161 | 自此,部署完毕。你就可以发消息给你的机器人 QQ 试试效果了。 162 | -------------------------------------------------------------------------------- /bu-shu-jiao-cheng/kuai-su-bu-shu-jiao-cheng/wip-railway-bu-shu.md: -------------------------------------------------------------------------------- 1 | # PaaS 平台部署(Railway) 2 | 3 | {% hint style="info" %} 4 | 本文的教程只负责 ChatGPT for Bot 的部署,如果你想接入 QQ 平台,需要另外找地方部署 Mirai 或 go-cqhttp。 5 | {% endhint %} 6 | 7 | {% hint style="info" %} 8 | 我们建议你在自己电脑上根据 Windows 快速部署教程 先部署一次,熟悉流程。 9 | {% endhint %} 10 | 11 | PaaS 平台是一种可以直接运行你代码的平台。通过这种方法部署,你不需要实际拥有一个服务器。 12 | 13 | 本文以 Railway 为例,Railway 是一个 PaaS 平台,你可以在这上面运行 ChatGPT for Bot。 针对免费用户,它提供每个月 500小时(约20天) 的运行时间。 14 | 15 | ## 0x00 开始 16 | 17 | 点击下面按钮开始部署 18 | 19 | [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/QSxuAE?referralCode=hnDyRG) 20 | 21 | 如果你还未注册,会看到下面这样一个按钮,点击它并登录 GitHub。 22 | 23 | 24 | 25 |
26 | 27 | 如果你已经登录了,那么点击 Deploy Now,开始部署。 28 | 29 |
30 | 31 | 接下来,在这里填写配置文件: 32 | 33 | {% hint style="info" %} 34 | 你可能会注意到,这里的编辑框不能输入多行的文字 35 | 36 | 所以我们会在后面的步骤中重新填写配置文件。 37 | {% endhint %} 38 | 39 |
40 | 41 | 42 | 43 | 然后点击下方的 Deploy 开始部署。 44 | 45 | ### 0x01 配置 46 | 47 | 首先我们要做的就是重新填写配置文件。 48 | 49 | 点击 Variables -> CHATGPT\_FOR\_BOT\_FULL\_CONFIG -> Edit,然后重新粘贴配置文件,点击打勾保存。 50 | 51 |
52 | 53 |
54 | 55 | 除了 `CHATGPT_FOR_BOT_FULL_CONFIG` 之外,下面还有一个 `PORT` 变量。 56 | 57 | 如果你想要接入 Mirai 或者 go-cqhttp,那么需要保证配置中的 `reverse_ws_port` 与 `PORT` 变量的值一致,否则会无法使用。 58 | 59 | ### 0x02 接入 GO-CQHTTP 60 | 61 |
62 | 63 | 当你的程序启动以后,会出现一个链接。通过这个链接就可以访问到你的程序。 64 | 65 | 在 GO-CQHTTP 中,你可以把这个链接填到反向 WebSocket 的 Universal 地址中。 66 | 67 | ### 0x03 更新 68 | 69 |
70 | 71 | 如果项目有更新,你可以点击这里的按钮同步最新的代码。 72 | 73 | -------------------------------------------------------------------------------- /chang-jian-wen-ti-jie-da/chatgpt-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md: -------------------------------------------------------------------------------- 1 | # 🎨 ChatGPT 启动过程中的常见问题 2 | 3 | 下面是你在启动 ChatGPT 中可能会遇到的常见问题和解决方法方案: 4 | 5 | #### 1. 使用邮箱密码登录 OpenAI 时,出现:登录失败! 连接 OpenAI 服务器失败,请更换代理节点重试 6 | 7 |
8 | 9 | 原因及解决方法: 10 | 11 | {% embed url="https://github.com/lss233/chatgpt-mirai-qq-bot/issues/462" %} 12 | 13 | #### 2. 启动时出现:配置文件有误,请重新修改! 14 | 15 |
16 | 17 | 这是因为你的 `config.cfg` 写的有问题。你可以用下面这个工具帮你检查: 18 | 19 | {% embed url="https://www.toml-lint.com/" %} 20 | 21 | #### 3. 未能使用所配置的账号激活 sessionKey,请检查 mirai\_session 配置 22 | 23 |
24 | 25 | 出现这个问题的原因可能是因为你启动 Mirai 的时候没有登录 QQ。 26 | 27 | 解决方法就是在 Mirai 那边登录机器人 QQ,然后重新开一下我们这个程序。 28 | 29 | #### 3. 使用过程中出现:ClientConnectorError(ConnectionKey(host='localhost..... 30 | 31 |
32 | 33 | 这是因为我们的程序没有连接上 Mirai。请检查一下 Mirai 是不是启动了,并且登录了QQ。 34 | 35 | 如果 Mirai 确实没问题,请按照 [#zheng-xiang-websocket-+-http-fang-shi-lian-jie](../pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-mirai.md#zheng-xiang-websocket-+-http-fang-shi-lian-jie "mention") 检查你的配置。 36 | 37 | -------------------------------------------------------------------------------- /chang-jian-wen-ti-jie-da/gocqhttp-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md: -------------------------------------------------------------------------------- 1 | # 🧳 go-cqhttp 启动过程中的常见问题 2 | 3 | #### 1. 连接到反向 WebSocket Universal 服务器 ws://localhost:8566/ws 时出现错误: dial tcp... 4 | 5 |
6 | 7 | 这是因为 go-cqhttp 没法成功连接上我们的程序。请检查一下我们的程序是不是启动了。 8 | 9 | 如果程序确实有在运行,那就按照 [#gocqhttp-de-she-zhi-jiao-cheng](../pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-onebot-gocqhttp.md#gocqhttp-de-she-zhi-jiao-cheng "mention") 检查一下你的配置。 10 | 11 | -------------------------------------------------------------------------------- /chang-jian-wen-ti-jie-da/ji-qi-ren-zai-shi-yong-guo-cheng-zhong-de-chang-jian-wen-ti.md: -------------------------------------------------------------------------------- 1 | # 😓 机器人在使用过程中的常见问题 2 | 3 | #### 1. 出现下面这样的请求太多的错误: 4 | 5 |
6 | 7 | 这是消息发太多导致的。如果频繁出现,可以考虑换一个 `browserless_endpoint`。 8 | 9 | -------------------------------------------------------------------------------- /chang-jian-wen-ti-jie-da/mirai-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md: -------------------------------------------------------------------------------- 1 | # 🖥 Mirai 启动过程中的常见问题 2 | 3 | #### 1. 使用过程中出现:\[reverse-ws] Connection to localhost:8554/ interrupted. 4 | 5 |
6 | 7 | 这是因为你的 Mirai 没有连上我们程序。请检查一下我们程序是不是启动了。 8 | 9 | 如果程序确实有在运行,请按照 [#fan-xiang-websocket-lian-jie-shi-de-she-zhi](../pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-mirai.md#fan-xiang-websocket-lian-jie-shi-de-she-zhi "mention") 检查你的配置。 10 | -------------------------------------------------------------------------------- /chang-jian-wen-ti-jie-da/webui-chang-jian-wen-ti-jie-da.md: -------------------------------------------------------------------------------- 1 | # 🚆 WebUI 常见问题解答 2 | 3 | ## 1. 忘记登录密码 4 | 5 | 打开配置文件 `config.cfg` ,找到 `[http]` 中的 `password` 并删除。 6 | 7 |
8 | 9 | 然后重新启动程序,注意看日志,会输出一个随机生成的默认密码。 10 | 11 |
12 | -------------------------------------------------------------------------------- /e-du-xi-tong-hei-bai-ming-dan.md: -------------------------------------------------------------------------------- 1 | # 🐙 额度系统 & 黑白名单 2 | 3 | 请阅读: 4 | 5 | {% embed url="https://github.com/lss233/chatgpt-mirai-qq-bot/wiki/%F0%9F%A7%B5-%E9%A2%9D%E5%BA%A6%E9%99%90%E5%88%B6-&-%E9%BB%91%E7%99%BD%E5%90%8D%E5%8D%95" %} 6 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/ai-hua-tu.md: -------------------------------------------------------------------------------- 1 | # 🐉 AI 画图 2 | 3 | 目前我们支持的画图 AI 有: 4 | 5 | * Stable Diffusion 6 | * Bing 画图 (由 Bing 帮你生成 DALL·E) 7 | * OpenAI 画图(直接使用 DALL·E) 8 | * 文心一言 9 | 10 | 如果你当前使用的语言模型是文心一言,那么就会使用文心一言的 AI 画图功能: 11 | 12 | [jie-ru-wen-xin-yi-yan.md](jie-ru-ai-ping-tai/jie-ru-wen-xin-yi-yan.md "mention") 13 | 14 | 如果你使用其他的语言模型,那么则会根据你上面设置的顺序来选择使用哪个画图 AI,不支持切换。 15 | 16 | ## 接入 Stable Diffusion 画图 17 | 18 | Stable Diffusion 需要你搭建一个 sd-webui。 19 | 20 | 然后在你的配置文件中加入以下内容: 21 | 22 | ```toml 23 | [sdwebui] 24 | # sd-webui 的接口地址地址 25 | api_url='http://127.0.0.1:7860/' 26 | # 内置提示词,所有的画图内容都会加上这些提示词 27 | prompt_prefix = 'masterpiece, best quality, illustration, extremely detailed 8K wallpaper' 28 | # 负面提示词,sd 的一个参数 29 | negative_prompt = 'NG_DeepNegative_V1_75T, badhandv4, EasyNegative, bad hands, missing fingers, cropped legs, worst quality, low quality, normal quality, jpeg artifacts, blurry,missing arms, long neck, Humpbacked,multiple breasts, mutated hands and fingers, long body, mutation, poorly drawn , bad anatomy,bad shadow,unnatural body, fused breasts, bad breasts, more than one person,wings on halo,small wings, 2girls, lowres, bad anatomy, text, error, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, out of frame, lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers,' 30 | # 这也是 sd 的一个参数 31 | sampler_index = 'DPM++ SDE Karras' 32 | # 这还是 sd 的一个参数 33 | filter_nsfw = true 34 | # 你可以在这里看所有支持的 sd 参数: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/API 35 | # 画图超时时间,单位为秒 36 | timeout = 10.0 37 | ``` 38 | 39 | ## 接入 Bing 画图 40 | 41 | 如果你想使用 Bing 的画图功能,那么你需要接入一个 Bing 账号,然后开启 Bing 画图功能。 42 | 43 | 参考:[#jie-ru-new-bing-sydney](jie-ru-ai-ping-tai/#jie-ru-new-bing-sydney "mention") 44 | 45 | ```toml 46 | [bing] 47 | 48 | # 开启 Bing 画图 49 | use_drawing = true 50 | 51 | [[bing.accounts]] 52 | cookie_content = '你的 Bing 账号信息' 53 | ``` 54 | 55 | 部分用户可能无法使用 Bing 画图,请阅读: 56 | 57 | {% embed url="https://github.com/lss233/chatgpt-mirai-qq-bot/issues/659" %} 58 | 59 | ## 接入 OpenAI DALL·E 画图 60 | 61 | [#jie-ru-api-ban-openai-chatgpt](jie-ru-ai-ping-tai/jie-ru-openai-de-chatgpt.md#jie-ru-api-ban-openai-chatgpt "mention") 62 | 63 | 使用 OpenAI 的 API 画图时将会调用 DALL·E 模型进行绘画,它的费用为 0.018 美元/张。 64 | 65 | ## 使用画图功能 66 | 67 | 触发的指令请参考: 68 | 69 | [#ai-hua-tu](chu-fa-xing-shi-yu-zhi-ling.md#ai-hua-tu "mention") 70 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/chu-fa-xing-shi-yu-zhi-ling.md: -------------------------------------------------------------------------------- 1 | # 🚁 触发形式与指令 2 | 3 |
4 | 5 | 该部分完整配置如下: 6 | 7 | ```toml 8 | [trigger] 9 | # 配置机器人要如何响应 10 | 11 | # 全局聊天前缀,在群聊和私聊中,符合下面的前缀【才】会响应,可以自己增减 12 | prefix = [ "gpt",] 13 | 14 | # 私聊聊天前缀,在私聊中,符合下面的前缀【也】会响应,可以自己增减 15 | prefix_friend = [ "ask",] 16 | 17 | # 群聊聊天前缀,在群聊中,符合下面的前缀【也】会响应,可以自己增减 18 | prefix_group = [ "ai",] 19 | 20 | # 满足以下正则表达式则忽略此条消息 21 | ignore_regex = [] 22 | 23 | # 直接和指定的 AI 对话(不切换AI) 24 | # 此处的前缀是在上面的前缀之后的 25 | # 例: 26 | # prefix = [ "ask" ] 27 | # prefix_ai = { "bing-c" = ["bing"] } 28 | # 则用户发送: ask bing 你好 29 | # 则会直接把 “你好” 两个字发给 New Bing AI 30 | prefix_ai = { "chatgpt-web" = ["gpt"], "bing-c" = ["bing"] } 31 | 32 | # AI 画图的前缀 33 | # 需要有 OpenAI 的 api_key 才能使用 34 | prefix_image = ["画", "看"] 35 | # 配置群里如何让机器人响应,"at" 表示需要群里 @ 机器人,"mention" 表示 @ 或者以机器人名字开头都可以,"none" 表示不需要 36 | require_mention = "at" 37 | 38 | # 重置会话的命令 39 | reset_command = [ "重置会话",] 40 | 41 | # 回滚会话的命令 42 | rollback_command = [ "回滚会话",] 43 | 44 | # 切换模型的命令 45 | switch_model = "切换模型 (.+)" 46 | 47 | # 允许普通用户切换的模型 48 | allowed_models = ["gpt-3.5-turbo", "gpt-3.5-turbo-0301", "text-davinci-002-render-sha", "text-davinci-002-render-paid"] 49 | 50 | # 允许普通用户切换AI 51 | allow_switching_ai = true 52 | ``` 53 | 54 |
55 | 56 | ## 聊天前缀 57 | 58 | 有些时候,你并不想让机器人回复所有的消息,那么你可以通过设置聊天前缀来让机器人只回复特定开头的消息。 59 | 60 | ```toml 61 | [trigger] 62 | 63 | # 全局聊天前缀,在群聊和私聊中,符合下面的前缀【才】会响应,可以自己增减 64 | prefix = [ "gpt",] 65 | 66 | # 私聊聊天前缀,在私聊中,符合下面的前缀【也】会响应,可以自己增减 67 | prefix_friend = [ "ask",] 68 | 69 | # 群聊聊天前缀,在群聊中,符合下面的前缀【也】会响应,可以自己增减 70 | prefix_group = [ "ai",] 71 | ``` 72 | 73 | 你可以设置三种不同的聊天前缀,分别生效于全局、私聊和群聊。 74 | 75 | 这三个配置项填写的都是数组,也就是说你可以设置多个前缀,例如: 76 | 77 | ```toml 78 | [trigger] 79 | 80 | # 前缀是 gpt 或者 ai 都可以 81 | prefix = ["gpt", "ai"] 82 | ``` 83 | 84 | ## 是否需要被提起 85 | 86 | 你也可以设置机器人是否需要被先 @ 才会回复消息。 87 | 88 | ```toml 89 | require_mention = "at" 90 | ``` 91 | 92 | 这个配置项可以填的值有: 93 | 94 | * none - 不需要被提起 95 | * at - 需要先 @ 96 | * mention - 被先 @ 或者说出机器人的名字 97 | 98 | 在这个例子中,因为设置了**前缀**和**需要先 @**,你发送的消息需要为: `@机器人 gpt 你好`。 99 | 100 | ## 忽略消息 101 | 102 | 你可以写一些正则表达式,让机器人根据规则忽略某些消息。 103 | 104 | ```toml 105 | [trigger] 106 | 107 | # 满足以下正则表达式则忽略此条消息 108 | ignore_regex = ["^/draw.+$"] 109 | ``` 110 | 111 | 在这个例子中,当用户发送了任何以 `/draw`开头的消息,机器人都会无视。 112 | 113 | 114 | 115 | ## 和指定的语言模型直接对话 116 | 117 | 有些时候你不想切换 AI 就直接对话,那么可以通过设置直接对话的前缀。 118 | 119 | ```toml 120 | [trigger] 121 | 122 | # 直接和指定的 AI 对话(不切换AI) 123 | prefix_ai = { "chatgpt-web" = ["gpt"], "bing-c" = ["bing"] } 124 | ``` 125 | 126 | 在上面这个例子中,用户发送: `bing 你好`,机器人就会直接把 “你好” 两个字发给 New Bing AI。 127 | 128 | 需要注意的是,如果你还设置了**聊天前缀**,那么你需要把**聊天前缀**放到**直接对话前缀**的前面。 129 | 130 | 举个例子: 131 | 132 | ```toml 133 | [trigger] 134 | 135 | prefix = ["ask"] 136 | prefix_ai = { "chatgpt-web" = ["gpt"], "bing-c" = ["bing"] } 137 | ``` 138 | 139 | 那么用户需要发送 `ask bing 你好`,才会有效果。 140 | 141 | 142 | 143 | ## AI 画图 144 | 145 | 如果你使用的 AI 是文心一言,那么就会使用文心一言的 AI 画图功能。 146 | 147 | 如果你使用其他的 AI,那么你只有在你提供了 OpenAI 的 API 时才能使用。 148 | 149 | ```toml 150 | [trigger] 151 | 152 | # AI 画图的前缀 153 | prefix_image = ["画", "看"] 154 | ``` 155 | 156 | 157 | 158 | ## 切换模型 159 | 160 | 你可以在聊天的过程中切换模型(不是切换 AI)。 161 | 162 |
[trigger]
163 | 
164 | # 切换模型的命令
165 | switch_model = "切换模型 (.+)"
166 | 
167 | # 允许普通用户切换的模型
168 | allowed_models = ["gpt-3.5-turbo", "gpt-3.5-turbo-0301", "text-davinci-002-render-sha", "text-davinci-002-render-paid"]
169 | 
170 | # 允许普通用户切换AI
171 | allow_switching_ai = true
172 | 
173 | 174 | 175 | 176 | ## 其他命令 177 | 178 | ```toml 179 | [trigger] 180 | 181 | # 重置会话的命令 182 | reset_command = [ "重置会话",] 183 | 184 | # 回滚会话的命令 185 | rollback_command = [ "回滚会话",] 186 | ``` 187 | 188 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/README.md: -------------------------------------------------------------------------------- 1 | # 📪 对接聊天平台 2 | 3 | 我们现在支持同时接入多种平台,你只需要在配置文件 `config.cfg` 加入你想要接入的平台的配置,就可以开启相关功能。 4 | 5 | ## 对接 QQ 6 | 7 | 目前支持两种对接 QQ 的协议,分别为 Mirai 和 OneBot。 8 | 9 | 你可以选择你喜欢的协议进行对接。 10 | 11 | ### 对接 Mirai 12 | 13 | {% content-ref url="dui-jie-mirai.md" %} 14 | [dui-jie-mirai.md](dui-jie-mirai.md) 15 | {% endcontent-ref %} 16 | 17 | ### 对接 OneBot (go-cqhttp) 18 | 19 | {% content-ref url="dui-jie-onebot-gocqhttp.md" %} 20 | [dui-jie-onebot-gocqhttp.md](dui-jie-onebot-gocqhttp.md) 21 | {% endcontent-ref %} 22 | 23 | ## 对接企业微信 24 | 25 | {% content-ref url="dui-jie-qi-ye-wei-xin.md" %} 26 | [dui-jie-qi-ye-wei-xin.md](dui-jie-qi-ye-wei-xin.md) 27 | {% endcontent-ref %} 28 | 29 | ## 对接 Telegram 30 | 31 | {% content-ref url="dui-jie-telegram.md" %} 32 | [dui-jie-telegram.md](dui-jie-telegram.md) 33 | {% endcontent-ref %} 34 | 35 | ## 对接 Discord 36 | 37 | {% content-ref url="dui-jie-discord.md" %} 38 | [dui-jie-discord.md](dui-jie-discord.md) 39 | {% endcontent-ref %} 40 | 41 | ### 开启 HTTP API 服务 42 | 43 | 开启 HTTP 服务后,你可以通过本项目提供的 HTTP API 来接入自己开发的程序,你可以参考下面这个项目来了解详细用法: 44 | 45 | #### 通过 HTTP 服务接入个人微信 46 | 47 | {% content-ref url="dui-jie-ge-ren-wei-xin.md" %} 48 | [dui-jie-ge-ren-wei-xin.md](dui-jie-ge-ren-wei-xin.md) 49 | {% endcontent-ref %} 50 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-discord.md: -------------------------------------------------------------------------------- 1 | # 🎧 对接 Discord 2 | 3 | 将 `config.cfg` 中的 `[mirai]` 块删除,然后加入以下配置: 4 | 5 | ``` 6 | [discord] 7 | # 这里填写你 Discord 机器人的 token 8 | bot_token = "xxx" 9 | ``` 10 | 11 | 就可以在 Discord 中和 AI 聊天了! 12 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-ge-ren-wei-xin.md: -------------------------------------------------------------------------------- 1 | # 😁 对接个人微信 2 | 3 | 目前的个人微信支持由 [lcjqyml/wechatbot](https://github.com/lcjqyml/wechatbot) 项目提供,基于本项目的 HTTP API 功能实现, 4 | 5 | ## 0x01 开启 HTTP API 服务 6 | 7 | 在 `config.cfg` 中加入以下配置后,将额外提供 HTTP API 支持。 8 | 9 | {% hint style="info" %} 10 | 我们建议将本项目部署在国外服务器上,减少网络错误发生的概率。 11 | {% endhint %} 12 | 13 | ```toml 14 | [http] 15 | host = "0.0.0.0" 16 | # 填写提供服务的端口 17 | port = 8234 18 | # 是否开启调试 19 | debug = false 20 | ``` 21 | 22 | ### 注意事项 23 | 24 | Docker 用户别忘了将此处配置中的 `port` 的端口号映射出来,以便被访问到。 25 | 26 | 举个**例子**(只是例子,不代表完全一样,别直接抄): 27 | 28 |
version: '3.4'
29 | services:
30 |   chatgpt:
31 |     image: lss233/chatgpt-mirai-qq-bot:browser-version
32 |     restart: always
33 |     environment:
34 |       LANG: 'C.UTF-8'
35 |     ports:
36 |       - 8234:8234 # <----- 主要就是加这一项
37 |     volumes:
38 |       - ./config.cfg:/app/config.cfg
39 |       - ./data:/app/data
40 |       - ./presets:/app/presets
41 | 
42 | 43 | ## 0x02 部署 [lcjqyml](https://github.com/lcjqyml)/[**wechatbot**](https://github.com/lcjqyml/wechatbot) 44 | 45 | {% hint style="info" %} 46 | 我们建议将这个项目部署在国内的服务器上,降低微信被封号的概率。 47 | {% endhint %} 48 | 49 | {% hint style="info" %} 50 | 这是一个由第三方提供的程序,教程可能会随着项目的发展而过时。 51 | 52 | 建议参考原项目文档进行部署:[https://github.com/lcjqyml/wechatbot](https://github.com/lcjqyml/wechatbot) 53 | {% endhint %} 54 | 55 | 此处以 Ubuntu 20.04 系统为例,在安装 Docker 后,执行以下命令: 56 | 57 | ```bash 58 | docker run -e CHATBOT_PROXY="http://127.0.0.1:8234" lcjqyml/wechatbot:latest 59 | ``` 60 | 61 | 将 `127.0.0.1` 换成你部署的 ChatGPT for Bot 项目服务器的 IP,然后按下回车启动,然后扫码登录即可。 62 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-mirai.md: -------------------------------------------------------------------------------- 1 | # 🦠 对接 Mirai 2 | 3 | Mirai 协议是我们最初支持的协议。 4 | 5 | 我们支持 **反向 Websocket 连接**和**正向 Websocket + HTTP 连接**两种方式通过 Mirai 接入 QQ。 6 | 7 | ## 反向 Websocket 连接时的设置 8 | 9 | 如果你要使用 Mirai 来连接 QQ,那么需要你在配置文件中这么写: 10 | 11 | ```toml 12 | [mirai] 13 | # Mirai 相关设置 14 | ​ 15 | qq = 请填写机器人的 QQ 号 16 | ​ 17 | manager_qq = 请修改为机器人管理员的QQ号(你自己的 QQ 号) 18 | ​ 19 | # 以下是和 Mirai 连接所需要的相关设置 20 | 21 | # 如果你是小白,或者使用我们提供的快速部署方案,可以不用修改这里的设置 22 | # mirai-http-api 中的 verifyKey 23 | api_key = "1234567890" 24 | # mirai api http 反向连接模式 25 | reverse_ws_host = "0.0.0.0" 26 | reverse_ws_port = 8554 27 | ``` 28 | 29 | 在这段配置中,我们使用了 **反向 Websocket** 连接到 Mirai。 30 | 31 | 在这个模式下,本程序启动后会等待 Mirai 主动连接到本程序。 32 | 33 | 这样你就可以把本程序放在云服务器上,而 Mirai 可以放在自己的电脑上,从而避免触发 QQ 的异地登录保护或者掉线问题。 34 | 35 | ### mirai-api-http 中的设置 36 | 37 | 你需要保证这里的配置和 mirai-api-http 中的设置是一致的,我们的程序才能接入 Mirai。 38 | 39 | mirai-api-http 的配置文件存放于 `mirai/config/net.mamoe.mirai-api-http`,你可以用记事本打开它。 40 | 41 | 以我们上面的配置为例, mirai-api-http 的配置文件应该改成这样: 42 | 43 | ```yaml 44 | adapters: 45 | - reverse-ws 46 | 47 | verifyKey: 1234567890 48 | singleMode: false 49 | cacheSize: 4096 50 | adapterSettings: 51 | reverse-ws: 52 | ## 远端 websocket server 地址配置 53 | destinations: 54 | - host: localhost 55 | port: 8554 56 | path: / 57 | protocol: ws 58 | 59 | ``` 60 | 61 | 需要注意的是: 62 | 63 | * `verifyKey` 的 `1234567890` 要和上面的 `api_key` 保持一致 64 | * `port` 的 `8554` 要和上面的 `reverse_ws_port` 保持一致 65 | * `host` 的 `localhost` 填写本程序的 IP 地址。这取决于你的部署方式, 66 | 67 | 如果是 Docker(或者 Linux 一键部署),那你要改成 `chatgpt` 。 68 | 69 | 如果是 Windows,那就保持现在这样,不需要再改了。 70 | 71 | ## 正向 Websocket + HTTP 方式连接 72 | 73 | 你也可以使用正向 Websocket + HTTP 的方式来连接到 Mirai。 74 | 75 | 在这个模式下, 本程序启动成功后会主动连接到 Mirai。 76 | 77 | 如果你要这么做,那就注释掉 `reverse_ws`开头的两行配置,然后加入另外两行配置,就像这样: 78 | 79 | ```toml 80 | # mirai api http 反向连接模式 81 | # reverse_ws_host = "0.0.0.0" 82 | # reverse_ws_port = 8554 83 | # mirai api http 正向连接模式 84 | # 使用此模式时需注释上面的反向连接模式配置 85 | http_url = "http://localhost:8080" 86 | ws_url = "http://localhost:8080" 87 | ``` 88 | 89 | 此处的 `localhost` 是 Mirai 程序的 IP 地址。在 Docker 中,你可以填容器名,在 Windows 同一台机器中,那就填 `localhost`。 90 | 91 | 通常来说,使用正向连接模式没有什么优点,因此我们觉得你没有必要对这里的配置进行修改。 92 | 93 | ### mirai-api-http 中的设置 94 | 95 | ```yaml 96 | adapters: 97 | - http 98 | - ws 99 | verifyKey: 1234567890 100 | singleMode: false 101 | cacheSize: 4096 102 | persistenceFactory: 'built-in' 103 | adapterSettings: 104 | ## HTTP 服务的主机, 端口和跨域设置 105 | http: 106 | host: "0.0.0.0" 107 | port: 8080 108 | cors: ["*"] 109 | 110 | ## Websocket 服务的主机, 端口和事件同步ID设置 111 | ws: 112 | host: "0.0.0.0" 113 | port: 8080 114 | reservedSyncId: -1 115 | ``` 116 | 117 | 需要注意的是: 118 | 119 | * `verifyKey` 的 `1234567890` 要和上面的 `api_key` 保持一致 120 | * `port` 的 `8080`要和上面的 `url` 冒号后面的数字保持一致 121 | 122 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-onebot-gocqhttp.md: -------------------------------------------------------------------------------- 1 | # 🙇 对接 OneBot (go-cqhttp) 2 | 3 | OneBot 协议可以用于对接 go-cqhttp 等机器人框架。 4 | 5 | 如果你要使用 OneBot 协议,那么你就将 `config.cfg` 中的 `[mirai]` 块删除,然后加入以下配置: 6 | 7 | ```properties 8 | [onebot] 9 | qq=请修改为你机器人的QQ号 10 | manager_qq = 请修改为机器人管理员的QQ号 11 | 12 | reverse_ws_host = "0.0.0.0" 13 | reverse_ws_port = 8566 14 | ``` 15 | 16 | 就可以使用 go-cqhttp 或者其他支持 OneBot 协议的程序和 ChatGPT 聊天! 17 | 18 | ## go-cqhttp 的设置教程 19 | 20 | 如果你在搭建过程中遇到问题,可以看: 21 | 22 | [gocqhttp-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md](../../chang-jian-wen-ti-jie-da/gocqhttp-qi-dong-guo-cheng-zhong-de-chang-jian-wen-ti.md "mention") 23 | 24 | OneBot 是一个典型的支持 OneBot 协议的平台。 25 | 26 | 如果你在使用 go-cqhttp,那就可以不需要理会 Mirai 了。 27 | 28 | {% hint style="info" %} 29 | 如果你通过 GO-CQHTTP 的 Linux 部署脚本来安装的这个项目,那么你可以跳过这一段教程。 30 | {% endhint %} 31 | 32 | ### 1. 下载 go-cqhttp 33 | 34 | 你可以在这里下载最新的 go-cqhttp:[https://github.com/Mrs4s/go-cqhttp/releases](https://github.com/Mrs4s/go-cqhttp/releases) 35 | 36 | ### 2. 初始化 go-cqhttp 37 | 38 | 解压并启动 go-cqhttp,选 `3` 后回车,退出程序。 39 | 40 |
41 | 42 | ### 3. 设置 go-cqhttp 43 | 44 | 编辑 go-cqhttp 的 `config.yaml`,设置机器人的 QQ 号和反向 Universal 地址 (这个反向 Universal 地址和前面的 `reverse_ws_host` 、`reverse_ws_port` )有关。 45 | 46 |
47 | 48 |
49 | 50 | 这里的 universal 地址的写法如下: 51 | 52 | * 如果你的 go-cqhttp 和 chatgpt 在同一台机器上,那么就写: `ws://localhost:8566/ws` ,这里的 8566 和 `reverse_ws_port`的值是一样的。 53 | * 如果你的 go-cqhttp 和 chatgpt 在不同的机器上,那么就在上面的基础上,把 `localhost` 改成你 chatgpt 服务器的 IP 地址。 54 | 55 | ### 4. 映射 \`reverse\_ws\_port\` 端口 56 | 57 | 这一步是使用 Docker 部署的同学才需要做的, Windows 用户可以直接跳过。 58 | 59 | 打开 docker-compose.yaml,在图中的位置加入下面这么一行: 60 | 61 |
62 | 63 | 然后执行 `docker-compose up -d` 更新即可。 64 | 65 |
66 | 67 | ### 5. 启动 go-cqhttp,生成配置文件 68 | 69 | 首次启动时我们不要登录 QQ,我们只是需要它生成的 `device.json`文件。 70 | 71 |
72 | 73 | ### 6. 打开 device.json,修改协议 74 | 75 | 找到 `protocol`,把后面的数字改成 2,然后保存并退出即可。 76 | 77 | 这会让 go-cqhttp 使用 Android Watch 协议进行登录。 78 | 79 |
80 | 81 | ### 7. 启动 go-cqhttp,扫码并登录 82 | 83 |
84 | 85 | ### 注意事项 86 | 87 | 这个go-cqhttp 的扫码登录,是需要你自己的手机 QQ 和 go-cqhttp 在同一个网络环境下的才能成功的。 88 | 89 | 这个问题有两种解决方法: 90 | 91 | #### 方法一:代理 92 | 93 | 在你的服务器上搭个代理,让你的手机通过代理再进行扫码。 94 | 95 | #### 方法二:同步 session.token 文件 96 | 97 | 在你自己的电脑上用同样的 device.json 来登陆一次 go-cqhttp,扫码登录成功后,把这个 session.token 放到服务器上 98 | 99 | #### 方法三:在自己电脑运行 100 | 101 | 你自己的电脑上跑 go-cqhttp,然后在服务器跑 chatgpt 102 | 103 | 然后通过 go-cqhttp 的反向 websocket 功能,让你电脑上的 go-cqhttp 连接上服务器的 chatgpt 程序。 104 | 105 | 唯一要修改的就是:在第2步里面将 `127.0.0.1` 就换成你运行 chatgpt 服务器的公网 IP 地址。 106 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-qi-ye-wei-xin.md: -------------------------------------------------------------------------------- 1 | # 🧑🍳 对接企业微信 2 | 3 | 在 `config.cfg` 中加入以下配置,开启对企业微信的支持: 4 | 5 | ```toml 6 | [wecom] 7 | # 企业微信相关设置 8 | # 企业微信管理后台网址: https://work.weixin.qq.com/wework_admin/frame 9 | # 企业微信回调地址,需要能够被公网访问 10 | host = "0.0.0.0" 11 | port = 5001 12 | debug = false 13 | # 企业微信应用相关设置 14 | # 企业 ID: 我的企业 -> 企业信息 -> 企业 ID 15 | corp_id = "ww***" 16 | # 应用 AgentId: 应用管理 -> 自建 -> 创建应用 -> AgentId 17 | agent_id = 1000001 18 | # 应用 Secret: 应用管理 -> 自建 -> 创建应用 -> Secret 19 | secret = "abc***" 20 | # API 回调地址请填写 http://公网ip:5001/wechat 21 | # API 令牌: 应用管理 -> 自建 -> 刚刚创建的应用 -> 功能 -> 接收消息 -> 启用API接收 -> 随机生成的 Token 22 | token = "abc***" 23 | # API 加解密密钥: 应用管理 -> 自建 -> 刚刚创建的应用 -> 功能 -> 接收消息 -> 启用API接收 -> 随机生成的 EncodingAESKey 24 | encoding_aes_key = "abc***" 25 | ``` 26 | 27 | ### 注意事项 28 | 29 | 企业微信要求提供一个 API 回调地址到本项目中,所以你可能需要把这个项目部署在有公网 IP 的电脑上(或者使用 frp 等软件进行端口映射)。 30 | 31 | 32 | 33 | Docker 用户别忘了将此处配置中的 `port` 的端口号映射出来,以便被访问到。 34 | 35 | 举个**例子**(只是例子,不代表完全一样,别直接抄): 36 | 37 |
version: '3.4'
38 | services:
39 |   chatgpt:
40 |     image: lss233/chatgpt-mirai-qq-bot:browser-version
41 |     restart: always
42 |     environment:
43 |       LANG: 'C.UTF-8'
44 |     ports:
45 |       - 5001:5001 # <----- 主要就是加这一项
46 |     volumes:
47 |       - ./config.cfg:/app/config.cfg
48 |       - ./data:/app/data
49 |       - ./presets:/app/presets
50 | 
51 | 52 | 修改完这个文件后,还要执行:`docker-compose up -d` 来更新容器编排,确保端口映射成功。 53 | 54 | 当你完成上面的所有操作后,可以在自己的浏览器中打开:`http://你的服务器IP:5001` 看看有没有内容。如果浏览器提示打开失败,说明你的端口映射没有成功。 55 | 56 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/dui-jie-liao-tian-ping-tai/dui-jie-telegram.md: -------------------------------------------------------------------------------- 1 | # 🛫 对接 Telegram 2 | 3 | 加入以下配置: 4 | 5 | ```toml 6 | [telegram] 7 | # 这个 token 是找 BotFather 要的 8 | bot_token = "你的 Bot token" 9 | # 如果部署在国内,就填这个设置代理 10 | # 不填的话就会读取系统的代理设置 11 | proxy = "http://localhost:1080" 12 | # 管理员的 chat id 13 | manager_chat = 1234567890 14 | ``` 15 | 16 | 就可以使用 Telegram 机器人和 AI 聊天! 17 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/hui-fu-nei-rong/README.md: -------------------------------------------------------------------------------- 1 | # 💬 回复内容 2 | 3 | 该部分完整配置参考: 4 | 5 |
6 | 7 | 点此展开 8 | 9 |
[response]
 10 | 
 11 | mode = "mixed"
 12 | 
 13 | buffer_delay = 15
 14 | 
 15 | default_ai = "chatgpt-web"
 16 | # 匹配指令成功但没有对话内容时发送的消息
 17 | placeholder = "您好!我是 Assistant,一个由 OpenAI 训练的大型语言模型。我不是真正的人,而是一个计算机程序,可以通过文本聊天来帮助您解决问题。如果您有任何问题,请随时告诉我,我将尽力回答。\n如果您需要重置我们的会话,请回复`重置会话`。"
 18 | 
 19 | # 发生错误时要发送的消息
 20 | error_format = "出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚会话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n{exc}"
 21 | 
 22 | # 发生网络错误时发送的消息,请注意可以插入 {exc} 作为异常占位符
 23 | error_network_failure = "网络故障!连接 OpenAI 服务器失败,我需要更好的网络才能服务!\n{exc}"
 24 | 
 25 | # OpenAI 账号登录失效时的提示
 26 | error_session_authenciate_failed = "身份验证失败!无法登录至 ChatGPT 服务器,请检查账号信息是否正确!\n{exc}"
 27 | 
 28 | # OpenAI 提示 Too many requests(太多请求) 时的提示
 29 | error_request_too_many = "糟糕!当前收到的请求太多了,我需要一段时间冷静冷静。你可以选择“重置会话”,或者过一会儿再来找我!\n{exc}"
 30 | 
 31 | # 服务器提示 Server overloaded(过载) 时的提示
 32 | error_server_overloaded = "抱歉,当前服务器压力有点大,请稍后再找我吧!"
 33 | 
 34 | # 重置会话时发送的消息
 35 | reset = "会话已重置。"
 36 | 
 37 | # 回滚成功时发送的消息
 38 | rollback_success = "已回滚至上一条对话,你刚刚发的我就忘记啦!"
 39 | 
 40 | # 回滚失败时发送的消息
 41 | rollback_fail = "回滚失败,没有更早的记录了!"
 42 | 
 43 | quote = true
 44 | 
 45 | timeout = 30.0
 46 | 
 47 | timeout_format = "我还在思考中,请再等一下~"
 48 | 
 49 | max_timeout = 600
 50 | 
 51 | cancel_wait_too_long = "啊哦,这个问题有点难,让我想了好久也没想明白。试试换个问法?"
 52 | 
 53 | max_queue_size = 10
 54 | 
 55 | queue_full = "抱歉!我现在要回复的人有点多,暂时没有办法接收新的消息了,请过会儿再给我发吧!"
 56 | 
 57 | queued_notice_size = 3
 58 | 
 59 | queued_notice = "消息已收到!当前我还有{queue_size}条消息要回复,请您稍等。"
 60 | 
61 | 62 |
63 | 64 | 下面介绍各个配置的含义。 65 | 66 | {% hint style="info" %} 67 | **请注意** 68 | 69 | 所有的配置项都要写在 `[response]` 的后面,你只需要写一个 `[response]`,然后跟着配置项和参数即可。 70 | {% endhint %} 71 | 72 | ## 响应模式 73 | 74 | ```toml 75 | [response] 76 | # 默认的响应模式 77 | 78 | mode = "mixed" 79 | ``` 80 | 81 | 目前支持三种响应模式: 82 | 83 | * `mixed` - 图文混合模式 84 | 85 | 在这个模式下,普通文本会以文字形式发送,而 Markdown、公式等富文本会以图片形式发送。 86 | * `text` - 文本模式 87 | 88 | 在这个模式下,消息会全部以文字的形式发送。 89 | 90 | 需要注意的是,在 QQ 群中,由于腾讯风控比较严格,文字消息可能会发送失败。此时机器人会尝试使用图片模式来重新发送内容。 91 | * `image` - 图片模式 92 | 93 | 在这个模式下,机器人的消息会渲染成图片再发送。 94 | 95 | 有关渲染成图片的有关设置请阅读: 96 | 97 | [wen-zi-zhuan-tu-pian.md](../wen-zi-zhuan-tu-pian.md "mention") 98 | 99 | 除此之外,你也可以在聊天窗口发送命令来切换响应模式,关于这部分的操作请阅读指令章节。 100 | 101 | 102 | 103 | ## 分段发送 104 | 105 | 有些时候,AI 生成回复所花费的时间过长。 为了避免长时间的等待,我们加入了分段发送功能。 106 | 107 | ```toml 108 | [response] 109 | 110 | # 分段发送延迟 111 | # 设置为 0 关闭分段发送功能 112 | buffer_delay = 15 113 | ``` 114 | 115 | 这个功能会每隔一段时间将 AI 生成的内容发送给用户,参数的单位为秒。 116 | 117 | 如果你要开启这个功能,建议把参数设置为 15 或以上,以免出现 BUG 和刷屏。 118 | 119 | 如果你把参数设置成 0,即表示关闭分段发送功能,消息会等待 AI 全部生成完毕以后再回复。 120 | 121 | 122 | 123 | ## 默认语言模型 124 | 125 | 你可以在配置文件中指定默认使用的语言模型。 126 | 127 | 默认情况下,程序会根据已经接入的语言模型设置,自动选择语言模型(不要钱的优先)。 128 | 129 | ```toml 130 | [response] 131 | 132 | default_ai = "chatgpt-web" 133 | ``` 134 | 135 | 可以填的参数: 136 | 137 | * `chatgpt-web`- 网页版 ChatGPT 138 | * `chatgpt-api` - API 版 ChatGPT (GPT3.5-turbo) 139 | * `bing-c` - New Bing (新必应对话风格-创造力) 140 | * `bing-p` - New Bing (新必应对话风格-精确) 141 | * `bing-b` - New Bing (新必应对话风格-平衡) 142 | * `bard` - Google Bard 143 | * `yiyan` - 百度 文心一言 网页版 144 | * `chatglm-api` - 清华 ChatGLM-API 接口 145 | * `xinghuo` - 讯飞星火模型 146 | * `poe-sage` - POE Sage 模型 147 | * `poe-beaver` - POE GPT4 模型 148 | * `poe-claude2` - POE Claude2 模型 149 | * `poe-claude` - POE Claude 模型 150 | * `poe-chatgpt` - POE ChatGPT 模型 151 | * `poe-nutria` - POE Dragonfly 模型 152 | 153 | ## 引用发送的消息 154 | 155 | 你可以设置机器人在回复时引用发送的消息,方便定位上下文。 156 | 157 | ```toml 158 | [response] 159 | 160 | quote = true 161 | ``` 162 | 163 | ## 消息排队 164 | 165 | 因为聊天是有上下文的,机器人必须一条一条地处理发送过来的消息,才能保证上下文的连贯性。 166 | 167 | 当消息发送过多,机器人还没来得及反应时,后来的消息会加入到一个队列中等待。 168 | 169 | ```toml 170 | [response] 171 | 172 | # 等待处理的消息的最大数量,如果要关闭此功能,设置为 0 173 | max_queue_size = 10 174 | 175 | # 队列满时的提示 176 | queue_full = "抱歉!我现在要回复的人有点多,暂时没有办法接收新的消息了,请过会儿再给我发吧!" 177 | 178 | # 新消息加入队列会发送通知的长度最小值 179 | queued_notice_size = 3 180 | 181 | # 新消息进入队列时,发送的通知。 queue_size 是当前排队的消息数 182 | queued_notice = "消息已收到!当前我还有{queue_size}条消息要回复,请您稍等。" 183 | ``` 184 | 185 | ## 消息等待 186 | 187 | 如果语言模型太久没有响应,机器人可以发送一段消息安抚用户。 188 | 189 | ```toml 190 | [response] 191 | 192 | # 发送下面那个提醒之前的等待时间 193 | timeout = 30.0 194 | 195 | # 超过响应时间时要发送的提醒 196 | timeout_format = "我还在思考中,请再等一下~" 197 | 198 | max_timeout = 600 199 | # 对于每个提问的最长等待时间,超过此时间不再等待 200 | 201 | cancel_wait_too_long = "啊哦,这个问题有点难,让我想了好久也没想明白。试试换个问法?" 202 | # 超过最长等待时间后发送的信息 203 | ``` 204 | 205 | 当超过最长等待时间时,机器人会取消这次语言模型的生成请求。 206 | 207 | ## 其他消息提示 208 | 209 | ```toml 210 | [response] 211 | 212 | # 匹配指令成功但没有对话内容时发送的消息 213 | placeholder = "您好!我是 Assistant,一个由 OpenAI 训练的大型语言模型。我不是真正的人,而是一个计算机程序,可以通过文本聊天来帮助您解决问题。如果您有任何问题,请随时告诉我,我将尽力回答。\n如果您需要重置我们的会话,请回复`重置会话`。" 214 | 215 | # 发生错误时要发送的消息 216 | error_format = "出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚会话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n{exc}" 217 | 218 | # 发生网络错误时发送的消息,请注意可以插入 {exc} 作为异常占位符 219 | error_network_failure = "网络故障!连接 OpenAI 服务器失败,我需要更好的网络才能服务!\n{exc}" 220 | 221 | # OpenAI 账号登录失效时的提示 222 | error_session_authenciate_failed = "身份验证失败!无法登录至 ChatGPT 服务器,请检查账号信息是否正确!\n{exc}" 223 | 224 | # OpenAI 提示 Too many requests(太多请求) 时的提示 225 | error_request_too_many = "糟糕!当前收到的请求太多了,我需要一段时间冷静冷静。你可以选择“重置会话”,或者过一会儿再来找我!\n{exc}" 226 | 227 | # 服务器提示 Server overloaded(过载) 时的提示 228 | error_server_overloaded = "抱歉,当前服务器压力有点大,请稍后再找我吧!" 229 | 230 | # 重置会话时发送的消息 231 | reset = "会话已重置。" 232 | 233 | # 回滚成功时发送的消息 234 | rollback_success = "已回滚至上一条对话,你刚刚发的我就忘记啦!" 235 | 236 | # 回滚失败时发送的消息 237 | rollback_fail = "回滚失败,没有更早的记录了!" 238 | ``` 239 | 240 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/hui-fu-nei-rong/bai-du-yun-hui-fu-shen-he.md: -------------------------------------------------------------------------------- 1 | # 百度云回复审核 2 | 3 | 如果你担心机器人发送的消息存在敏感内容导致封号,可以配置百度云审核。 4 | 5 |
[baiducloud]
 6 | 
 7 | # 是否启动百度云内容安全审核
 8 | check = false
 9 | 
10 | # 百度云API_KEY 24位英文数字字符串
11 | baidu_api_key = ""
12 | 
13 | # 百度云SECRET_KEY 32位的英文数字字符串
14 | baidu_secret_key =""
15 | 
16 | # 不合规消息自定义返回
17 | prompt_message = "[百度云]请珍惜机器人,当前返回内容不合规"
18 | 
19 | 20 | 你可以在这里注册百度云审核服务: 21 | 22 | {% embed url="http://console.bce.baidu.com/ai/#/ai/antiporn/overview/index" %} 23 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/README.md: -------------------------------------------------------------------------------- 1 | # 📎 接入 AI 平台 2 | 3 | 我们的一个程序实例可以接入多个 AI 平台。 4 | 5 | 我们所有的 AI 平台都支持多账号登录,你可以配置多种不同的 AI 平台,然后通过指令来进行切换。 6 | 7 | 以下面 OpenAI 的配置为例,添加多账号的写法如下: 8 | 9 | ```toml 10 | # OpenAI 相关设置 11 | [openai] # 这一行必写 12 | 13 | # 第 1 个 OpenAI 账号的登录信息 14 | [[openai.accounts]] # 这一行必须跟在 [openai] 的后面 15 | # 里面是一些设置 16 | 17 | # 第 2 个 OpenAI 账号的登录信息 18 | [[openai.accounts]] 19 | # 里面是一些设置 20 | 21 | # 第 3 个 OpenAI 账号的登录信息 22 | [[openai.accounts]] 23 | # 里面是一些设置 24 | ``` 25 | 26 | ### 接入 OpenAI 27 | 28 | {% content-ref url="jie-ru-openai-de-chatgpt.md" %} 29 | [jie-ru-openai-de-chatgpt.md](jie-ru-openai-de-chatgpt.md) 30 | {% endcontent-ref %} 31 | 32 | ### 接入 New Bing (Sydney) 33 | 34 | {% content-ref url="jie-ru-new-bing-sydney.md" %} 35 | [jie-ru-new-bing-sydney.md](jie-ru-new-bing-sydney.md) 36 | {% endcontent-ref %} 37 | 38 | ### 接入 Google Bard 39 | 40 | {% content-ref url="jie-ru-google-bard.md" %} 41 | [jie-ru-google-bard.md](jie-ru-google-bard.md) 42 | {% endcontent-ref %} 43 | 44 | ### 接入 ChatGLM 45 | 46 | {% content-ref url="jie-ru-chatglm.md" %} 47 | [jie-ru-chatglm.md](jie-ru-chatglm.md) 48 | {% endcontent-ref %} 49 | 50 | ### 接入 文心一言 51 | 52 | {% content-ref url="jie-ru-wen-xin-yi-yan.md" %} 53 | [jie-ru-wen-xin-yi-yan.md](jie-ru-wen-xin-yi-yan.md) 54 | {% endcontent-ref %} 55 | 56 | ### 接入 Poe.com 57 | 58 | {% content-ref url="jie-ru-poe.com.md" %} 59 | [jie-ru-poe.com.md](jie-ru-poe.com.md) 60 | {% endcontent-ref %} 61 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-chatglm.md: -------------------------------------------------------------------------------- 1 | # 🧑🎓 接入 ChatGLM 2 | 3 | ChatGLM 是由清华开源的离线语言模型,你可以用自己的服务器来运行语言模型。 4 | 5 | ChatGLM 的设置开始于一行 `[chatglm]` ,随后每个账号的设置开始于一行 `[[chatglm.accounts]]`。 6 | 7 | **API 访问** 8 | 9 | 我们使用 ChatGLM 项目中 `api.py` 所提供的 Web API 来访问 ChatGLM。 10 | 11 | ```toml 12 | [[chatglm.accounts]] 13 | # ChatGLM 的接口地址,搭建方法见下 14 | api_endpoint = "http://127.0.0.1:8000" 15 | # 最大记忆的对话轮数 16 | max_turns=10 17 | # 请求超时时间(单位:秒) 18 | timeout=360 19 | ``` 20 | 21 | **API 搭建方法** 22 | 23 | ```bash 24 | # 下载项目 25 | git clone https://github.com/THUDM/ChatGLM-6B.git 26 | cd ChatGLM-6B 27 | # 安装依赖 28 | pip install -r requirements.txt 29 | pip install fastapi uvicorn 30 | # 启动 31 | python api.py 32 | ``` 33 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-claude.md: -------------------------------------------------------------------------------- 1 | # 🥸 接入 Claude 2 | 3 | Claude 是由前 OpenAI 成员创立的 Anthropic 公司研发的一款 AI。 4 | 5 | 目前有两种使用 Claude 的方法:通过 Slack 或者 通过 Poe.com,此处介绍通过 Slack 的方法。 6 | 7 | ### 0x01 准备工作 8 | 9 | 为了在 Slack 中使用 Claude,你需要有一个 Slack 账号、一个邀请了 Claude 的频道,并且你可以正常和 Claude 进行交流。 10 | 11 | 如果你没有的话,可以参考这个教程来准备: 12 | 13 | {% embed url="https://juejin.cn/post/7221333266594676795" %} 14 | 15 | ### 0x02 获取 access\_token 16 | 17 | 点击下面这个链接,安装一个 App 到你的工作区中。 18 | 19 | {% embed url="https://chatgpt-proxy.lss233.com/claude-in-slack/login" %} 20 | 21 | 安装成功后,页面中会出现一串代码,记下它,这是你稍后会用到的 `access_token` 。 22 | 23 | ### 0x03 获取 channel\_id 24 | 25 | 按照以下步骤获取 `channel_id`: 26 | 27 |
28 | 29 | 你需要将 Claude 和 Claude-Interactor 同时拉入频道,才能正常收发消息。 30 | 31 |
32 | 33 | ### 0x04 获取 Claude 的识别码 34 | 35 | 一些用可能会遇到发消息时无法 @claude 变蓝的情况,所以我们还需要完成这一步。 36 | 37 | 你需要按照下图的方式获取识别码: 38 | 39 |
40 | 41 | 通常来说 Claude 的识别码都是以 `U0` 开头的。 42 | 43 | ### 0x05 编写配置文件 44 | 45 | 在 `config.cfg` 中加入以下配置项,添加相关信息: 46 | 47 | ```toml 48 | [slack] 49 | [[slack.accounts]] 50 | channel_id = "C0XXXXXX:U0xxx" # 这里写你获得的 channel_id:Claude 的识别码 51 | access_token = "XXXX" # 这里写前面获得的 access_token 52 | 53 | 54 | ``` 55 | 56 | ## 相关设置 57 | 58 | **1.使用代理** 59 | 60 | 这项设置是每个账号独立的。 61 | 62 | 参考: [#4.-shi-yong-dai-li](jie-ru-openai-de-chatgpt.md#4.-shi-yong-dai-li "mention") 63 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-google-bard.md: -------------------------------------------------------------------------------- 1 | # 🤹 接入 Google Bard 2 | 3 | Google Bard 是我们支持的第三个 AI 模型。 4 | 5 | Bard 的设置开始于一行 `[bard]` ,随后每个账号的设置开始于一行 `[[bard.accounts]]`。 6 | 7 | ## Cookie 登录 8 | 9 | 截止至当前最新的版本, Bard 仅支持通过 Cookie 的方式登录。 10 | 11 | ```toml 12 | [[bard.accounts]] 13 | cookie_content = 'xxx' 14 | 15 | ``` 16 | 17 | Bard Cookie 获取方法:[Wiki](https://github.com/lss233/chatgpt-mirai-qq-bot/wiki/Bard-Cookie-%E8%8E%B7%E5%8F%96%E6%96%B9%E6%B3%95) 18 | 19 | ## 相关设置 20 | 21 | **1.使用代理** 22 | 23 | 这项设置是每个账号独立的。 24 | 25 | Bard 目前仅允许美国的 IP 访问,所以你很有可能需要设置代理。 26 | 27 | 参考: [#4.-shi-yong-dai-li](jie-ru-openai-de-chatgpt.md#4.-shi-yong-dai-li "mention") 28 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-new-bing-sydney.md: -------------------------------------------------------------------------------- 1 | # 😅 接入 New Bing (Sydney) 2 | 3 | New Bing 是我们支持的第二个 AI 模型。 4 | 5 | Bing 的设置开始于一行 `[bing]` ,随后每个账号的设置开始于一行 `[[bing.accounts]]`。 6 | 7 | ## Cookie 获取方法 8 | 9 | 截止至当前最新的版本, Bing 仅支持 Cookie 的方式登录。 10 | 11 | 你需要通过电脑浏览器来获得 Bing Cookie,Firefox 请安装[此插件](https://addons.mozilla.org/en-US/firefox/addon/cookie-editor/),Chrome / Edge 安装[此插件](https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm)。 12 | 13 | 1. 切换到国外节点 14 | 2. 打开 https://bing.com 15 | 3. 点开插件 16 | 4. 点击下方的 Export 按钮,然后选 Export as JSON 17 | 18 | ![](<../../.gitbook/assets/image (37).png>) 19 | 5. 打开下面这个网站,把 JSON 粘贴进去变成一行,然后复制出来: 20 | 21 | {% embed url="https://jsonformatter.org/json-minify" %} 22 | 23 |
24 | 25 | 6\. 把最终的结果填入配置文件: 26 | 27 |
28 | 29 | {% hint style="info" %} 30 | 需要注意的是,这里用了单引号来包裹 JSON。 31 | {% endhint %} 32 | 33 | ```toml 34 | [[bing.accounts]] 35 | cookie_content = '你的结果' 36 | ``` 37 | 38 | ## 相关设置 39 | 40 | ### 1.使用代理 41 | 42 | 这项设置是每个账号独立的。 43 | 44 | 根据社区反馈,中国大陆的 IP 可能无法直接使用 Bing,具体表现为登录失败,提示:**Authentication failed. You have not been accepted into the beta**。 45 | 46 | 所以我们建议使用国外的 IP。 47 | 48 | 参考: [#4.-shi-yong-dai-li](jie-ru-openai-de-chatgpt.md#4.-shi-yong-dai-li "mention") 49 | 50 | ### 2.Bing 的接入点 51 | 52 | {% hint style="info" %} 53 | 这项设置是全局生效的(所有账号只需要设置一次)。 54 | {% endhint %} 55 | 56 | 除了使用代理之外,你还可以通过设置 Bing 接入点的方式来使用 Bing。 57 | 58 | 你可以使用这个项目来搭建接入点:https://github.com/acheong08/EdgeGPT-Proxy 59 | 60 | 下面是默认的配置: 61 | 62 | ```toml 63 | [bing] 64 | 65 | # Bing 的 WS 接入点,通常不需要修改 66 | wss_link = "wss://sydney.bing.com/sydney/ChatHub" 67 | # 会话创建的接入点 68 | bing_endpoint = "https://edgeservices.bing.com/edgesvc/turing/conversation/create" 69 | ``` 70 | 71 | 如果你访问 Bing 出现问题,可以用下面的接入点配置: 72 | 73 | {% hint style="info" %} 74 | 警告: 75 | 76 | 使用第三方接入点时,你的 Bing Cookie 将会被发送至接入点服务器。 77 | 78 | 这会让你的微软账号信息有泄露的风险,请知晓。 79 | {% endhint %} 80 | 81 | ```toml 82 | [bing] 83 | 84 | wss_link = "wss://chatgpt-proxy.lss233.com/sydney/ChatHub" 85 | # 会话创建的接入点 86 | bing_endpoint = "https://chatgpt-proxy.lss233.com/edgesvc/turing/conversation/create" 87 | ``` 88 | 89 | ### 3.关闭 Bing 的引用链接、猜你想问和剩余次数 90 | 91 | {% hint style="info" %} 92 | 这项设置是全局生效的(所有账号只需要设置一次)。 93 | {% endhint %} 94 | 95 | 如果你觉得这两个东西有点烦,可以关闭他们。 96 | 97 | ```toml 98 | [bing] 99 | 100 | # 在 Bing 的回复后加上猜你想问 101 | show_suggestions = false 102 | # 在 Bing 的回复前加上引用资料 103 | show_references = false 104 | # 在 Bing 的回复后加上剩余次数 105 | show_remaining_count = false 106 | ``` 107 | 108 | ### 4. 开启 Bing 画图功能 109 | 110 | {% hint style="info" %} 111 | 这项设置是全局生效的(所有账号只需要设置一次)。 112 | {% endhint %} 113 | 114 | 如果你想使用 Bing 画图功能,那么你可以这样开启它: 115 | 116 | ```toml 117 | [bing] 118 | 119 | # 开启 Bing 画图功能 120 | use_drawing = true 121 | ``` 122 | 123 | 提示:如果你配置了 Stable Diffusion,那么你需要删除那部分配置,才能触发 Bing 画图。 124 | 125 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-openai-de-chatgpt.md: -------------------------------------------------------------------------------- 1 | # 🤨 接入 OpenAI 的 ChatGPT 2 | 3 | OpenAI 的 ChatGPT 是我们最早支持的语言模型。 4 | 5 | ChatGPT 分为两种,一种是网页版,另一种是 API 版。 6 | 7 | OpenAI 的设置开始于一行 `[openai]` ,随后每个账号的设置开始于一行 `[[openai.accounts]]`。 8 | 9 | ## **👨🏻‍💻 接入网页版 OpenAI ChatGPT** 10 | 11 | 网页版即使用 `https://chat.openai.com` 里的 ChatGPT。 12 | 13 | **优点**:更聪明、不花钱 14 | 15 | **缺点**:一次只能回复一个人、可能会封号 16 | 17 | 我们提供了多种不同的方式登录网页版,你可以选择你觉得最好用的那一种。 18 | 19 | ### **登录方式一:access\_token** 20 | 21 | 这种登录方式被认为是最简单的登录方式。 22 | 23 | 你只需要在 `[openai]` 的后面加入这一段: 24 | 25 | ```toml 26 | # 第 N 个 OpenAI 账号的登录信息ml 27 | [[openai.accounts]] 28 | access_token = "一串 ey 开头的东西" 29 | ``` 30 | 31 | **access\_token 获取方法:** 32 | 33 | 1. 浏览器打开并登录登录 ChatGPT 34 | 2. 打开 [https://chat.openai.com/api/auth/session](https://chat.openai.com/api/auth/session) 35 | 3. 你可以看见下面一段 JSON 代码: 36 | 37 | ```json 38 | { 39 | "user": { 40 | "id": "user-*****", 41 | "name": "***", 42 | "email": "***", 43 | "image": "***", 44 | "picture": "***", 45 | "groups": [] 46 | }, 47 | "expires": "2023-03-18T09:11:03.546Z", 48 | "accessToken": "eyJhbGciOiJS*****X7GdA" 49 | } 50 | ``` 51 | 52 | 4. 提取出这段代码中的 `"eyJhbGciOiJS*****X7GdA"` ,填写到配置文件中即可。 53 | 5. accessToken 的有效期为 14 天,到期后需要使用同样的方法进行更换。 54 | 55 | ### **登录方式二:邮箱密码** 56 | 57 | 邮箱密码登录的方式可以解决 accessToken 过期的问题。 58 | 59 | 如果你要用这种方法,只要这么写: 60 | 61 | ```toml 62 | # 第 N 个 OpenAI 账号的登录信息 63 | [[openai.accounts]] 64 | # 你的 OpenAI 邮箱 65 | email = "xxxx" 66 | # 你的 OpenAI 密码 67 | password = "xxx" 68 | ``` 69 | 70 | ### **相关设置** 71 | 72 | 在设置账号之后,你还可以为每个账号进行一些不同的设置。 73 | 74 | #### **1. 网页版接入点** 75 | 76 | {% hint style="info" %} 77 | 这项设置是全局生效的(所有账号只需要设置一次)。 78 | {% endhint %} 79 | 80 | 我们通过一种特殊的方法访问 OpenAI 的网页版 ChatGPT,这需要我们指定一个网页版的接入点。 81 | 82 | 你可以用这个项目搭建一个自己的接入点:[https://github.com/linweiyuan/go-chatgpt-api](https://github.com/linweiyuan/go-chatgpt-api) 83 | 84 | ```toml 85 | [openai] 86 | # 网页版 ChatGPT 接入点,欢迎在交流群中分享你的接入点 87 | browserless_endpoint = "https://chatgpt-proxy.lss233.com/api/" 88 | ``` 89 | 90 | #### **2. 对话记录自动删除** 91 | 92 | {% hint style="info" %} 93 | 这项设置是每个账号独立的。 94 | {% endhint %} 95 | 96 | 开启后,当用户重置会话时,旧的会话会自动删除。 97 | 98 | ```toml 99 | [[openai.accounts]] 100 | # 省略的账号信息 101 | 102 | auto_remove_old_conversations = true 103 | ``` 104 | 105 | #### **3.会话标题重命名** 106 | 107 | {% hint style="info" %} 108 | 这项设置是每个账号独立的。 109 | {% endhint %} 110 | 111 | 开启后,当用户创建新的会话时,会根据设置中的规则来修改会话的标题。 112 | 113 | ```toml 114 | [[openai.accounts]] 115 | # 省略的账号信息 116 | ​ 117 | title_pattern="qq-{session_id}" 118 | ``` 119 | 120 | 当你按照这个格式进行设置之后,新创建的对话将会以 `qq-friend-好友QQ` 或 `qq-group-群号` 进行命名。 121 | 122 | 这里的 `{session_id}` 是一个变量,它在程序启动之后会根据聊天信息的发送者动态变化。 123 | 124 | * 如果是一个好友给机器人发送消息,则 `{session_id}` 会变成 `qq-friend-好友QQ` 125 | * 如果是一个群聊给机器人发送消息,则 `{session_id}` 会变成 `qq-group-群号` 126 | 127 | #### **4.使用代理** 128 | 129 | {% hint style="info" %} 130 | 这项设置是每个账号独立的。 131 | {% endhint %} 132 | 133 | 由于 OpenAI 现在封锁了中国大陆的 IP 请求,因此我们建议在国内部署的同学都使用代理访问。 134 | 135 | ```toml 136 | [[openai.accounts]] 137 | # 省略的账号信息 138 | 139 | # 这里填写的内容由你的代理程序提供 140 | proxy="http://127.0.0.1:1080" 141 | ``` 142 | 143 | 如果你不填写代理设置,程序在启动时会使用系统代理中的设置。 144 | 145 |
146 | 147 | 【小白专享】怎么看代理程序提供的地址 148 | 149 | 通常来说你的电脑上需要装一个叫做 Clash 或者 v2rayN 的软件,不同的软件看法不同。 150 | 151 | 我们要填写的是你电脑上通过这些代理软件提供的代理地址,而不是你的代理**节点地址**。 152 | 153 | ### v2rayN 154 | 155 | 156 | 157 | 你的地址就填 `http://127.0.0.1:10808` ,其中 `10808` 这个数字要改成图中红框标出的两个数字中的一个。 158 | 159 | ### Clash 160 | 161 | ![](<../../.gitbook/assets/image (38).png>) 162 | 163 | 你的地址就填 `http://127.0.0.1:7890`,其中 `7890`这个数字要改成图中红框标出的数字。 164 | 165 | ### 其他软件 166 | 167 | 你的软件应该会提供类似的端口号。如果你实在找不到的话可以问问客服,或者还有一种方法: 168 | 169 | 把有关代理的配置全部删除,然后在代理软件上开启全局模式。 170 | 171 | 172 | 173 |
174 | 175 | > Docker 部署的用户请注意:你可能需要把 127.0.0.1 修改为宿主机的 IP 地址,以使用宿主机中运行的代理程序。 176 | 177 | #### **5. 切换模型** 178 | 179 | {% hint style="info" %} 180 | 这项设置是每个账号独立的。 181 | {% endhint %} 182 | 183 | 如果你使用的是 ChatGPT Plus 的账号,那么你可以选择使用 ChatGPT Plus 专享的模型。 184 | 185 | ```toml 186 | [[openai.accounts]] 187 | # 省略的账号信息 188 | 189 | # 如果你是 Plus 用户,加入这一条,否则无法切换至 plus 模型 190 | paid=true 191 | # 这里填写的内容由你的代理服务器提供 192 | model="text-davinci-002-render-paid" 193 | ``` 194 | 195 | 你可以使用这三种: 196 | 197 | * `text-davinci-002-render-sha` - 默认的模型 198 | * `text-davinci-002-render-paid` - Legacy 模型(Plus 专享) 199 | * `gpt-4` - GPT 4 模型(Plus 专享) 200 | 201 | *** 202 | 203 | ## **💲 接入 API 版 OpenAI ChatGPT** 204 | 205 | **优点**:更快、可以设置参数、可以同时回复多个人、不封号 206 | 207 | **缺点**:花钱 208 | 209 | ```toml 210 | [[openai.accounts]] 211 | # 这里填写你在 OpenAI 官网获取的 API Key 212 | api_key = "sk-xxxx" 213 | ``` 214 | 215 | ### **相关设置** 216 | 217 | #### **1.API 版接入点** 218 | 219 | {% hint style="info" %} 220 | 这项设置是全局生效的(所有账号只需要设置一次)。 221 | {% endhint %} 222 | 223 | 正如网页版接入点一样,如果你所在的网络环境不能直接访问 OpenAI 的 API 接入点,可以通过搭建一个反向代理来访问它,然后在这里指定代理后的接入点地址。 224 | 225 | 你可以使用这个项目来搭建代理:[https://github.com/Ice-Hazymoon/openai-scf-proxy](https://github.com/Ice-Hazymoon/openai-scf-proxy) 226 | 227 | ```toml 228 | [openai] 229 | # API 接入点,欢迎在交流群中分享你的接入点 230 | api_endpoint = "https://api.openai.com/v1" 231 | ``` 232 | 233 | #### **2.模型参数** 234 | 235 | {% hint style="info" %} 236 | 这项设置是全局生效的(所有账号只需要设置一次)。 237 | {% endhint %} 238 | 239 | 如果你觉得默认的 API 回复有些生硬,那么你可以通过调整 GPT 的参数来优化。 240 | 241 | 参数具体含义可以见: [https://platform.openai.com/docs/api-reference/completions/create](https://platform.openai.com/docs/api-reference/completions/create) 242 | 243 | ```toml 244 | [openai.gpt3_params] 245 | temperature = 0.5 246 | max_tokens = 4000 247 | top_p = 1.0 248 | presence_penalty = 0.0 249 | frequency_penalty = 0.0 250 | min_tokens = 1000 251 | ``` 252 | 253 | #### **3.使用代理** 254 | 255 | {% hint style="info" %} 256 | 这项设置是每个账号独立的。 257 | {% endhint %} 258 | 259 | 参考: [#4.-shi-yong-dai-li](jie-ru-openai-de-chatgpt.md#4.-shi-yong-dai-li "mention") 260 | 261 | #### **4. 默认模型** 262 | 263 | {% hint style="info" %} 264 | 这项设置是每个账号独立的。 265 | {% endhint %} 266 | 267 | 如果你想切换默认使用的模型,可以加入下面的配置。 268 | 269 | ```toml 270 | [[openai.accounts]] 271 | # 省略的账号信息 272 | 273 | model="gpt-3.5-turbo" 274 | ``` 275 | 276 | 你可以使用这三种: 277 | 278 | * `gpt-3.5-turbo` - GPT 3.5 模型 279 | * `gpt-4` - GPT 4 模型 280 | 281 | 后续官方有出新的模型,也可以直接写在里面使用。 282 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-poe.com.md: -------------------------------------------------------------------------------- 1 | # 👨🎨 接入 Poe.com 2 | 3 | Poe 是由 Quora 提供的 AI 对话平台,在这里你可以免费使用上述各种有门槛的语言模型。 4 | 5 | Poe 的设置开始于一行 `[poe]` ,随后每个账号的设置开始于一行 `[[poe.accounts]]`。 6 | 7 | ## Cookie 登录 8 | 9 | 截止至当前最新的版本, Poe 仅支持通过 Cookie 的方式登录。 10 | 11 | 我们只需要 Cookie 中的 `p-b` 字段。 12 | 13 | ```toml 14 | [[poe.accounts]] 15 | # 登陆 poe.com 网站后,通过开发者工具查看Cookie获取 16 | p_b = "V4j***" 17 | ``` 18 | 19 | **`p-b` 字段获取方法** 20 | 21 | 你需要通过电脑浏览器来获得 Poe Cookie,如果你有别的手段能获得 cookie 的话也是可以的。 22 | 23 | 1. 确认能科学上网 24 | 2. 打开 https://poe.com 并登陆 25 | 3. 按下 F12,打开开发者工具(DevTools) 26 | 4. 找到 `应用程序 - 存储` 或 `应用 - 存储` 或 `存储`, 查看Cookie下 https://poe.com 域名下的 "p-b" 27 | 5. 复制值即可 28 | 29 | ## 相关设置 30 | 31 | ### 1.使用代理 32 | 33 | 这项设置是每个账号独立的。 34 | 35 | 参考: [#4.-shi-yong-dai-li](jie-ru-openai-de-chatgpt.md#4.-shi-yong-dai-li "mention") 36 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-wen-xin-yi-yan.md: -------------------------------------------------------------------------------- 1 | # 🤣 接入 文心一言 2 | 3 | 文心一言的设置开始于一行 `[yiyan]` ,随后每个账号的设置开始于一行 `[[yiyan.accounts]]`。 4 | 5 | ## 网页版 Cookie 登录 6 | 7 | 截止至当前最新的版本, 仅支持通过 Cookie 的方式使用网页版文心一言。 8 | 9 | > 请注意:该方法有封号风险(但是过一段时间就会解封),具体原因未知,请自行取舍。 10 | 11 | ```toml 12 | [[yiyan.accounts]] 13 | BDUSS='xxxxxx' 14 | BAIDUID='xxxxxx' 15 | ``` 16 | 17 | Cookie 获取方法:[Wiki](https://github.com/lss233/chatgpt-mirai-qq-bot/wiki/%E6%96%87%E5%BF%83%E4%B8%80%E8%A8%80-Cookie-%E8%8E%B7%E5%8F%96%E6%95%99%E7%A8%8B) 18 | 19 | ## 相关设置 20 | 21 | **1.使用代理** 22 | 23 | 这项设置是每个账号独立的。 24 | 25 | 参考: [#4.-shi-yong-dai-li](jie-ru-openai-de-chatgpt.md#4.-shi-yong-dai-li "mention") 26 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-xun-fei-xing-huo-da-mo-xing.md: -------------------------------------------------------------------------------- 1 | # ⭐ 接入 讯飞星火大模型 2 | 3 | 讯飞的星火大模型申请当场通过。 4 | 5 | 星火模型的设置开始于一行 `[xinghuo]` ,随后每个账号的设置开始于一行 `[[xinghuo.accounts]]`。每个账号填写 `ssoSessionId` 即可使用。 6 | 7 | ```toml 8 | [[xinghuo.accounts]] 9 | # 必填 10 | ssoSessionId = "xxxxx-xxxx-xxxx-xxxxx" 11 | 12 | # 保持固定即可,也可以自己抓包获取 13 | GtToken = "R0VFAAYyNDAzOTU0YzM5Y2M0ZTRlNDY2MTE2MDA4ZGZlYjZjMGQzNGMyMGY0YjQ1NTA1NDg3OWQ0ZWJlOTk0NzQxNGI1MWUzM2IzZDUyZTEyMGM3MWYxNjlmNWY2YmYwMWMxNDI2YzIxOTlmZjMzYTI5YmY3YjQ1M2RjZGQwZWNjMDdiYjMzMmY4OTE2OTRhYTk1OWIyZWVlNzFjNmI5ZWFmY2MxNDFkNjk2MWYzYWQ3ZDAyYjZkM2U0YTllYWZlOTM0Njc4NmMyZmQ4NTRiYWViMTI2NjhlZmFhMWRiNmRmMDc5MzQxN2EyYzMzZDhiN2M4NzJjMzQ3YTYwNDFiMGZkZjkxN2Q2OTRlOWFiZWMwN2U0ZTg3Y2UwM2UxNDlmODBjMzA0MmE4NTAyNzhiNjU0MTU3ZjBlMmMzN2UxMTQ0MjA3ZWE0MDIzZTMyNDRiMjJmMjcwYjE5NGZiMWJhMmFlNGQ4YzkxMWNmZmQ0OGQzYzBlYmQxMTk1ZjE5MDJmMTVjNWUyMDI3ZmNmMDI0ODIxYWJiMWZhNzc3MTExOTBiZmZhMWRhYmRlYzVhYTkwMGRlMjU2YjFhNGQ4ZGYwYzQ0ZjI4MGJiNzcyNGIyOTlkYjU0ZGMyYjllY2U1NjNlYjQzZWE5MzhkMmQ3NTFjMTVkMGY0NDNkYjdhNzdlMmQ4NzM1NTQ3NDI0ZDBjNzRmMTA0NzY4NmI2M2UwZWRiMDM0ZjNhODc1NGZkYjgxMDBlNDA0MmZlZDYzZmFlYmYyNTExMTI5NTIyOTg0ZDMzN2UxYTBhN2NiZWZlZGMxOTVjOWQ2MGVhOTMyY2E5M2VhYmZkODI1YjBiMzU0ZDViYzUzMmM5YzI5NjA2ZWU3MmFmNGYwNGRkNTlhNDEzYzJiZmYyODllZjBkNWJlNWU5ZjZkZWVlMjk4MDUyMTU2OTQwNzE3ZDQ5M2NlM2E4YmIwN2YyZjE4MzgzZmEwNjQxNGZlYmFlNzdmN2QwNTZlYTQ3NDEwMmNlZjU1YmZhNjNjMDM2MmI5OTU2NjBkZjg4YzFjYzA2MmY0NjU2OTE0ZGIwMWE3ODQxNjA2YjdlZWE3ZDJjZTM4NjE5YTcwYjg0MmVkZTBmM2Y1MzI3ZGI2YmU5M2ZjYTNiMzg4OTJkOGQ3NWI4Y2M4YjQ3NjBkNDExZmQ3ZmFlNGIxY2YwMGE5ZDk2MmM2ZDYzMWE1YmRjNmYzMmU0Y2U5MDYwOGNiMDMzMTlkZGE2ZDlkMGU4OGUwMzUwMDkwZTQ5MGRhMmY5ODU1MGU4ZmQ1ODc3NmQ0Yjg5MDM1Y2FiNTg3MjMyMGMwOTJmOTUyODkwYmQ3YjIwYTMzODI5Y2MwY2VlZTE0MWY5N2FiN2IzYmJjNDg3MWM0M2E3ZTViYWNjZWZiZjg4MjM1ZDRiNWMzMjBjM2IxNGM2ZWE2NWVkZjc0OWI0ZDNlNzZjOWYyMTkwZDM0ZTVkYTZkNjM1NjFmZWNmMWYyODIxMTMyNjIyOGFjMWU0MTA2NjY1OWQ4Y2JlZTRmMjIwYzI2NjNmNzYxYzBhZGEyY2VkZjkyNDkzZWExNzFhN2NhZThiNTMxNDNmNzEzM2RhY2UyOWNmYjQ4ZTk5YzE2YjcyM2ZmZTJjZDk5MjU0NGM5OWNhOTFlMDRlMWNiNTQ5ZjU4MGQxY2I4YWU5MWU0MDlmZDZmYjhjNGYzYTRmODA2ZWFiZjRlMDI3OWJmOTM4NmQwN2I5MTBmYzlkYzNjMGM2ODIzYjg4OWFjNWZkZjBhYWNjYzNhYmU0MDRmMTg3Y2Q0MGNmMjcyNWFmY2VkYzAzYmVjZGY2MmMzNWRkNzQ5MGExYjQ1MDdlNTczNDI1OTliYTJhMjNmM2FmNDg1NGM3ODZkYzBiZWIzYTllMGEwYWUyMTllNmZhNzYyN2YyNTI5ZDc3YzQ3MGY1YzIxNzI1NzhhM2EwYzM3NzM0NTM4MTlhYjE3ODJiNmRmOGM1NTI2YjQzZjUzNTZlNDVhM2Q5MDc4N2IwZGNkZTdmYmYzM2ZkMWQ2NGY2NjdmOWYzNDIzZjJkMmU2NzgyMTY5ZWM3MTE1Y2E3MDdlYWRhOGJmNzI0OTJmMGM3Y2QxNjJjMDI4NmFjOThmNDhmOWEyYWQzZDAwYzg5YmViYzA3NTA4ZjYwYzE1OGVmYjk5ZjBkOGY4MzQ1ODI5Yzg4Yzc0YTA3OGQyZjU5NTFjNmQzNTc1N2QyNjI0NWVjNTk0Y2JkMzc2YmVhMGNiZmEzMWYwZTA5MGRhYzhlYzNlYjQ0ZGIxN2M4MWE5NWY4MTE4MDAwNDJkMjQ2MmMzMjk2ODU5Yjg3ZjRhZmI1MDYxM2MxY2FiYTZkZDI0ODdiZDQ3MmVmNzBjMzFkN2YwNjZmZTMxOThiYzFhOWFlZjIwZTQzY2FlNDBkMDkxZWEzMmNiYTBhNDM0YmQ2ZDU2NDQ3YTU4YTNjODZjYTk0NjQ3MGNiZjM4ZjM3ZjU2YTZkZmQ4MDY0OWEyZGU3MzllN2EyZWE3M2RlNDE5NDljNmI4ODU2YmE5ZTM4Njc2YmRhNzA1MWE5MjlmMWU1YTczZjEwYTg2ZjgwNDJjZDQxZTMwYjVjMTA1ODYzNzlhMGY3NmRlOWExODZiZmU2N2Y5NzZhOTY3MTg0ZjNkYmFhYWU0YjdmNmFlMjM5MTlkNDljNDNiODc4MzRjMjA0MzY4YThkOGEyYzRkNjc3MzhkMTU0NmFiNTVjMWE0YTQ0Y2M3MzE5OGM4Y2YzOTAxZGI0ZGY1MzFmNGY5NTI4MDE5MjZjN2I2MDg1YjQzODI0YmFiMTQ3NTIxZTYwNWQzYzhmZjljYjNmOTRlNzg3MDJiYzc1MzE4NTRhN2M3ZDE2OWQyMzcyYjUzMDBhNGQzNzhhYWNjOTk3ZDM1ZTZjODYwZGQwMWNlYTMwZjU1YTFlMjQxMTMxMTQwZjQwMWJmZGJkNWU3NzA4OWE5YzljNDIzY2E2ODk3OGE2ODMwYWEzYTlkZGJiZmMyYTE3NGZhOTc4NmI3ZTYyYmIzNTZlNjRiMzBiYzI4ZDMyYTVjMDMxYzgxZjZlOGEyMGMwNWFlNjJlYWM2ZWExNDY5OTFiZjk1Yzc4NzQzMjMwYTIyNzk1MWRlMzI4NjFjYjU5ZGQ3N2QxOWQ5MTMxNDgwYmY2ZTgyYTkwNzgwMTBlYjAzMzIzYjcxNGY0NzM5NDNmY2MwNTM3ODJmOTIwMGFkNzlmNzZiNjkxNDdmZGQwOTdhZTUwMTk1YjE4M2Q2YWM5NjVmN2NkNDNhMGI3MTEwOTNkZTM5NGM3OTYwNjNlNTBhMDAyNzNkOTE2MzQzODY2MzFkZThkMzViYTUxNmI4MTIyZWZjNzE5MTU0OTQ2NTIyYzc0YjhmNTY2OTMwZDM3YmIwZjJkM2Q4ODgyZGQwZTU0YTcyODM1NmYyZDk2ZWVlNzZiYmZlYjI1YTFjM2ZhNTg5OGY5OTM0YTc4NTBjYzRlNjY4NjE5YWMzOTg2MmE5NDhjMDVhMTc0MzE0MjIwOGFhMjk5OGY2ZmIwMmZlZWI2YTk0M2Q1NzcyN2JhZWU4ZmY5NGFmZjgzZGVjMTUyZmYxOWVkYmM1Y2RiZDkzYzBiNDc1OTEzMjFhYTY4MjI1MDA4ODhmYWJhMzAzNjdlZmRjYmJjNzhjYzE5MWI1MDViNTlmMjBhY2RiYTYzMzQyYzE1YTI2M2NiOGE1NDQ3NzQ4ODU3YWYxMzllMDJlMzY0ODlkNjRlNTRiMTc5YTgwOGRmMWU5YTk1ODY2YzE2YTYzM2EyZmUyYjA2MzM4OTI5YTc4MmRlMGFkZDgwZDZiYWU3Y2M1ZjljMWEzYzA5MGU4MTVlNjc2MGJjMzA0ZWU3ZmY1MDM5OGRiNDc0YTJkNWMzYWVhNTMxZjc0ZDU3NGNhZGNhZTIzZmZiZjcyY2FhNmU5YTNjNjFhYzNiMDJjNDdjYzQzZGJhYjA2NTgwNTkyZmE5YjMyNGMxMGJhMGRjNjgzZWIyYzRiNDg4NzFiMjk2YmIxNDBhMWUyZWRlOTE0NmY3MThkZTE4ZWU0M2QwZTk4NWY3NWQ1YWYyYjlkNjU5ODM5YzQwZWFiMzg2" 14 | # 可以不填,如果经常出现验证码可以填下试试 15 | fd = "" 16 | ``` 17 | 18 | ## ssoSessionId 获取方法 19 | 20 | 1. 打开星火模型官网,然后登录:[https://xinghuo.xfyun.cn/](https://xinghuo.xfyun.cn/) 21 | 2. 登录完成后,点击[这里](https://xinghuo.xfyun.cn/)回到首页。 22 | 3. 按下 F12,打开开发人员工具(DevTools),点 应用(Application),在左边找到 Cookie 23 | 4. 找到 `ssoSessionId` 复制它的值即可。 24 | 25 |
26 | 27 | ## GtToken、fd 获取方法 28 | 29 | 可以参考:[https://github.com/dfvips/xunfeixinghuo/issues/1](https://github.com/dfvips/xunfeixinghuo/issues/1) 30 | 31 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/wan-zheng-pei-zhi-wen-jian-yang-li.md: -------------------------------------------------------------------------------- 1 | # 📰 完整配置文件样例 2 | 3 | 我们只有一个配置文件: `config.cfg` 。 4 | 5 | 以下是 config.cfg 的样例,你不必完全参考它的写法,这只是告诉你它可以怎么写: 6 | 7 | ```toml 8 | # 这里是 ChatGPT for QQ 的所有配置文件 9 | # 请注意:以 "#" 开头的文本均为注释 10 | # 不会被程序读取 11 | # 如果你想要使用某个设置,请确保前面没有 "#" 号 12 | [mirai] 13 | # Mirai 相关设置 14 | 15 | qq = 请填写机器人的 QQ 号,不要加引号 16 | 17 | manager_qq = 请修改为机器人管理员的QQ号,不要加引号 18 | 19 | # 以下设置如果不懂 无需理会 20 | 21 | api_key = "1234567890" # mirai-http-api 中的 verifyKey 22 | # mirai api http 反向连接模式 23 | # 使用此模式可以将本项目与 mirai 分离在两个不同服务器部署 24 | reverse_ws_host = "localhost" 25 | reverse_ws_port = 8554 26 | # mirai api http 正向连接模式 27 | # 使用此模式时需注释上面的反向连接模式 28 | # http_url = "http://localhost:8080" 29 | # ws_url = "http://localhost:8080" 30 | 31 | # Discord 设置,开启后可以支持 Discord 机器人 32 | # [discord] 33 | # bot_token = "xxx" 34 | 35 | # Telegram 设置,开启后可以支持 Telegram 机器人 36 | # [telegram] 37 | # # 这个 token 是找 BotFather 要的 38 | # bot_token = "你的 Bot token" 39 | # # 如果部署在国内,就填这个设置代理 40 | # # 不填的话就会读取系统的代理设置 41 | # proxy = "http://localhost:1080" 42 | # # 管理员的 chat id 43 | # manager_chat = 1234567890 44 | 45 | # ==== OpenAI 部分开始 46 | [openai] 47 | # OpenAI 相关设置 48 | # 自定义 ChatGPT 的 browserless 接入点 49 | # 自 3月9日 开始,不设置此项将无法正常使用 browserless 模式下的网页版 ChatGPT 50 | browserless_endpoint = "https://chatgpt-proxy.lss233.com/api/" 51 | 52 | 53 | # 自定义 OpenAI 的 API 接口基础地址 54 | # 通过此功能,你可以搭建一个 OpenAI 的反向代理来避免网络问题 55 | # 例如此项目:https://github.com/Ice-Hazymoon/openai-scf-proxy 56 | api_endpoint = "https://chatgpt-proxy.lss233.com/v1/" 57 | 58 | # 以下是 GPT3(.5) 和 GPT4 的模型参数 59 | # 在使用 API 调用时有效 60 | # 参数具体含义可以见 https://platform.openai.com/docs/api-reference/completions/create 61 | # 如果你不了解,可以保持默认 62 | [openai.gpt3_params] 63 | temperature = 1.0 64 | max_tokens = 4000 65 | top_p = 1.0 66 | presence_penalty = 0.5 67 | frequency_penalty = 0.5 68 | min_tokens = 1000 69 | # 以下是 OpenAI 账号设置 70 | 71 | # 你可以用多种不同的方式登录 OpenAI 72 | # 你也可以登录很多个不同的账号(无限多个) 73 | # 下面的例子会向你演示使用不同方式登录时 74 | # 配置文件的写法 75 | 76 | # 第 1 个 OpenAI 账号 77 | # 使用 access_token 登录 78 | # 优点: 79 | # 1. 适用于在国内网络环境 80 | # 2. 适用于通过 Google / 微软 注册的 OpenAI 账号 81 | # 3. 登录过程较快 82 | # 缺点: 83 | # 1. 有效期为 30 天,到期后需更换 84 | # 2. 有可能会封号 85 | [[openai.accounts]] 86 | mode = "browserless" 87 | 88 | # 你的 access_token,登录 OpenAI 后访问`https://chat.openai.com/api/auth/session`获取 89 | access_token = "一串 ey 开头的东西" 90 | 91 | # 下面是所有的 OpenAI 账号都可以有的设置 92 | # ========= 开始 ======== 93 | 94 | # 如果你在国内,需要配置代理 95 | proxy="http://127.0.0.1:1080" 96 | 97 | # 使用 ChatGPT Plus(plus 用户此项设置为 true 使用 legacy 模型) 98 | paid = false 99 | 100 | # 是否开启标题自动重命名 101 | # 若为空或保持注释即不开启 102 | # 支持的变量: {session_id} - 此对话对应的上下文 ID,若产生在好友中,则为好友 QQ 号,若产生在群聊中,则为群号 103 | # 具体见 README 中的介绍 104 | # title_pattern="qq-{session_id}" 105 | 106 | # 是否自动删除旧的对话,开启后用户发送重置对话时会自动删除以前的会话内容 107 | # auto_remove_old_conversations = true 108 | 109 | # ===== 结束 ===== 110 | 111 | # 第 2 个 OpenAI 账号 112 | # 使用 api key 登录 113 | # 当你设置了 API Key 之后 114 | # 你就可以使用 OpenAI 中收费的 ChatGPT API、AI 画图等功能 115 | # 优点: 116 | # 1. 响应快 117 | # 2. 不咋封号 118 | # 3, 可以调参 119 | # 缺点: 120 | # 1. 烧钱 121 | # 2. 暂不支持 GPT4 (3月15日) 122 | [[openai.accounts]] 123 | # 你的 API key,可以在这里看: https://platform.openai.com/account/api-keys 124 | api_key="sk-xxxxx" 125 | # 如果你在国内,需要配置代理 126 | proxy="http://127.0.0.1:1080" 127 | 128 | # 第 5 个 OpenAI 账号 129 | # 理论上你可以添加无限多个 OpenAI 账号 130 | # 你可以自行添加或删除配置文件来设置账号信息 131 | [[openai.accounts]] 132 | mode = "browserless" 133 | 134 | # 你的 OpenAI 邮箱 135 | email = "xxxx" 136 | # 你的 OpenAI 密码 137 | password = "xxx" 138 | 139 | # 如果你在国内,需要配置代理 140 | proxy="http://127.0.0.1:1080" 141 | 142 | # 使用 ChatGPT Plus(plus 用户此项设置为 true 使用 legacy 模型) 143 | paid = false 144 | 145 | # 是否开启标题自动重命名 146 | title_pattern="qq-{session_id}" 147 | 148 | # 是否自动删除旧的对话 149 | auto_remove_old_conversations = true 150 | 151 | # === OpenAI 账号部分结束 152 | 153 | # === Poe 账号部分开始 154 | # 如果你没有 Poe 账号,可以直接删除这部分 155 | [poe] 156 | [[poe.accounts]] 157 | # 登陆 poe.com 网站后,通过开发者工具查看Cookie获取 158 | p_b = "V4j***" 159 | # === Poe 账号部分结束 160 | 161 | # === Bing 设置部分开始 162 | # 如果你没有 Bing 账号,可以直接删除这部分 163 | [bing] 164 | # 在 Bing 的回复后加上猜你想问 165 | show_suggestions = true 166 | # 在 Bing 的回复前加上引用资料 167 | show_references = true 168 | # 在 Bing 的回复后加上剩余次数 169 | show_remaining_count = true 170 | # Bing 的 WS 接入点,中国大陆访问时可以修改成下面这个 171 | wss_link = "wss://chatgpt-proxy.lss233.com/sydney/ChatHub" 172 | 173 | # 第 1 个 Bing 账号 174 | # 理论上,你可以添加无限多个 Bing 账号。 175 | # 多账号的配置方法和 OpenAI 的一样。 176 | [[bing.accounts]] 177 | # 你的账号 Cookie,获取方法见 README 178 | cookie_content = '[{xxxxxx' 179 | # 如果你想用代理 180 | # proxy="http://127.0.0.1:1080" 181 | # === Bing 设置部分结束 182 | 183 | # === 文心一言 设置部分开始 184 | # 如果你没有 文心一言 账号,可以直接删除这部分 185 | [yiyan] 186 | 187 | # 第 1 个 文心一言 账号 188 | # 理论上,你可以添加无限多个 文心一言 账号。 189 | # 多账号的配置方法和 OpenAI 的一样。 190 | [[yiyan.accounts]] 191 | # 你的账号 Cookie,获取方法见 README 192 | # 该渠道为对接网页版文心一言,有封号风险,请自行取舍。 193 | cookie_content = 'BDUSS=xx;' 194 | # 如果你想用代理(可能有BUG) 195 | # proxy="http://127.0.0.1:1080" 196 | # === 文心一言 设置部分结束 197 | 198 | # === ChatGLM 设置部分开始 199 | # 如果你没有搭建本地 ChatGLM,可以直接删除这部分 200 | [chatglm] 201 | 202 | # 第 1 个 ChatGLM 账号 203 | # 理论上,你可以添加无限多个 ChatGLM 账号。 204 | # 多账号的配置方法和 OpenAI 的一样。 205 | [[chatglm.accounts]] 206 | # ChatGLM 的接口地址,搭建方法见 README 207 | api_endpoint = "http://127.0.0.1:8000" 208 | # 最大记忆的对话轮数 209 | max_turns=10 210 | # 请求超时时间(单位:秒) 211 | timeout=360 212 | # === ChatGLM 设置部分结束 213 | 214 | # == Bard 设置部分开始 215 | [bard] 216 | [[bard.accounts]] 217 | # Google Bard 页面的 Cookie,获取方法与 文心一言类似 218 | cookie_content = "xxx" 219 | 220 | # == Azure 账号设置 221 | # 设置后可以使用 Azure 的语音转文字功能 222 | [azure] 223 | tts_speech_key = 'xxx' 224 | tts_speech_service_region = 'xxx' 225 | 226 | 227 | [text_to_speech] 228 | # 语音转文字 229 | always = false 230 | engine="edge" 231 | # 默认音色 232 | # 可参考 Azure: 233 | # https://learn.microsoft.com/zh-CN/azure/cognitive-services/speech-service/language-support?tabs=tts#neural-voices 234 | 235 | default = "zh-CN-XiaoyouNeural" 236 | 237 | 238 | [text_to_image] 239 | # 文字转图片 240 | 241 | # 是否强制开启,设置后所有的消息强制以图片发送,减小风控概率 242 | always = true 243 | 244 | # 字体大小 245 | font_size = 30 246 | 247 | # 图片宽度 248 | width = 700 249 | 250 | # 字体 251 | font_path = "fonts/sarasa-mono-sc-regular.ttf" 252 | 253 | # [备用模式]起始点 X 254 | offset_x = 50 255 | 256 | # [备用模式]起始点 Y 257 | offset_y = 50 258 | 259 | [trigger] 260 | # 配置机器人要如何响应,下面所有项均可选 (也就是可以直接删掉那一行) 261 | 262 | # 全局聊天前缀,在群聊和私聊中,符合下面的前缀【才】会响应,可以自己增减 263 | prefix = [ "gpt",] 264 | 265 | # 私聊聊天前缀,在私聊中,符合下面的前缀【也】会响应,可以自己增减 266 | prefix_friend = [ "ask",] 267 | 268 | # 群聊聊天前缀,在群聊中,符合下面的前缀【也】会响应,可以自己增减 269 | prefix_group = [ "ai",] 270 | 271 | # 满足以下正则表达式则忽略此条消息 272 | ignore_regex = [] 273 | 274 | # 直接和指定的 AI 对话(不切换AI) 275 | # 此处的前缀是在上面的前缀之后的 276 | # 例: 277 | # prefix = [ "ask" ] 278 | # prefix_ai = { "bing-c" = ["bing"] } 279 | # 则用户发送: ask bing 你好 280 | # 则会直接把 “你好” 两个字发给 New Bing AI 281 | prefix_ai = { "chatgpt-web" = ["gpt"], "bing-c" = ["bing"] } 282 | 283 | # AI 画图的前缀 284 | # 需要有 OpenAI 的 api_key 才能使用 285 | prefix_image = ["画", "看"] 286 | # 配置群里如何让机器人响应,"at" 表示需要群里 @ 机器人,"mention" 表示 @ 或者以机器人名字开头都可以,"none" 表示不需要 287 | require_mention = "at" 288 | 289 | # 重置会话的命令 290 | reset_command = [ "重置会话",] 291 | 292 | # 回滚会话的命令 293 | rollback_command = [ "回滚会话",] 294 | 295 | # 切换模型的命令 296 | switch_model = "切换模型 (.+)" 297 | 298 | # 允许普通用户切换的模型 299 | allowed_models = ["gpt-3.5-turbo", "gpt-3.5-turbo-0301", "text-davinci-002-render-sha", "text-davinci-002-render-paid"] 300 | 301 | # 允许普通用户切换AI 302 | allow_switching_ai = true 303 | 304 | [response] 305 | # 默认的响应模式,支持: 306 | # mixed - 图文混合 (实验性) 307 | # text - 文字模式 308 | # image - 图片模式 309 | mode = "mixed" 310 | 311 | # 分段发送延迟,消息会等待一段时间再发送,避免刷屏 312 | # 该功能目前仅在 mixed 模式有效 313 | # 设置为 0 关闭分段发送功能 314 | # 若要开启此功能,建议设置为 15 左右 315 | buffer_delay = 15 316 | 317 | # 默认使用的 AI 类型,不填写时自动推测 318 | # 目前支持的类型: 319 | # chatgpt-web 网页版 ChatGPT 320 | # chatgpt-api API 版 ChatGPT (GPT3.5-turbo) 321 | # bing-c 新必应-创造风格 322 | # bing-p 新必应-精确风格 323 | # bing-b 新必应-平衡风格 324 | # slack-claude Slack 版的 Claude 325 | # bard Google Bard 326 | # yiyan 百度 文心一言 网页版 327 | # chatglm-api 清华 ChatGLM-API 接口 328 | # poe-sage POE Sage 模型 (更会写代码的 ChatGPT) 329 | # poe-beaver POE GPT4 模型 330 | # poe-claude2 POE Claude2 模型 331 | # poe-claude POE Claude 模型 332 | # poe-chinchilla POE ChatGPT 模型 333 | # poe-nutria POE Dragonfly 模型 334 | 335 | # 默认注释掉这行配置,以免有人不看直接抄然后出问题 336 | # default_ai = "chatgpt-web" 337 | # 匹配指令成功但没有对话内容时发送的消息 338 | placeholder = "您好!我是 Assistant,一个由 OpenAI 训练的大型语言模型。我不是真正的人,而是一个计算机程序,可以通过文本聊天来帮助您解决问题。如果您有任何问题,请随时告诉我,我将尽力回答。\n如果您需要重置我们的会话,请回复`重置会话`。" 339 | 340 | # 发生错误时要发送的消息 341 | error_format = "出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚会话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n{exc}" 342 | 343 | # 发生网络错误时发送的消息,请注意可以插入 {exc} 作为异常占位符 344 | error_network_failure = "网络故障!连接 OpenAI 服务器失败,我需要更好的网络才能服务!\n{exc}" 345 | 346 | # OpenAI 账号登录失效时的提示 347 | error_session_authenciate_failed = "身份验证失败!无法登录至 ChatGPT 服务器,请检查账号信息是否正确!\n{exc}" 348 | 349 | # OpenAI 提示 Too many requests(太多请求) 时的提示 350 | error_request_too_many = "糟糕!当前收到的请求太多了,我需要一段时间冷静冷静。你可以选择“重置会话”,或者过一会儿再来找我!\n{exc}" 351 | 352 | # 服务器提示 Server overloaded(过载) 时的提示 353 | error_server_overloaded = "抱歉,当前服务器压力有点大,请稍后再找我吧!" 354 | 355 | # 是否要回复触发指令的消息 356 | quote = true 357 | 358 | # 发送下面那个提醒之前的等待时间 359 | timeout = 30.0 360 | 361 | # 超过响应时间时要发送的提醒 362 | timeout_format = "我还在思考中,请再等一下~" 363 | 364 | max_timeout = 600 365 | # 对于每个提问的最长等待时间,超过此时间不再等待 366 | 367 | cancel_wait_too_long = "啊哦,这个问题有点难,让我想了好久也没想明白。试试换个问法?" 368 | # 超过最长等待时间后发送的信息 369 | 370 | # 重置会话时发送的消息 371 | reset = "会话已重置。" 372 | 373 | # 回滚成功时发送的消息 374 | rollback_success = "已回滚至上一条对话,你刚刚发的我就忘记啦!" 375 | 376 | # 回滚失败时发送的消息 377 | rollback_fail = "回滚失败,没有更早的记录了!" 378 | 379 | # 等待处理的消息的最大数量,如果要关闭此功能,设置为 0 380 | max_queue_size = 10 381 | 382 | # 队列满时的提示 383 | queue_full = "抱歉!我现在要回复的人有点多,暂时没有办法接收新的消息了,请过会儿再给我发吧!" 384 | 385 | # 新消息加入队列会发送通知的长度最小值 386 | queued_notice_size = 3 387 | 388 | # 新消息进入队列时,发送的通知。 queue_size 是当前排队的消息数 389 | queued_notice = "消息已收到!当前我还有{queue_size}条消息要回复,请您稍等。" 390 | 391 | [baiducloud] 392 | # 是否启动百度云内容安全审核 393 | # 注册地址: http://console.bce.baidu.com/ai/#/ai/antiporn/overview/index 394 | check = false 395 | 396 | # 百度云API_KEY 24位英文数字字符串 397 | baidu_api_key = "" 398 | 399 | # 百度云SECRET_KEY 32位的英文数字字符串 400 | baidu_secret_key ="" 401 | 402 | # 不合规消息自定义返回 403 | illgalmessage = "[百度云]请珍惜机器人,当前返回内容不合规" 404 | 405 | [system] 406 | # 是否自动同意进群邀请 407 | accept_group_invite = false 408 | 409 | # 是否自动同意好友请求 410 | accept_friend_request = false 411 | 412 | [presets] 413 | # 切换预设的命令: 加载预设 猫娘 414 | command = "加载预设 (\\w+)" 415 | 416 | loaded_successful = "预设加载成功!" 417 | 418 | [presets.keywords] 419 | # 预设关键词 <-> 实际文件 420 | "正常" = "presets/default.txt" 421 | "猫娘" = "presets/catgirl.txt" 422 | 423 | [ratelimit] 424 | # 额度限制功能,可以在 wiki 中了解此功能的用法 425 | 426 | # 额度使用达到此比例时进行警告 427 | warning_rate = 0.8 428 | 429 | # 警告消息 430 | warning_msg = "\n\n警告:额度即将耗尽!\n目前已发送:{usage}条消息,最大限制为{limit}条消息/小时,请调整您的节奏。\n额度限制整点重置,当前服务器时间:{current_time}" 431 | 432 | # 超额消息 433 | exceed = "已达到额度限制,请等待下一小时继续和我对话。" 434 | 435 | ``` 436 | 437 | 该文件的格式为 TOML 格式,你可以用下面这个工具来检查你修改的配置文件是否有误: 438 | 439 | {% embed url="https://www.toml-lint.com/" %} 440 | 441 | {% hint style="info" %} 442 | 如果你感兴趣的话也可以了解一下 TOML 格式的完整规范: [https://toml.io/cn/v1.0.0](https://toml.io/cn/v1.0.0) 443 | {% endhint %} 444 | 445 | 简单来说,TOML 格式的基本结构如下: 446 | 447 | ```toml 448 | [这里是块] 449 | 这是配置项1 = "这是对应的值" 450 | 这是配置项2 = 123456 451 | 452 | [这里是块2] 453 | 这里是配置项a = "这是对应的值a" 454 | ``` 455 | 456 | ### 错误示例: 457 | 458 | 你不能这么写: 459 | 460 | ```toml 461 | [这里是块] 462 | 这是配置项1 = "这是对应的值" 463 | 这是配置项2 = 123456 464 | 465 | [这里是块] # 注意看,这个块在上面写过了,这样是不行的 466 | 这里是配置项a = "这是对应的值b" 467 | 468 | ``` 469 | 470 | 也不能这么写: 471 | 472 | ``` 473 | [这里是表] 474 | 这是配置项1 = "这是对应的值" 475 | 这是配置项2 = 123456 476 | 477 | 这里是配置项1 = "这是对应的值b" # 这个配置项在上面也写过了 478 | 479 | ``` 480 | 481 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-tu-pian.md: -------------------------------------------------------------------------------- 1 | # 🖼 文字转图片 2 | 3 | 机器人可以把文字转成图片,这样可以避免消息发到 QQ 群中被腾讯拦截,或者公式直接输出导致可读性太低的问题。 4 | 5 | 机器人内置两种不同的文字转图片模式。 6 | 7 | 文字转图片功能有关的配置项: 8 | 9 | ```toml 10 | [text_to_image] 11 | # 文字转图片 12 | 13 | # 是否强制开启,设置后所有的消息强制以图片发送,减小风控概率 14 | always = true 15 | 16 | # 字体大小 17 | font_size = 30 18 | 19 | # 图片宽度 20 | width = 700 21 | 22 | # 字体 23 | font_path = "fonts/sarasa-mono-sc-regular.ttf" 24 | 25 | # [备用模式]起始点 X 26 | offset_x = 50 27 | 28 | # [备用模式]起始点 Y 29 | offset_y = 50 30 | ``` 31 | 32 | ## Markdown 渲染模式 33 | 34 | 该模式下,机器人输出的内容会被当成 Markdown 文本,在转换成 HTML 之后,使用 wkhtmltoimage 这个软件进行渲染,并转换成图片。 35 | 36 | 该模式下可以渲染公式、图片、代码高亮,右下角还会有一个二维码,扫描之后获得图片内容的原文。 37 | 38 | 这需要你运行机器人的电脑上有安装 wkhtmltoimage 和一个图形界面。 39 | 40 | 对于没有图形界面的 Linux 服务器,可以考虑使用 xvfb 来模拟一个。 41 | 42 | {% hint style="info" %} 43 | 提示 44 | 45 | 如果你是通过 Windows 快速部署包,或者 Linux 一键脚本部署的,那么别担心,这些我们都已经帮你配置好了。 46 | {% endhint %} 47 | 48 | ### 自定义渲染效果图 49 | 50 | Markdown 模式下的图片渲染是通过 HTML 实现的,这个 HTML 文件存放在项目的 `asssets\texttoimg\template.html` 下。 51 | 52 | 如果你有一定的 Web 前端开发能力,可以自己修改这个模板,实现自定义。 53 | 54 | 55 | 56 | ## 备用渲染模式 57 | 58 | 备用渲染模式只是单纯地把文字转化成图片,不会渲染公式、Markdown 等富文本内容,也不需要任何环境依赖。 59 | 60 | 默认情况下,机器人会优先尝试使用 Markdown 渲染模式,只有当该模式渲染失效,才会改回备用渲染模式。 61 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/README.md: -------------------------------------------------------------------------------- 1 | # 🎤 文字转语音 2 | 3 | 这个章节将介绍如何让你的机器人在回复你的时候带上一条语音消息。 4 | 5 | 语音功能支持的配置项: 6 | 7 | ```toml 8 | [text_to_speech] 9 | # 语音转文字 10 | 11 | # 是否默认开启文字转语音 12 | always = false 13 | # 默认音色 14 | # 此选项和你使用的引擎有关 15 | default = "zh-CN-XiaoyouNeural" 16 | 17 | #引擎 18 | engine = "edge" 19 | ``` 20 | 21 | ### 相关命令 22 | 23 | 你可以给机器人发送:`切换语音 xxx` 来开启语音功能(xxx为音色)。 24 | 25 | 你可以发送:`ping` 来查看所有支持的音色。 26 | 27 | ### 语音引擎 28 | 29 | 要想开启语音功能,你需要配置语音引擎。 30 | 31 | 目前我们支持两种不同的语音驱动引擎,分别为:微软 Azure TTS 和 VITS。 32 | 33 | | | Azure TTS | VITS | Edge TTS | 34 | | ---- | ------------------ | ----------------- | ---------------------- | 35 | | 费用 | 新用户免费 200 美元,按字数收费 | 免费 | 免费 | 36 | | 音色 | 仅网站中列出的可用音色 | 可用使用自己训练的音色 | 比 Azure TTS 少一点 | 37 | | 配置要求 | 能上网就行 | 可能强劲的 CPU 或者需要显卡 | 能上网就行 | 38 | | 磁盘占用 | 基本没有 | 至少为 3GB,主要取决于音色数量 | 基本没有 | 39 | | 速度 | 超快 | 取决于服务器配置 | 超快 | 40 | | 稳定性 | 极高 | 有时候可能会花很久 | 挺高 | 41 | | 限制 | 不支持混合不同的语言 | 一次说话不能超过150字 | 需要安装 ffmpeg、不支持混合不同的语言 | 42 | 43 | 如果你想使用 Edge TTS 的语音功能,请阅读: 44 | 45 | {% content-ref url="edge-tts-yu-yin-jie-ru-jiao-cheng.md" %} 46 | [edge-tts-yu-yin-jie-ru-jiao-cheng.md](edge-tts-yu-yin-jie-ru-jiao-cheng.md) 47 | {% endcontent-ref %} 48 | 49 | 如果你想使用 Azure TTS 的语音功能,请阅读: 50 | 51 | {% content-ref url="azure-tts-yu-yin-jie-ru-jiao-cheng.md" %} 52 | [azure-tts-yu-yin-jie-ru-jiao-cheng.md](azure-tts-yu-yin-jie-ru-jiao-cheng.md) 53 | {% endcontent-ref %} 54 | 55 | 如果你想使用 VITS 的语音功能,请阅读: 56 | 57 | {% content-ref url="vits-yu-yin-jie-ru-jiao-cheng.md" %} 58 | [vits-yu-yin-jie-ru-jiao-cheng.md](vits-yu-yin-jie-ru-jiao-cheng.md) 59 | {% endcontent-ref %} 60 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/azure-tts-yu-yin-jie-ru-jiao-cheng.md: -------------------------------------------------------------------------------- 1 | # Azure TTS 语音接入教程 2 | 3 | 接入 Azure TTS 需要在配置文件中添加下面几行配置: 4 | 5 | ```toml 6 | [text_to_speech] 7 | 8 | # 引擎名填写这一个 9 | # 设置后可以使用 Azure 的语音转文字功能 10 | engine = "azure" 11 | 12 | # 音色名 13 | default = "zh-CN-XiaoyouNeural" 14 | 15 | [azure] 16 | tts_speech_key = '你的密钥' 17 | tts_speech_service_region = '你的位置/区域' 18 | ``` 19 | 20 | 配置文件中提到的两个值的获取方法请参考: 21 | 22 | {% embed url="https://blog.csdn.net/he99774/article/details/126653141" %} 23 | 24 | 你可以在这里查看支持的音色: 25 | 26 | {% embed url="https://learn.microsoft.com/zh-CN/azure/cognitive-services/speech-service/language-support?tabs=tts#neural-voices" %} 27 | 28 | 在这里试听: 29 | 30 | {% embed url="https://speech.microsoft.com/portal/voicegallery" %} 31 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/edge-tts-yu-yin-jie-ru-jiao-cheng.md: -------------------------------------------------------------------------------- 1 | # Edge TTS 语音接入教程 2 | 3 | 接入 Edge TTS 需要在配置文件中添加下面几行配置: 4 | 5 | ```toml 6 | [text_to_speech] 7 | 8 | # 引擎名填写这一个 9 | # 设置后可以使用 Edge 的语音转文字功能 10 | engine = "edge" 11 | 12 | # 音色名 13 | default = "zh-CN-XiaoxiaoNeural" 14 | ``` 15 | 16 | ## 依赖 17 | 18 | 如果你想在 QQ 上使用这个引擎,需要安装 ffmpeg。 19 | 20 | Windows 参考: 21 | 22 | {% embed url="https://www.jianshu.com/p/5015a477de3c" %} 23 | 24 | Linux :建议你直接问 ChatGPT:`XXX 系统怎么装 ffmpeg?` 25 | 26 | Docker: 自带,无需安装。 27 | 28 | ## 音色 29 | 30 | 你可以在这里查看支持的音色: 31 | 32 | {% embed url="https://www.cnblogs.com/v3ucn/p/17186731.html" %} 33 | 34 | 在这里可以试听: 35 | 36 | {% embed url="https://speech.microsoft.com/portal/voicegallery" %} 37 | -------------------------------------------------------------------------------- /pei-zhi-wen-jian-jiao-cheng/wen-zi-zhuan-yu-yin/vits-yu-yin-jie-ru-jiao-cheng.md: -------------------------------------------------------------------------------- 1 | # VITS 语音接入教程 2 | 3 | 我们使用 MoeGoe-Simple-API 作为 VITS 语音的后端。 4 | 5 | 接入 MoeGoe-Simple-API 的 VITS TTS 需要在配置文件中添加下面几行配置: 6 | 7 | ```toml 8 | [text_to_speech] 9 | 10 | # 引擎名填写这一个 11 | engine = "vits" 12 | 13 | # 角色 ID 14 | default = "0" 15 | 16 | [vits] 17 | # 后端接口地址 18 | api_url = "xxxx" 19 | 20 | # 语音速度 21 | speed = 1.4 22 | 23 | # 目标语言 24 | lang = "zh" 25 | 26 | # 语音生成超时时间 27 | timeout = 30 28 | ``` 29 | 30 | ### 配置项介绍 31 | 32 | #### 后端接口地址 33 | 34 | 此处填写你搭建好的 MoeGoe-Simple-API 的接口地址,`http://IP:端口号/voice` 。 35 | 36 | 你可以使用我的接口地址:`http://lss.mchank.cn:23456/voice` 来体验效果,但我不保证这个接口的稳定性(可能随时会关闭)。 37 | 38 | #### 角色ID 39 | 40 | 和你的模型有关,具体请见 MoeGoe-Simple-API 的文档。 41 | 42 | #### 语音速度 43 | 44 | 这个值越大,语速越慢。经测试发现 `1.4` 是一个比较均衡的值。 45 | 46 | #### 目标语言 47 | 48 | 即想要转换成语音的语言,支持: 49 | 50 | * zh - 中文 51 | * ja - 日文 52 | * mix - 混合 53 | 54 | #### 生成超时时间 55 | 56 | 等待多久放弃生成本次语音,单位为秒。 57 | 58 | ### MoeGoe-Simple-API 搭建教程 59 | 60 | {% hint style="info" %} 61 | **注意** 62 | 63 | 此项目为第三方提供的项目,教程已经因为原项目的发展而**过时**,建议参考原项目的文档进行搭建。 64 | 65 | 项目地址: [https://github.com/Artrajz/MoeGoe-Simple-API](https://github.com/Artrajz/MoeGoe-Simple-API) 66 | {% endhint %} 67 | 68 | 搭建此 VITS 后端需要至少 5GB 的磁盘空间和一个较好的 CPU(或 GPU)。 69 | 70 | 如果你是在 Windows 上进行部署,可以直接项目的 README 进行部署。 71 | 72 | #### 模型下载 73 | 74 | 你可以在这里下载一些训练好的 VITS 模型: 75 | 76 | {% embed url="https://github.com/CjangCjengh/TTSModels" %} 77 | 78 | #### Docker 部署 79 | 80 | 你可以在 docker-compose.yaml 中加入以下内容: 81 | 82 | ```yaml 83 | moegoe: 84 | image: lss233/moegoe-simple-api:latest 85 | restart: always 86 | ports: 87 | - 23456:23456 88 | environment: 89 | LANG: 'C.UTF-8' 90 | volumes: 91 | - ./Model:/app/Model 92 | - ./moegoe-config.json:/app/config.json 93 | ``` 94 | 95 | 然后新建一个叫做 Model 的文件夹,在里面放你下载好的模型文件。 96 | 97 | ~~然后写一个叫做 `moegoe-config.json` 的配置文件:~~ 98 | 99 | ```json 100 | [ 101 | ["./Model/1374_epochs.pth", "./Model/config.json"] 102 | ] 103 | ``` 104 | 105 | ~~这里的 `./Model/1374_epochs.pth` 和 `./Model/config.json` 就是你放进去的模型文件。~~ 106 | 107 | 完成之后,输入 `docker-compose up -d` 更新容器编排。 108 | 109 |
110 | 111 | 然后你的接口地址就是: `http://moegoe:23456/voice` 112 | -------------------------------------------------------------------------------- /yu-she-xi-tong.md: -------------------------------------------------------------------------------- 1 | # 🐈 预设系统 2 | 3 | 请阅读: 4 | 5 | {% embed url="https://github.com/lss233/chatgpt-mirai-qq-bot/wiki/%F0%9F%90%B1-%E9%A2%84%E8%AE%BE%E7%B3%BB%E7%BB%9F" %} 6 | --------------------------------------------------------------------------------