This project provides an endpoint to interact with the Character-AI service using the node_characterai
module.
This project sets up an Express.js server that serves as an endpoint to communicate with the Character-AI service. It allows you to send a user message and receive a response from the AI character.
The node_characterai module is used to facilitate the communication with the Character-AI service.
To get started with this project in GitHub Codespaces:
-
Click the "Code" button at the top of the repository and select "Open with Codespaces".
-
Install the required dependencies by running the following command in the integrated terminal:
npm install
- Create a
.env
file in the project root and add your Character-AI authentication token:
AUTH_TOKEN=your_auth_token_here
- Start the server:
npm start
To interact with the Character-AI endpoint, make a GET request to the following URL, providing the characterid
and message
parameters:
GET http://localhost:3000/get-output?characterid=YOUR_CHARACTER_ID&message=YOUR_MESSAGE
characterid
: The ID of the AI character you want to interact with.message
: The user message you want to send to the AI character.
This project uses the following dependencies:
- express: Fast, unopinionated, minimalist web framework for Node.js.
- node_characterai: Module for interacting with the Character-AI service.
- dotenv: Zero-dependency module that loads environment variables from a
.env
file.
Contributions are welcome! If you find any issues or want to enhance this project, feel free to submit a pull request.
This project is licensed under the ISC License.