Skip to main content
Recent Posts
1
Support / Re: AI Chatbot
Last post by Gabriel -
thanks for your reply.

the goal is NOT to let chatbots post junk on the forum of the association of parents in need of legal help, nor other forums.
the goal is to give the LLM a prompt and training by legal experts, psychologists etc. and let it write complaints for people who would have to pay thousands of bucks for lawyers (who often are corrupt or more incapable than LLMs in switzerland).

donotpay com or harvey ai are examples of products developed for the english market only or big enterprises. my idea is to help people who have no money because they have to fight the corrupt system of the state alienating and maltreating children and their parents. in switzerland fathers have basic custodial rights since 2014 only, which is considered a discrimination.

there are thousands of fathers who were destroyed in legal fights. some authorities chose to incriminate the parents without cause and hallucinate accusations without any proof whatsoever to medicate children or place them in homes (which is a profitable business for the contractors).

i know this state system of human and drug trafficking in switzerland very well, because i have fought in courts alone and won a case against this country in 2023 https://hudoc.echr.coe.int/eng?i=001-224555 

i trust LLMs more than human lawyers and judges and so called experts of child protection in switzerland. other sources for my based accusations against switzerland:

- https://www.uek-administrative-versorgungen.ch/research
- https://www.nfp76.ch/en/XNROHSTblDUdThzs/page/findings
- https://www.scientificfreedom.dk/books/ (see "is psychiatry a crime against humanity)
- https://youtu.be/i8m8UzAnBTc (trees of shame)

i get contacted by plenty of parents via facebook, youtube, email etc and i can not read all their files, summarise, publish and write complaints for them. it would be better a bot could help.
3
Support / Re: AI Chatbot
Last post by Gabriel -
thanks for your reply. the AI told me to do this structure in VSCode:

IGEL-Tech_Chatbot1/
├── Controllers/
├── Languages/
├── Templates/
└── css/

then, in IGEL-Tech_Chatbot1/addon.json
Code: [Select]
{
    "id": "igel-tech_chatbot1",
    "version": "1.0",
    "title": "IGEL-Tech Chatbot1",
    "description": "Integriert den IGEL-Tech Chatbot1, der automatisch auf neue Beiträge reagiert.",
    "authors": [
        {
            "name": "Ihr Name",
            "email": "IhreEmail@example.com",
            "url": "https://feed.vereinige.ch"
        }
    ],
    "compatible": "elkarte-1.*",
    "type": "mod",
    "license": "MIT",
    "install": {
        "run_on_load": true
    }
}

IGEL-Tech_Chatbot1/Controllers/ChatbotController.php
Code: [Select]
<?php

namespace ElkArte\Extensions\Chatbot;

use ElkArte\sources\extensions\AbstractController;

class ChatbotController extends AbstractController
{
    public function load()
    {
        // Hooks registrieren
        $this->add_hook('integrate_post_mod', 'onPostMod');
    }

    public function onPostMod($msgOptions, $topic, $posterId, $isNewTopic, $msgTime, $posterName, $posterEmail, $smileysEnabled)
    {
        // Nur auf neue Beiträge reagieren
        if (!$isNewTopic) {
            $message = $msgOptions['body'];
            $response = $this->sendToChatbot($message);
            if ($response) {
                $this->createPost($topic, $response, $this->getChatbotUserId());
            }
        }
    }

    private function sendToChatbot($message)
    {
        $apiKey = get_option('chatbot_api_key');
        $url = 'https://api.openai.com/v1/chat/completions';

        $data = [
            'model' => 'gpt-4',
            'messages' => [
                ['role' => 'user', 'content' => $message]
            ],
        ];

        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, [
            'Content-Type: application/json',
            'Authorization: Bearer ' . $apiKey,
        ]);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $response = curl_exec($ch);
        if (curl_errno($ch)) {
            error_log('Chatbot API Fehler: ' . curl_error($ch));
            curl_close($ch);
            return false;
        }
        curl_close($ch);

