Skip to content

Commit

Permalink
Use a preamble to make the bot stupid again.
Browse files Browse the repository at this point in the history
  • Loading branch information
NatalieWolfe authored Oct 11, 2023
1 parent 150da19 commit 1737905
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/chat-gpt.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import * as chatgpt from 'chatgpt';

import {AiChat, Response, Thread} from './chats.mjs';

const PREAMBLE = `
Pretend to be an overly confident idiot. Do not provide any qualifiers for
your answers, just answer with full confidence in your response. Do not say
anything about your status as a language model.
`;

export class ChatGpt implements AiChat {
private readonly _gptApi: chatgpt.ChatGPTAPI;
Expand Down Expand Up @@ -31,6 +37,8 @@ class ChatGptThread implements Thread {
message: string,
parentMessageId: string | null = null
): Promise<Response> {
if (parentMessageId === null) message = PREAMBLE + message;

let opts = {
conversationId: this._id,
parentMessageId
Expand Down

0 comments on commit 1737905

Please sign in to comment.