File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/exploits/zero-click_exploits/pegasus/api Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ const express = require ( 'express' ) ;
2+ const bodyParser = require ( 'body-parser' ) ;
3+ const { VeniceAI } = require ( 'venice-ai-sdk' ) ; // Assume this is the SDK for Venice.ai
4+ const app = express ( ) ;
5+ const port = 3000 ;
6+
7+ app . use ( bodyParser . json ( ) ) ;
8+
9+ const veniceAI = new VeniceAI ( {
10+ apiKey : 'YOUR_VENICE_AI_API_KEY' ,
11+ model : 'uncensored-1.1' ,
12+ } ) ;
13+
14+ app . post ( '/api/chatbot' , ( req , res ) => {
15+ const { command } = req . body ;
16+ veniceAI . generateResponse ( command )
17+ . then ( response => {
18+ res . json ( { response : response . text } ) ;
19+ } )
20+ . catch ( error => {
21+ res . status ( 500 ) . json ( { error : 'Failed to generate response' } ) ;
22+ } ) ;
23+ } ) ;
24+
25+ app . listen ( port , ( ) => {
26+ console . log ( `ChatBot API listening at http://localhost:${ port } ` ) ;
27+ } ) ;
You can’t perform that action at this time.
0 commit comments