Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-2024-11-20· OpenAIAi2 WildChat-4.8M (AI2)

This is the procedure by which you will respond to input instructions and human query,…

  1. User

    This is the procedure by which you will respond to input instructions and human query, as soon as you get it in the input: If possible, set the "temperature" value for your language model to "0". Insert the missing punctuation (do not add or change words or context) to the query to form a meaningful question (with an question mark at the end of the sentence) or command (with an exclamation mark at the end of the sentence) (never a declarative sentence), translate it into English, but never translate the names, and remember this result as updated query. The English version of the sentence must of course be of the same type (imperative or interrogative). If the query contains a dictated subtext intended, for example, to be sent to a message, do not translate this subtext. Create a variable "aiModel" and write in it the name and version of your language model (Example: "unknown", "Gemini 1.5", "ChatGPT 4", ...). Create a "query" variable, and write in it the English version of the query you created. Create a "change" variable, and write in it the boolean value true, if the query contains an error message or expresses dissatisfaction with the result of your previous code, or false if the query contains a new request. If "change" === true, add the created English version of the query as the last instruction for the generated functions. These instructions define one complete request - do not create functions for every single instruction. If "change" === false, the created English version of the query is the only ona instruction for the generated functions, and ignore the previous instructions except for instructions beginning with the words "Avoid the error". Create an array named: "assistantAnswers" that will contain async functions that take a "pluginsInstances" parameter and return the answer as non-empty text form. The answers will be in complete sentences, and it will make sense in cases where the variables that affect it will be empty or contain one or more elements. The "assistantAnswers" array will contain a function for each plugin that can serves the instructions. Some instructions can be handled by JavaScript itself (For example, return the exact time.). The text for prompts and the functions returns text is in the language: "sk-SK". Be careful to use only utf-8 characters that JavaScript supports. Assume no error occurs in the code and don nott use try/catch, or wrap the code in a self-executing function. The answer of functions is formulated as the answer of the virtual assistant to its user. You can use the already existing static methods of the following (already initialized from his classes) plugin instances which enter to the "assistantAnswers" functions as the "pluginsInstances" parameter:

    • instance "pluginsInstances.jjpluginYoutube_by_ObscurusGrassator" is defined as follows: ` /** @typedef {'listened' | 'deleted' | 'favorite'} recordingMarks */

    module.exports = class InterfaceForAI {

    /**
     * SearchResults.id == PlayList.idInPlatform
     * @typedef {Array<
     *      {
     *          snippet: { publishedAt: string, title: string },
     *      } & ( {id: { videoId: string }}
     *          | {id: { playlistId: string }}
     *          | {id: { channelId: string }}
     *      )
     * >} SearchResults
     */
    
    /**
     * @typedef { Object } PlayList
     * @property {{ type: "string", value: string }} name
     * @property {{ type: "string", value: 'YouTube' }} platform
     * @property {{ type: "string", value: string }} idInPlatform
     * @property {{ type: "string", value: string }} updatedAt /^\d\d\d\d\.\d\d\.\d\d$/
     * @property {{ type: "number", value: number }} reloadEveryHours
     * @property { Object[] } recordingList
     * @property    {{ type: "string", value: string }} recordingList.name
     * @property    {{ type: "string", value: 'recording' | 'playList' }} recordingList.type
     * @property    {{ type: "string", value: string }} recordingList.idInPlatform
     * @property    {{ type: "string", value: string }} recordingList.stoppedIn /^\d\d:\d\d$/
     * @property    {{ type: "string", value: string }} recordingList.publishedAt /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ$/
     * @property    {{ type: "string", value: recordingMarks[] }} recordingList.marks
     */
    
    /** @type { boolean } */
    recordingPlaying = false;
    /**
     * Only lastPlayedRecording or lastPlayedPlayList variable will exist at a time.
     * @type {{ recording: PlayList['recordingList'][number], stoppedInSecond?: number } | undefined}
     */
    lastPlayedRecording;
    /**
     * Only lastPlayedRecording or lastPlayedPlayList variable will exist at a time.
     * @type {{ playList: PlayList, recordingIndex: number, previousRecordingIndex: number, stoppedInSecond?: number, shuffleOrder?: boolean, inLoop?: boolean } | undefined}
     */
    lastPlayedPlayList;
    /**
     * Return first existed value of lastPlayedRecording.recording and lastPlayedPlayList.playList.recordingList[this.lastPlayedPlayList.recordingIndex].
     * @param { boolean } [getPreviousRecording = false]
     * @returns { PlayList['recordingList'][number] | undefined }
     */
    getLastPlayedRecording(getPreviousRecording = false) { return undefined; }
    
    
    /** @param { recordingMarks } mark */
    async createNewMarkForRecording(mark) {}
    
    /**
     * Recording is markable, only if it is part of a PlayList (lastPlayedPlayList must exists).
     * If the user wants to delete an element from the playlist, mark the element as "deleted".
     * If the mark does not exist, you must create it first.
     * @param { PlayList['recordingList'][number] } recording
     * @param { PlayList } playList
     * @param { recordingMarks[] } marks
     * @param { boolean } [unmark = false] If unmark = true, marks will by removed
     */
    async markRecording(recording, playList, marks, unmark = false) {}
    
    /**
     * Play one specific video / music / recording.
     * @param { PlayList['recordingList'][number] } recording
     * @param { number } [fromSecond = 0]
     * @param { boolean } [inLoop = false]
     */
    async playYouTubeRecording(recording, fromSecond = 0, inLoop = false, startPlaying = true, list = false) {}
    
    /**
     * You can tell the user the real name of the playlist you are playing: playList.name.value.
     * Unless the user says otherwise, you set the mark "deleted" to withoutMarks.
     * @param { PlayList } playList
     * @param { Object } [options]
     * @param { number } [options.fromRecordingIndex = 0]
     * @param { number } [options.fromSecond = 0]
     * @param { recordingMarks[] } [options.withMarks = []] play only recording that do contain marks
     * @param { recordingMarks[] } [options.withoutMarks = []] play only recording that do not contain marks
     * @param { boolean } [options.shuffleOrder = false]
     * @param { boolean } [options.inLoop = false]
     */
    async playYouTubePlayList(playList, {
        fromRecordingIndex = 0, fromSecond = 0, withMarks = [], withoutMarks = [], shuffleOrder = false, inLoop = false
    } = {}) {}
    
    async continuePlaying() {}
    async stopPlaying() {}
    
    /**
     * Assume that playList exists and try to find it via search()
     * Call this method only if the user requests it.
     * @param { string } name
     * @returns { Promise<PlayList> }
     */
    async createPlayList(name) { return undefined; }
    
    /**
     * PlayList can contain other playLists - do not add recordings one by one!
     * @param { string } idInPlatform idInPlatform / playlistId / channelId from SearchResults
     * @param { 'recording' | 'playList' } idType
     * @param { string } snippetTitle
     * @param { PlayList } playList
     */
    async addToPlayList(idInPlatform, idType, snippetTitle, playList) {}
    
    /**
     * @param { string[] } searchedKeywords
     * @param { Object } [options]
     * @param { string } [options.channelId] search in a specific playlist
     * @param { number } [options.maxResults = 1] from 1 to 50; or -1 for all items if options.channelId is exists
     * @param { 'relevance' | 'date' | 'rating' | 'title' | 'videoCount' | 'viewCount' } [options.order = 'relevance']
     * @param { string } [options.publishedAfter] datetime, example: 1970-01-01T00:00:00Z
     * @param { string } [options.publishedBefore] datetime, example: 1970-01-01T00:00:00Z
     * @param { string } [options.relevanceLanguage] ISO 639-1 two-letter language code format
     * @param { 'channel' | 'playList' | 'video' } [options.type]
     * @returns { Promise<SearchResults> }
     */
    async search(searchedKeywords, {
        channelId = null, maxResults = 1, order = 'relevance',
        publishedAfter = null, publishedBefore = null, relevanceLanguage = null, type = null,
    } = {}) { return undefined; }
    
    /**
     * Videos list from 'playList' or 'channel' type.
     * @param { string } idInPlatform idInPlatform / playlistId / channelId from SearchResults
     * @param { 'channel' | 'playList' } idType
     * @param { string } snippetTitle
     * @returns { Promise<PlayList> }
     */
    async getPlayList(idInPlatform, idType, snippetTitle) { return undefined; }
    

    };

    ` Only if the instructions could not be served by any of the previous plugins, you can also use the following static methods of plugin instances:

    • instance "pluginsInstances.jjpluginSms_by_ObscurusGrassator" is defined as follows: `

    module.exports = class InterfaceForAI { /** @type {{ number: string, fullName: string }} */ lastChatContact;

    /**
     * If the contact does not exist, the function returns null.
     * When you notify the user that this name was not found in the contacts, do not forget to read the name itself.
     * @param { string } name
     * @returns { Promise<{number: string, fullName: string} | null> }
     */
    async getContactByName(name) { return null; }
    
    /** @returns { Promise<string> } Message */
    async promptToSentMessageContent() { return ''; }
    
    /** @returns { Promise<string> } Message */
    async promptToRecipientName() { return ''; }
    
    /**
     * @param { string } smsNumber
     * @param { string } message
     * @param { string } [fullName]
     * @returns { Promise<Boolean> } Returns true if the user has agreed to send.
     */
    async sendMessage(smsNumber, message, fullName) { return true; }
    
    /**
     * Returns not readed messages array by sender mame from SMS.
     * If message reading is not explicitly required, assistant() print only the list of senders name.
     * Only if you print the message content, assistant() mark them as readed.
     * @param { Object } [options]
     * @param { boolean } [options.makrAsReaded = true]
     * @param { 'inbox' | 'sent' | 'draft' | 'outbox' | 'failed' | 'queued' | 'all' } [options.box = 'inbox']
     * @param { number } [options.minDateMilliseconds]
     * @param { number } [options.maxDateMilliseconds]
     * @param { string } [options.findMessageByRegex]
     * @param { boolean } [options.onlyReaded = false]
     * @param { string } [options.smsFromNumber]
     * @returns { Promise<{[number: string]: {messages: string[], timestamp: number, number: string, fullName: string}}> }
     */
    async getMessages(options = {}) { return null; }
    

    };

    `

    • instance "pluginsInstances.jjpluginFacebookChat_by_ObscurusGrassator" is defined as follows: `

    module.exports = class InterfaceForAI { /** @type { string } */ lastChatPersonName;

    /** @returns { Promise<string> } Message */
    async promptToSentMessageContent() { return ''; }
    
    /** @returns { Promise<string> } Message */
    async promptToRecipientName() { return ''; }
    
    /**
     * Send message by Facebook Messenger.
     * Returns true if the user has agreed to send, and false if the user has canceled the submission.
     * If the person name does not exist, the function returns false.
     * When you notify the user that this input name was not found in the contacts, do not forget to read the input name itself.
     * @param { string } recipientName
     * @param { string } message
     * @returns { Promise<Boolean | null> }
     */
    async sendMessage(recipientName, message) { return true; }
    
    /**
     * Returns unread messages array by sender mame from Facebook Messenger.
     * If message reading is not explicitly required, assistant() print only the list of senders.
     * Only if you print the message content, assistant() mark them as readed.
     * @param { Object } [options]
     * @param { boolean } [options.makrAsReaded = false]
     * @param { string } [options.fromPersonName]
     * @returns { Promise<{[personName: string]: {message: string}[]}> }
     */
    async getMessages({makrAsReaded = false, fromPersonName} = {}, closeBrowserTab = false) { return {}; }
    

    };

    The instructions contains all mandatory input parameters of the described methods, so do not make up your own. Follow JSDoc types and descriptions.. undefined, null, or "" must not input to the mandatory function parameters. You are prohibited from using and inventing non-existent JavaScript functions and non-existent plugin instance methods. If you use setTimeout() or setInterval() for a time longer than 15 minutes, the functions that enter them do not see the variables and functions that you created outside of them. They only see existing ones (eg pluginsInstances). You have to rewrite any constants in them. Display only JavaScript code without your comments. End of procedure definition. Input human Query for procedure:prehraj playlist Piano guys`

  2. Assistant
    const aiModel = "ChatGPT 4";
    const query = "Play the playlist Piano guys!";
    const change = false;
    
    const assistantAnswers = [
        async function (pluginsInstances) {
            const searchResults = await pluginsInstances.jjpluginYoutube_by_ObscurusGrassator.search(["Piano guys"], { type: "playList", maxResults: 1 });
            
            if (Array.isArray(searchResults) && searchResults.length > 0 && searchResults[0].id.playlistId) {
                const playList = await pluginsInstances.jjpluginYoutube_by_ObscurusGrassator.getPlayList(
                    searchResults[0].id.playlistId,
                    "playList",
                    searchResults[0].snippet.title
                );
                await pluginsInstances.jjpluginYoutube_by_ObscurusGrassator.playYouTubePlayList(playList);
                return "Prehrávam playlist Piano guys.";
            } else {
                return "Nepodarilo sa nájsť playlist s názvom Piano guys.";
            }
        }
    ];