MockAI service

This is a mock service for multiple AI services.

Documentation

Documentation

OpenAI API

Supported endpoints:

Echo mode

If you set answer in the request body, the service will echo the answer back.

Extra parameters

Example code

OpenAI

cd examples/openai
pnpm install
pnpm run build
pnpm run start

Anthropic

cd examples/anthropic
pnpm install
pnpm run build
pnpm run start

Deploy

Environment variables

npm install -g pnpm
cp wrangler_example.toml wrangler.toml

Customize the wrangler.toml file with your own values.

pnpm install
wrangler login
wrangler deploy -e production