Bardie is a simple Express.js application that interacts with the Bard Chat API to generate responses to user questions. It provides an endpoint /bard
that accepts a POST request with a JSON payload containing a question
field. The application sends the question to the Bard Chat API and returns the generated response.
- Node.js (v14 or higher)
- npm (Node Package Manager)
-
Clone the repository:
git clone https://github.com/initID/bardie.git
-
Install the dependencies:
cd bardie npm install
-
Start the application:
npm start
The application will be running at
http://localhost:3000
.
Send a POST request to the /bard
endpoint with the following JSON payload:
{
"question": "Is Komodo Dragon a dragon even though they can't fly?"
}
The server will respond with the generated response from the Bard Chat API.
The application uses environment variables for configuration. The following environment variables can be set:
PORT
(default: 3000): The port on which the server listens.SECURE1PSID
: The secure 1PSID value for authentication with the Bard Chat API.AT_KEY
: The AT key for authentication with the Bard Chat API.
These environment variables can be set in a .env
file in the project root directory. For more information about obtaining your AT_KEY
and SECURE1PSID
, refer to the project's configuration.md.