Skip to main content

My Awesome ChatGPT

· 2 min read


  • The programmers who are good at asking questions and quickly determining if the answers are right or wrong will be the ones who survive.
  • Here's a list of repositories that can be used in the field, not just for development tips.


const promptTemplate =
"Write an insightful but concise Git commit message in a complete sentence in present tense for the following diff without prefacing it with anything:";

node chatgpt

const completionParams = {
temperature: 0.7,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,


  • You may need to get the exact number of tokens to use the openai API.
  • You should use openai/tiktoken, but it's Python.
  • dqbd/tiktoken already has a node wrapper already out there. 3.5 Turbo support
import { encoding_for_model as encodingForModel } from "@dqbd/tiktoken";

const encoder = encodingForModel("gpt-3.5-turbo");
const tokenLength = encoder.encode("YOUR_CHAT").length;



  • ai-plugin.json in the .well-known path acts as a manifest.json
  • Openapi.yaml in the same path for this endpoint specification
  • There are four types of authentication: none | user_http | service_http | oauth.
  • For simple services, service_http seems to be sufficient, user_http requires the customer to enter an API key, and oauth requires additional permissions such as search:read.
  • It seems to use Vector DB for document similarity comparison, but there is no proper Node.js wrapper for it, so it can be implemented in Redis, but you need the Redisearch module.