Welcome to the Hyperledger Labs AIFAQ project! We're excited to have you contribute and help us improve our project. Below are the guidelines to ensure a smooth and efficient contribution process.
Please adhere to our Code of Conduct. This code of conduct outlines our expectations for participants within the community as well as steps to report unacceptable behavior.
First, run the development server:
1.Clone the repository:
git clone https://github.com/hyperledger-labs/aifaq.git
cd aifaq/frontend
2.Install dependencies:
yarn install
3.Start the developemnt server:
yarn dev
4.Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This software needs GPU for the execution, if you do not have a local GPU you could use a Cloud GPU.Run the AIFAQ API through lighning.ai after signup/login, create new Studio (project):
select the left solution:
click on the Start button, and rename the new Studio:
Then, and copy-paste the github api repo code:
and create two folders:
- chromadb (it will contains vector database files)
- rtdocs (it will contains the ReadTheDocs documentation)
That version works with Hyperledger fabric documents (Wiki and ReadTheDocs).
Open a new terminal:
and download the documentation executing the command below:
wget -r -A.html -P rtdocs https://hyperledger-fabric.readthedocs.io/en/release-2.5/
actually, after a minute we can interrupt (CTRL + C) because it starts to download previous versions:
Now, we can move into rtdocs folder and move the release-2.5 content to rtdocs. We need to compress the content of the folder, moving there and use that command:
and move the readthedocs.tar.gz to the parent directory (../):
- mv readthedocs.tar.gz ..
- cd ..
repeating the two commands until we are into rtdocs folder:
now remove hyperledger… folder and the content:
uncompress the file here and remove compress file:
- tar -xzvf rtdocs.tar.gz
- rm rtdocs.tar.gz
Move to the parent folder and execute the command below:
pip install -r requirements.txt
After the requirements installation we can switch to GPU before to execute the ingestion script:
then select the L4 solution:
and confirm (it takes some minutes).
Run the ingest.py script:
it will create content in chromadb folder.
Now, we can run the API and test it. So, run api.py script:
and test it:
curl --header "Content-Type: application/json" --request POST --data '{"text": "How to install Hyperledger fabric?"}' http://127.0.0.1:8080/query
below the result:
-
Navigate to the repository on GitHub.
-
Click the "Fork" button in the top right corner
- Clone your forked repository:
git clone https://github.com/your-username/aifaq.git
cd aifaq/frontend
- Create a new branch for your feature or bug fix:
git checkout -b feature-branch
-
Make the necessary changes in your local repository.
-
Ensure your code adheres to our Code Style guidelines.
- Stage your changes:
git add .
- Commit your changes with a descriptive message:
git commit -m 'Add some feature'
- Push your changes to your forked repository:
git push origin feature-branch
-
Navigate to your forked repository on GitHub.
-
Click the "New pull request" button.
-
Provide a detailed description of your changes and submit the pull request.
1.Ensure your pull request (PR) is up to date with the main branch.
2.Provide a detailed description of the changes in your PR.
3.Link any related issues in your PR description.
4.Ensure your code passes all tests and adheres to the project's coding standards.
5.Be responsive to feedback and be prepared to make necessary changes.
6.We value all contributions, but please be aware that low-effort PRs, such as those lacking thorough testing, proper documentation, or a clear and meaningful purpose, may not be accepted. Please ensure your PR is well-considered and adds value to the project.
### Issue Reporting
If you encounter any issues or bugs, please report them by following these steps:
1.Navigate to the Issues section of the repository.
2.Click on "New Issue."
3.Provide a descriptive title and detailed description of the issue.
4.Include any relevant screenshots or error messages.
5.Assign appropriate labels (e.g., bug, enhancement, question).
### Community and Support
Join our community meetings every Monday. The invitation is on the Hyperledger Labs calendar: [Hyperledger Labs Calendar](https://wiki.hyperledger.org/display/HYP/Calendar+of+Public+Meetings).
For additional support, you can reach out on our Hyperledger Chat on [Discord](https://discord.gg/hyperledger).