OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
creator
/
genai
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
01/21/2025 10:39:45 AM
rwxr-xr-x
📄
genai.php
18.3 KB
01/21/2025 10:39:29 AM
rw-r--r--
📄
genai_article_save.php
1.6 KB
01/21/2025 10:39:29 AM
rw-r--r--
📄
genai_function.php
17.26 KB
01/21/2025 10:39:30 AM
rw-r--r--
📄
genai_save.php
2.13 KB
01/21/2025 10:39:30 AM
rw-r--r--
📄
genai_style.css
4.35 KB
01/21/2025 10:39:31 AM
rw-r--r--
📄
genaicreative.php
18.57 KB
01/21/2025 10:39:28 AM
rw-r--r--
📄
index.php
56.35 KB
01/21/2025 10:39:34 AM
rw-r--r--
📄
process_genai.php
2.02 KB
01/21/2025 10:39:32 AM
rw-r--r--
Editing: process_genai.php
Close
<? include '../inc/validate.logged.php'; include '../inc/config.php'; include 'genai_function.php'; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (isset($_POST['action'])) { if ($_POST['action'] == "reset") { unset($_SESSION['prompt_message']); echo "Ok"; } } else { $type = 'genai_creator'; $profession = fetchPrompt($db, $gUserId); if (isset($_POST['working_headline'])) { $working_headline = $_POST['working_headline']; } else { $working_headline = ''; } if (isset($_POST['avatar'])) { $avatar = $_POST['avatar']; } $avatarData = fetchAvatar($avatar); $model = "gpt-4o"; //Ensure to update the GPT model when required $system_prompt = array( array( "role" => "system", "content" => "Try to complete the sentence within the max_tokens." ), array( "role" => "system", "content" => "Try to complete the sentence even if the max_tokens is reached." ), array( "role" => "system", "content" => "Always use mysql compatible svg embeds to show icons or images if you are using them to pepper the response." ) ); if($profession != null){ $system_prompt[] = array( "role" => "system", "content" => $profession ); } if($avatarData != null){ $system_prompt[] = array( "role" => "system", "content" => $avatarData ); } $user_prompts = isset($_SESSION['prompt_message']) ? $_SESSION['prompt_message'] : array(); $user_prompts[] = array( "role" => "user", "content" => $working_headline ); print_r(processPrompt($type, $system_prompt, $user_prompts, $model)); } }