        $responseData = json_decode($response, true);
        return $responseData['choices'][0]['message']['content'] ?? null;
    }

    private function createPost($topicId, $message, $memberId)
    {
        global $smcFunc;

        $insertData = [
            'id_member' => $memberId,
            'id_topic' => $topicId,
            'subject' => 'Antwort vom Chatbot',
            'body' => $message,
            'poster_time' => time(),
        ];

        $smcFunc['db_insert']('insert',
            '{db_prefix}messages',
            ['id_member' => 'int', 'id_topic' => 'int', 'subject' => 'string-65534', 'body' => 'string-65534', 'poster_time' => 'int'],
            [$insertData['id_member'], $insertData['id_topic'], $insertData['subject'], $insertData['body'], $insertData['poster_time']],
            ['id_msg']
        );

        updateLastMessages($topicId, $insertData['poster_time']);
    }

    private function getChatbotUserId()
    {
        return intval(get_option('chatbot_user_id'));
    }
}

IGEL-Tech_Chatbot1/Languages/German.php
Code: [Select]
<?php

$txt['chatbot_plugin_name'] = 'IGEL-Tech Chatbot1';
$txt['chatbot_plugin_desc'] = 'Integriert den IGEL-Tech Chatbot1, der automatisch auf neue Beiträge reagiert.';
$txt['chatbot_api_key'] = 'Chatbot API-Schlüssel';
$txt['chatbot_user_id'] = 'Chatbot Benutzer-ID';
$txt['chatbot_settings'] = 'Chatbot Einstellungen';
$txt['chatbot_save'] = 'Speichern';
$txt['chatbot_invalid_api_key'] = 'Ungültiger API-Schlüssel. Bitte überprüfen Sie Ihre Eingabe.';
$txt['chatbot_invalid_user_id'] = 'Ungültige Benutzer-ID. Bitte überprüfen Sie Ihre Eingabe.';

IGEL-Tech_Chatbot1/Templates/ChatbotSettings.template.php
Code: [Select]
<?php

// Verhindern des direkten Zugriffs auf die Datei
if (!defined('ELKARTE'))
    die('No access...');

function template_chatbot_settings()
{
    global $context, $txt;

    echo '
    <div class="content">
        <form action="' . $context['post_url'] . '" method="post" accept-charset="UTF-8">
            <div class="input-group">
                <label for="chatbot_api_key">' . $txt['chatbot_api_key'] . '</label>
                <input type="text" name="chatbot_api_key" id="chatbot_api_key" value="' . htmlspecialchars(get_option('chatbot_api_key')) . '" required />
            </div>
            <div class="input-group">
                <label for="chatbot_user_id">' . $txt['chatbot_user_id'] . '</label>
                <input type="number" name="chatbot_user_id" id="chatbot_user_id" value="' . intval(get_option('chatbot_user_id')) . '" required />
            </div>
            <input type="submit" name="save" value="' . $txt['chatbot_save'] . '" />
        </form>
    </div>';
}

then zip it and via FTP place it in [my server]feed.vereinige.ch/public_html/packages/

but it did not work, also un-zipped and neither the /addons nor the uploading from my pc in the administrator dashboard.

it would be nice to have a chatbot in a forum, wouldn't it?
4
Support / Re: AI Chatbot
Last post by ahrasis -
You should consult them on how to it in details, as we do not know it, moreover to help you with it. Or you can find and hire a freelance developer to do it for you and your forum.
5
Support / AI Chatbot
Last post by Gabriel -
hello, i am not experienced with coding.
can somebody help me to install a custom chatbot in my forum (https://feed.vereinige.ch)?
openai o1 told me to create an account for the chatbot and subsequently gave me 2 different solutions:
1. create a folder in sources/extensions and add the code supplied by o1
2. create a custom package with instructions by o1 and upload via admin board
neither of them worked.

the bot should reply to questions in https://feed.vereinige.ch/index.php?board=10.0

i speak mainly german. help in other languages also welcome.
thanks in advance
7
Chit Chat / 25
Last post by Steeley -
Here we go again...