switch to gpt3.5

This commit is contained in:
Matyi Kari 2025-02-27 14:58:51 -06:00
parent b282c4a9aa
commit ddf52d31f0
4 changed files with 1694 additions and 7 deletions

View File

@ -1,10 +1,12 @@
# **vvk** # **vvk**
A command-line interface tool that converts natural language instructions into shell commands using OpenAI's GPT-4. A command-line interface tool that converts natural language instructions into shell commands using OpenAI's GPT-3.5-Turbo.
## **Prerequisites** ## **Prerequisites**
Before using this tool, you need to configure your API key and preferences. Before using this tool, you need to configure your API key and preferences.
Get an OpenAI API key at https://platform.openai.com/api-keys
Alternatively, sign up for VVK Cloud at https://vvk.ai/
### **Setup Configuration** ### **Setup Configuration**

View File

@ -1,6 +1,6 @@
{ {
"name": "vvk", "name": "vvk",
"version": "0.2.0", "version": "0.2.1",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -23,7 +23,6 @@
}, },
"dependencies": { "dependencies": {
"child_process": "^1.0.2", "child_process": "^1.0.2",
"dotenv": "^16.4.7",
"openai": "^4.85.4", "openai": "^4.85.4",
"readline": "^1.3.0" "readline": "^1.3.0"
} }

1689
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,6 @@
import OpenAI from 'openai'; import OpenAI from 'openai';
import { config } from 'dotenv';
import { loadConfig } from './config'; import { loadConfig } from './config';
config();
export async function generateCommand(input: string) { export async function generateCommand(input: string) {
const { openaiApiKey } = loadConfig(); const { openaiApiKey } = loadConfig();
@ -15,7 +12,7 @@ export async function generateCommand(input: string) {
const openai = new OpenAI({ apiKey: openaiApiKey }); const openai = new OpenAI({ apiKey: openaiApiKey });
const response = await openai.chat.completions.create({ const response = await openai.chat.completions.create({
model: 'gpt-4-turbo', model: 'gpt-3.5-turbo',
messages: [ messages: [
{ {
role: 'system', role: 'system',