mock-openai-server
A Node.js Express server that faithfully mimics OpenAI endpoints (chat, embeddings, images, audio, models). Use it to save on API costs, ensure reproducible testing, and develop seamlessly with existing SDKs by simply changing the endpoint.
File Explorer
- audio-0.mp3
- audio-1.mp3
- audio-2.mp3
- image-0.png
- image-1.png
- image-2.png
- image-3.png
- image-4.png
- image-5.png
- image-6.png
- image-7.png
- sample-mask.png
- audio.js
- chat.js
- embedding.js
- image.js
- audio.js
- chat.js
- embedding.js
- image.js
- examples.js
- server.js
- utils.js
- .gitignore
- config.yaml
- Dockerfile
- LICENSE
- package-lock.json
- package.json
- README.md
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Command Glossary
Commands referenced in this DOCs, explained below.
docker build
View Details ▼
docker build
Build an image from a Dockerfile.
docker build .
Build a Docker image using the Dockerfile in the current directory:
docker build {{github.com/creack/docker-firefox}}
Build a Docker image from a Dockerfile at a specified URL:
docker build {{[-t|--tag]}} {{name:tag}} .
Build a Docker image and tag it:
docker run
View Details ▼
docker run
This command is an alias of `docker container run`.
tldr docker container run
View documentation for the original command:
ffmpeg
View Details ▼
ffmpeg
Video conversion tool.
See also: `gst-launch-1.0`.
ffmpeg -i {{path/to/video.mp4}} -vn {{path/to/sound.mp3}}
Extract the sound from a video and save it as MP3:
ffmpeg -i {{path/to/input_audio.flac}} -ar 44100 -sample_fmt s16 {{path/to/output_audio.wav}}
Transcode a FLAC file to Red Book CD format (44100kHz, 16bit):
ffmpeg -i {{path/to/video.mp4}} {{[-vf|-filter:v]}} 'scale=-1:1000' -r 15 {{path/to/output.gif}}
Save a video as GIF, scaling the height to 1000px and setting framerate to 15:
git clone
View Details ▼
git clone
Clone an existing repository.
git clone {{remote_repository_location}} {{path/to/directory}}
Clone an existing repository into a new directory (the default directory is the repository name):
git clone --recursive {{remote_repository_location}}
Clone an existing repository and its submodules:
git clone {{[-n|--no-checkout]}} {{remote_repository_location}}
Clone only the `.git` directory of an existing repository:
node
View Details ▼
node
Server-side JavaScript platform (Node.js).
node {{path/to/file}}
Run a JavaScript file:
node
Start a REPL (interactive shell):
node --watch {{path/to/file}}
Execute the specified file restarting the process when an imported file is changed (requires Node.js version 18.11+):
npm run
View Details ▼
npm run
Run a script.
npm run
List available scripts:
npm run {{script_name}}
Run a script:
npm run {{script_name}} -- {{argument}} {{--option}}
Pass arguments to a script:
npm
View Details ▼
npm
JavaScript and Node.js package manager.
Manage Node.js projects and their module dependencies.
Some subcommands such as `install`, `run`, etc. have their own usage documentation.
npm init {{[-y|--yes]}}
Create a `package.json` file with default values (omit `--yes` to do it interactively):
npm {{[i|install]}}
Download all the packages listed as dependencies in `package.json`:
npm {{[i|install]}} {{package_name}}@{{version}}
Download a specific version of a package and add it to the list of dependencies in `package.json`:
