Skip to content

Commit 4b15881

Browse files
Add CONTRIBUTION.md
1 parent 3fe4abe commit 4b15881

File tree

1 file changed

+141
-0
lines changed

1 file changed

+141
-0
lines changed

CONTRIBUTION.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Contributing to ChatALL
2+
3+
Thank you for considering contributing to ChatALL! We welcome contributions from everyone, regardless of your background or experience level. Your contributions help make this project better for everyone.
4+
5+
## Introduction
6+
7+
ChatALL is a project that allows users to chat with multiple AI bots concurrently, helping them discover the best results. Our goal is to provide a seamless and efficient experience for users to interact with various AI bots.
8+
9+
## Reporting Issues
10+
11+
If you find any issues while using ChatALL, please follow these steps to report them:
12+
13+
1. **Check for existing issues**: Before reporting a new issue, please check the [issue tracker](https://github.com/sunner/ChatALL/issues) to see if the issue has already been reported.
14+
2. **Create a new issue**: If the issue has not been reported, create a new issue using the appropriate [issue template](https://github.com/sunner/ChatALL/issues/new/choose).
15+
3. **Provide detailed information**: Include as much information as possible, such as the steps to reproduce the issue, your operating system, and any relevant screenshots.
16+
17+
## Submitting Pull Requests
18+
19+
We welcome pull requests from everyone. To submit a pull request, follow these steps:
20+
21+
1. **Fork the repository**: Click the "Fork" button at the top right corner of the repository page to create a copy of the repository in your GitHub account.
22+
2. **Create a new branch**: Create a new branch for your changes.
23+
3. **Make your changes**: Make the necessary changes to the codebase.
24+
4. **Commit your changes**: Commit your changes with a descriptive commit message.
25+
5. **Push your changes**: Push your changes to your forked repository.
26+
6. **Create a pull request**: Go to the original repository and click the "New pull request" button. Select your branch and provide a detailed description of your changes.
27+
28+
## Code Style Guidelines
29+
30+
To maintain a consistent codebase, please follow these code style guidelines:
31+
32+
- Use 2 spaces for indentation.
33+
- Use camelCase for variable and function names.
34+
- Use PascalCase for class names.
35+
- Write clear and concise comments to explain your code.
36+
- Follow the existing code style in the project.
37+
38+
## Encouraging Contributions
39+
40+
We believe that community involvement is crucial for the success of ChatALL. Here are some ways you can contribute:
41+
42+
We believe that community involvement is crucial for the success of ChatALL. Here are some ways you can contribute:
43+
44+
- **Report issues**: If you encounter any issues, please report them using the [issue tracker](https://github.com/sunner/ChatALL/issues).
45+
- **Submit pull requests**: If you have a fix or improvement, please submit a pull request.
46+
- **Suggest new features**: If you have an idea for a new feature, please create a new issue to discuss it with the community.
47+
- **Improve documentation**: If you find any errors or omissions in the documentation, please submit a pull request to improve it.
48+
49+
## Resources for New Contributors
50+
51+
If you are new to contributing to open source projects, here are some resources to help you get started:
52+
53+
If you are new to contributing to open source projects, here are some resources to help you get started:
54+
55+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
56+
- [First Timers Only](https://www.firsttimersonly.com/)
57+
- [GitHub Docs](https://docs.github.com/en)
58+
59+
## Adding a New AI Bot
60+
61+
If you would like to add a new AI bot to ChatALL, please follow these steps:
62+
63+
If you would like to add a new AI bot to ChatALL, please follow these steps:
64+
65+
1. **Create a new bot file**: In the `src/bots/` directory, create a new file for your bot. You can use the `TemplateBot.js` file as a starting point.
66+
2. **Implement the `_sendPrompt()` method**: In your new bot file, implement the `_sendPrompt()` method to handle sending prompts to the AI bot.
67+
3. **Add a reference to your bot**: In the `src/bots/index.js` file, add a reference to your new bot.
68+
69+
### Step-by-Step Guide to Adding a New AI Bot
70+
71+
1. **Create a New Bot File**: Navigate to the `src/bots/` directory and create a new file for your bot. For example, if your bot is named "KnowNothing", create `KnowNothingBot.js`.
72+
73+
```javascript
74+
// In src/bots/KnowNothingBot.js
75+
class KnowNothingBot extends TemplateBot {
76+
static _name = "KnowNothingBot"; // Change this to your bot's name
77+
static _description = "A bot that knows nothing"; // Change this to your bot's description
78+
}
79+
```
80+
81+
4. **Update `src/bots/index.js`**: Add your bot to the `src/bots/index.js` file to ensure it is included in the application. Find the section where other bots are imported and add your bot:
82+
83+
```javascript
84+
import KnowNothingBot from '@/bots/KnowNothingBot';
85+
```
86+
87+
Then, add your bot to the appropriate arrays such as `all`, `free`, `paid`, `openSource`, `api`, or `madeInChina` based on its characteristics. For example, if your bot is free and open source, you might add it like this:
88+
89+
```javascript
90+
const all = [
91+
ChatGPT35Bot.getInstance(),
92+
ChatGPT4Bot.getInstance(),
93+
KnowNothingBot.getInstance(), // Add your bot here
94+
OpenAIAPI35Bot.getInstance(),
95+
OpenAIAPI4Bot.getInstance(),
96+
...
97+
];
98+
99+
export const botTags = {
100+
free: [
101+
bots.getBotByClassName("BardBot"),
102+
bots.getBotByClassName("KnowNothingBot"), // Add your bot here
103+
...
104+
],
105+
openSource: [
106+
bots.getBotByClassName("AlpacaBot"),
107+
bots.getBotByClassName("KnowNothingBot"), // Add your bot here
108+
...
109+
],
110+
...
111+
};
112+
113+
2. **Implement the `_sendPrompt()` Method**: Implement the `_sendPrompt()` method to handle sending prompts to the AI bot.
114+
115+
```javascript
116+
async _sendPrompt(prompt) {
117+
// Your code to send the prompt to the AI bot
118+
}
119+
```
120+
121+
3. **Add a Reference to Your Bot**: In the `src/App.vue` file, add a reference to your new bot.
122+
123+
```javascript
124+
import KnowNothingBot from './bots/KnowNothingBot';
125+
```
126+
127+
4. **Customize User-Agent (if needed)**: Some websites may restrict access to specific browsers. Set the user-agent in `KnowNothingBot.js` if required.
128+
129+
```javascript
130+
static _userAgent = "THE_RIGHT_USER_AGENT";
131+
```
132+
133+
5. **Test Your Bot**: Run the application and test your new bot to ensure it works correctly.
134+
135+
```bash
136+
npm run electron:serve
137+
```
138+
139+
6. **Submit a Pull Request**: Once you have tested your bot and ensured it works correctly, submit a pull request following the steps mentioned in the "How to Submit Pull Requests" section.
140+
141+
Thank you for your contributions! We appreciate your efforts and look forward to your involvement in our community.

0 commit comments

Comments
 (0)