fixup configuration for irc-framework
This commit is contained in:
		
							parent
							
								
									2d3892ddc6
								
							
						
					
					
						commit
						8a59e82604
					
				@ -2,7 +2,7 @@
 | 
			
		||||
    "server": "irc.libera.chat",
 | 
			
		||||
    "port": 6697,
 | 
			
		||||
    "nick": "chatgpt",
 | 
			
		||||
    "tsl": false,
 | 
			
		||||
    "tls": false,
 | 
			
		||||
    "sasl": false,
 | 
			
		||||
    "username": "chatgpt",
 | 
			
		||||
    "password": "",
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								index.js
									
									
									
									
									
								
							@ -55,7 +55,7 @@ client.connect({
 | 
			
		||||
    host: config.server,
 | 
			
		||||
    nick: config.nick,
 | 
			
		||||
    username: config.username,
 | 
			
		||||
    tls: config.tsl,
 | 
			
		||||
    tls: config.tls,
 | 
			
		||||
    port: config.port,
 | 
			
		||||
    account: {
 | 
			
		||||
        account: config.username,
 | 
			
		||||
@ -82,10 +82,10 @@ client.on('message', async (event) => {
 | 
			
		||||
            client.say(event.target, `(chat from ${event.nick} ignored, response in progress)`)
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        let query = is_chat_cmd ? event.message.slice(chatCmd.length + 1) : event.message.slice(contCmd.length + 1);
 | 
			
		||||
        if (is_chat_cmd && !config.alwaysRemember) {
 | 
			
		||||
            context.clear();
 | 
			
		||||
        }
 | 
			
		||||
        const query = event.message.slice(chatCmd.length + 1);
 | 
			
		||||
        context.add_user_prompt(query);
 | 
			
		||||
        try {
 | 
			
		||||
            await chatgpt(query, context.messages, handleChatGPTResponseLine);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user