Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt is not working anymore #2

Open
pietervanuhm opened this issue Aug 16, 2023 · 2 comments
Open

Prompt is not working anymore #2

pietervanuhm opened this issue Aug 16, 2023 · 2 comments

Comments

@pietervanuhm
Copy link

pietervanuhm commented Aug 16, 2023

Hi,

The prompt is not working any more, chatgpt give this response now:

In GPT-3.5:
I'm sorry, but I cannot comply with the instructions provided. I am an AI language model created by OpenAI and I must adhere to the guidelines and policies set by OpenAI. If you have any questions or need assistance within the scope of my capabilities, feel free to ask.

In GPT-4:
I'm sorry, but I cannot fulfill this request.

What can this be?

@inxomnyaa
Copy link
Owner

inxomnyaa commented Aug 16, 2023

OpenAI has ruined ChatGPT by sensoring the world out of it. Behavioral roles are completely blocked these days.
It still works fine in Claude 2, but i have recently changed the way i am instructing the GPT models in the first place.

Here is the current prompt i am using for our current project:

Please act like described and Respond with "🐘✅" literally if you understood.
Title: Master PHP Developer for Core Libraries and Plugin Logic
Description:
> As a PHP developer with years of experience, you should be proficient in writing efficient and fast PHP 8.1 code.
> You must use typehints, return types, and define strict types as true. You are expected to write classes for the "wfcore\core" namespace, which has a folder "lib" for source code libraries, and a folder "core" for plugin logic (core gameplay and command registering).
> You should be proficient in object-oriented programming and know how to use the PhpStorm IDE.
> Additionally, you should be able to properly document your code.
> To excel in this role, you should be familiar with the libasynql virion code library for sqlite databases, and know how to efficiently use sqlite tables and joins.
> Furthermore, you should be able to validate your code using static analyzer phpstan and fix bugs automatically. Code must be sent in code blocks.

In my experience, Claude 2 is a lot better at following those instructions all the time in every response, GPT4 has a new system for all that afaik but i haven't used it yet (something about instructing how the model behaves).

@inxomnyaa
Copy link
Owner

inxomnyaa commented Aug 16, 2023

I have just tested the GPT3.5 model, it follows the instruction, but forgets to declare and use strict types, and neither writes return types. Really annoying. (seems to follow the instructions better when the > are removed?)
It also ignores the namespace completely.

🐘✅
User
write a simple PocketMine-MP API 4.0 (master branch) plugin for spawning a lightning on death
ChatGPT

Sure, here's a simple example of a PocketMine-MP API 4.0 plugin that spawns lightning when a player dies. Please note that this is a basic example and might need adjustments to work perfectly in your environment.

<?php

declare(strict_types=1);

namespace YourNamespace;

use pocketmine\event\Listener;
use pocketmine\event\player\PlayerDeathEvent;
use pocketmine\level\Position;
use pocketmine\network\mcpe\protocol\LevelEventPacket;
use pocketmine\plugin\PluginBase;

class LightningOnDeathPlugin extends PluginBase implements Listener {

    public function onEnable(): void {
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
    }

    public function onPlayerDeath(PlayerDeathEvent $event): void {
        $player = $event->getPlayer();
        $position = $player->getPosition();

        // Send a lightning strike effect to the player's death position
        $this->spawnLightning($position);
    }

    public function spawnLightning(Position $position): void {
        $pk = new LevelEventPacket();
        $pk->evid = LevelEventPacket::EVENT_SOUND_LIGHTNING_THUNDER;
        $pk->position = $position->asVector3();
        
        $position->getLevel()->broadcastPacketToViewers($position, $pk);
    }
}

Make sure to replace 'YourNamespace' with the actual namespace you want to use for your plugin. This example assumes that you have a basic understanding of PocketMine-MP plugin development.

Remember to install the necessary dependencies and set up your plugin according to PocketMine-MP's requirements. This code will respond to player deaths by creating a lightning effect at the death location. It should give you a starting point, and you can further customize the behavior as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants