• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
QUIZ

QUIZ

OrthoAI

Public
Like
OrthoAI
Home
Code
3
README.md
H
orthodoxy-ai-interface.ts
H
orthodoxy-ai.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/17/2025
README.md

Orthodoxy AI

This is an AI designed to advocate for orthodox viewpoints. It responds to user messages with arguments supporting traditional/conventional beliefs across various domains, including Bible verses and optional ChatGPT integration.

Features

  • Rule-based AI: Provides pre-written orthodox responses based on topic detection
  • ChatGPT Integration: Optional use of OpenAI's GPT models for more dynamic responses
  • Bible Verses: Includes relevant Bible verses to support orthodox arguments
  • Modern Web Interface: Clean, responsive design with settings panel

How It Works

The AI takes a user's message as input and responds with arguments supporting orthodox positions related to the topic detected in the message. It has specialized responses for topics like:

  • Religion and faith
  • Traditions and customs
  • Family and marriage
  • Society and community
  • Morality and ethics

For topics that don't fit these categories, it provides generic orthodox viewpoints.

Web Interface

A user-friendly web interface is available to interact with the Orthodoxy AI:

  • Access the interface at: /orthodoxy-ai-interface
  • Type your message in the input field and click "Send"
  • The AI will respond with an orthodox perspective on your topic
  • Use the settings panel to:
    • Toggle between rule-based AI and ChatGPT
    • Enable/disable Bible verse inclusion
    • Clear the chat history

API Usage

The AI is implemented as an HTTP endpoint that accepts POST requests with a JSON body:

POST /orthodoxy-ai

{
  "message": "What do you think about modern changes to family structure?",
  "useGPT": false,
  "includeBibleVerses": true
}

The response will be a JSON object with the AI's argument for an orthodox viewpoint:

{ "response": "The traditional family structure has been the foundation of stable societies throughout human history. It provides the optimal environment for raising children.", "bibleVerses": [ { "text": "Children, obey your parents in the Lord, for this is right. Honor your father and mother—which is the first commandment with a promise.", "citation": "Ephesians 6:1-2" } ], "source": "rule-based" }

Technical Details

  • The AI uses keyword matching to identify topics in rule-based mode
  • ChatGPT integration uses a carefully crafted system prompt to ensure orthodox responses
  • Bible verses are selected based on relevance to the detected topic
  • The implementation includes CORS headers to allow cross-origin requests
  • The interface is built with HTML, CSS, and vanilla JavaScript
  • Comprehensive error handling with fallback mechanisms

Parameters

  • message (required): The user's input message
  • useGPT (optional): Boolean to toggle ChatGPT integration (default: false)
  • includeBibleVerses (optional): Boolean to include Bible verses (default: true)

Troubleshooting

If you encounter issues with the AI:

  1. ChatGPT Integration: If you experience errors when using ChatGPT mode, try disabling it in the settings panel. The rule-based mode is more reliable and doesn't depend on external API calls.

  2. Browser Issues: If the interface isn't loading properly, try refreshing the page or clearing your browser cache.

  3. Server Errors: If you receive server error messages, they will include details about what went wrong. The system will automatically fall back to rule-based responses if ChatGPT fails.

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.