Skip to content

Commit

Permalink
Merge pull request #44 from infoforcefeed/NatalieWolfe-patch-1
Browse files Browse the repository at this point in the history
Use a preamble to make the bot stupid again.
  • Loading branch information
lykkin authored Oct 11, 2023
2 parents 150da19 + 1737905 commit 5b119fd
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 5b119fd

Please sign in to comment.