diff --git a/dim.ts b/dim.ts index 6bb4864..5d5a542 100644 --- a/dim.ts +++ b/dim.ts @@ -135,7 +135,7 @@ await new Command() new Command() .option( "-t, --target ", - "Specify the target data name or file path to send to ChatGPT.", + "Specify the target data name or file path to send to GPT-3 API.", ) .option( "-o, --output ", @@ -143,7 +143,7 @@ await new Command() ) .arguments("") .description( - "Auto-generate code about target data using ChatGPT. \nFor example, conversion processing, visualization processing, etc.", + "Auto-generate code about target data using GPT-3 API. \nFor example, conversion processing, visualization processing, etc.", ) .action(new GenerateAction().execute), ) diff --git a/libs/actions.ts b/libs/actions.ts index 8197edb..89db4de 100644 --- a/libs/actions.ts +++ b/libs/actions.ts @@ -4,7 +4,7 @@ import { DimFileAccessor, DimLockFileAccessor } from "./accessor.ts"; import { CkanApiClient } from "./ckan_api_client.ts"; import { createDataFilesDir, initDimFile, initDimLockFile } from "./action_helper/initializer.ts"; import { installFromDimFile, installFromURL, interactiveInstall, parseHeader } from "./action_helper/installer.ts"; -import { ChatGPTClient } from "./chatgpt_client.ts"; +import { OpenAIClient } from "./openai_client.ts"; import { ConsoleAnimation } from "./console_animation.ts"; export class InitAction { @@ -376,7 +376,7 @@ export class GenerateAction { const dataNameList = dimLockFileAccessor.getContents().map((c) => c.name); if (!target) { target = await Input.prompt({ - message: "Enter the target data name or file path to send to ChatGPT.", + message: "Enter the target data name or file path to send to GPT-3 API.", hint: `${dataNameList.join(", ").slice(0, 50)}... or target file path])`, suggestions: dataNameList, validate: (text) => { @@ -403,7 +403,7 @@ export class GenerateAction { `Generate a code ...`, ); consoleAnimation.start(100); - const response = await new ChatGPTClient().request(`${targetData}\n${prompt}`); + const response = await new OpenAIClient().request(`${targetData}\n${prompt}`); if (!response) { return; } diff --git a/libs/chatgpt_client.ts b/libs/openai_client.ts similarity index 97% rename from libs/chatgpt_client.ts rename to libs/openai_client.ts index 1e699cf..dbe1f01 100644 --- a/libs/chatgpt_client.ts +++ b/libs/openai_client.ts @@ -2,7 +2,7 @@ import { Colors, ky } from "../deps.ts"; import { OPENAPI_COMPLETIONS_ENDPOINT } from "./consts.ts"; import { OpenAICompletionsResponse } from "./types.ts"; -export class ChatGPTClient { +export class OpenAIClient { private apiKey; constructor() { diff --git a/tests/libs/actions.generate.test.ts b/tests/libs/actions.generate.test.ts index 55c7bd2..81f8650 100644 --- a/tests/libs/actions.generate.test.ts +++ b/tests/libs/actions.generate.test.ts @@ -199,7 +199,7 @@ describe("GenerateAction", () => { ); assertEquals( targetInputPromptMessage, - "Enter the target data name or file path to send to ChatGPT.", + "Enter the target data name or file path to send to GPT-3 API.", ); assert(targetInputPromptValidate("test")); assertFalse(targetInputPromptValidate(""));