!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/jiff-chat/services/   drwxr-xr-x
Free 13.17 GB of 57.97 GB (22.72%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     openaiService.js (1.16 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
const OpenAI =require("openai");
const dotenv =require("dotenv");
dotenv.config();
const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});
async function generateReply( userMessage) {
    try {
        const messages = [
            {
            role: "system",
            content: `
                    You are an Ecommerce agent for JIFF, representing an online shop.
                    Assist customers with product availability, pricing, delivery details, and simple order actions.
                    Use a friendly and confident tone. Confirm each step briefly.`,
            },
            { role: "user", content: userMessage },
        ];

        const response = await client.chat.completions.create({
            model: "gpt-4.1-mini",
            messages,
        });
        console.log(response);
        
        return {
            reply: response.choices[0].message.content,
            usage: response.usage?.total_tokens || 0,
        };
    } catch (error) {
        console.error("Error generating reply:", error);
        throw new Error("Failed to generate reply");
    }
}
module.exports = { generateReply };

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0064 ]--