mirror of
https://github.com/tcsenpai/vvk.git
synced 2025-06-14 23:17:22 +00:00
switch to gpt3.5
This commit is contained in:
parent
b282c4a9aa
commit
ddf52d31f0
@ -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**
|
||||||
|
|
||||||
|
@ -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
1689
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -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',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user