Giter VIP home page Giter VIP logo

ai_buddha's Introduction

Buddhist Scripture Explanation API

This is a Flask-based API that leverages OpenAI's GPT-4 to provide explanations for passages from various Buddhist scriptures. The API supports both Chinese and English languages.

Features

  • Multi-language Support: Explain scriptures in either Chinese or English.
  • Multiple Scriptures: Supports popular Buddhist scriptures like the Heart Sutra, Diamond Sutra, Śūraṅgama Sūtra, and more.
  • Customizable Responses: The model can be fine-tuned with different temperatures to adjust the creativity of the responses.

Setup

Prerequisites Python 3.11 An OpenAI API key

Create .env file in repo and put your openai key as below: OPENAI_API_KEY=

virtual environment

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

## run app
run.sh

Request Body

{
  "scripture": "Heart Sutra",
  "text": "Here is the passage you want to explain.",
  "language": "zh"  # or "en" for English
}

local test

curl -X POST http://127.0.0.1:5000/explain -H "Content-Type: application/json" -d '{ "scripture": "心经", "text": "色不异空,空不异色;色即是空,空即是色。", "language": "zh" }'

Contributing

If you have any ideas or suggestions to improve this API, feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License.

ai_buddha's People

Contributors

yaninsanity avatar

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.