diff options
author | bobzel <zzzman@gmail.com> | 2024-05-20 16:25:06 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-05-20 16:25:06 -0400 |
commit | f51ce092018a8b452d5e178ddd2a1e5a2c38cc77 (patch) | |
tree | 9dc99279a84c3f2f19f9aff9733586be659152f4 /src/client/apis/gpt/setup.ts | |
parent | bb11e8c07f86b1ba0148f1e406a070c14e9abc7c (diff) |
lint cleanup for diagrams. reorg of some gpt stuff.
Diffstat (limited to 'src/client/apis/gpt/setup.ts')
-rw-r--r-- | src/client/apis/gpt/setup.ts | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/client/apis/gpt/setup.ts b/src/client/apis/gpt/setup.ts index 7084f38bf..f648542f2 100644 --- a/src/client/apis/gpt/setup.ts +++ b/src/client/apis/gpt/setup.ts @@ -1,31 +1,8 @@ -// import { Configuration, OpenAIApi } from 'openai'; import { ClientOptions, OpenAI } from 'openai'; -export enum GPTCallType { - SUMMARY = 'summary', - COMPLETION = 'completion', - EDIT = 'edit', - FLASHCARD = 'flashcard', -} - -export type GPTCallOpts = { - model: string; - maxTokens: number; - temp: number; - prompt: string; -}; - -export const callTypeMap: { [type: string]: GPTCallOpts } = { - summary: { model: 'text-davinci-003', maxTokens: 256, temp: 0.5, prompt: 'Summarize this text in simpler terms: ' }, - edit: { model: 'text-davinci-003', maxTokens: 256, temp: 0.5, prompt: 'Reword this: ' }, - completion: { model: 'text-davinci-003', maxTokens: 256, temp: 0.5, prompt: '' }, -}; - const configuration: ClientOptions = { apiKey: process.env.OPENAI_KEY, dangerouslyAllowBrowser: true, }; export const openai = new OpenAI(configuration); - -// export const openai = new OpenAIApi(configuration); |