My Awesome ChatGPT
· 2 min read
Overview
- 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.
aicommits
- Nutlope/aicommits: Automated commits.
- As soon as #32 Add support for conventional commits is resolved, I'll be using it.
- Personally, I think the following prompts should be changed, but I'm also curious about how to improve them.
- #177 feat: enable Conventional Commits standard as flag I think it's coming soon.
src/utils/openai.ts#L7
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:";
- #81 Quick improvement suggestion: Reduce diff size with --ignore-all-space is also interesting.
- Since the Openai API is billed by the number of tokens, it looks like they plan to reduce the diff as much as possible.
node chatgpt
- transitive-bullshit/chatgpt-api
- openai: docs
- I think we need to utilize completionParams appropriately.
- I checked several third parties and none of them give temperature as 1.
const completionParams = {
temperature: 0.7,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
};
tiktoken
- 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;
chatgpt-retrieval-plugin
openai/chatgpt-retrieval-plugin
- 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, andoauth
requires additional permissions such assearch: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.