diff --git a/src/chatweb/__pycache__/chatweb.cpython-311.pyc b/src/chatweb/__pycache__/chatweb.cpython-311.pyc index 17b0b94..6b06d3c 100644 Binary files a/src/chatweb/__pycache__/chatweb.cpython-311.pyc and b/src/chatweb/__pycache__/chatweb.cpython-311.pyc differ diff --git a/src/chatweb/chat.html b/src/chatweb/chat.html index bdbff46..1509c2a 100644 --- a/src/chatweb/chat.html +++ b/src/chatweb/chat.html @@ -3,12 +3,12 @@ - WeChat-like Chat Interface + Artemis GPT - +
@@ -39,11 +39,11 @@ var message = $$("#messageInput").val().trim(); if (message) { - $$(".chat-content").append(`
$${message}
`); + $$("#messageInput").val(''); $$("#hidep").append("{'role': 'user', 'content':'"+message+"'},") allMessages=$$("#hidep").text() - + $$(".chat-content").append(`

$${message}

`); $$("#sendButton").prop("disabled", true); // Show loading spinner @@ -52,7 +52,7 @@ if(response) { $$("#hidep").append("{'role': 'assistant', 'content':'"+response+"'},"); response=response.replace("\n","
") - $$(".chat-content").append(`
$${response}
`); + $$(".chat-content").append(`

$${response}

`); $$("#sendButton").prop("disabled", false); $$('#loadingSpinner').remove(); diff --git a/src/chatweb/chatweb.py b/src/chatweb/chatweb.py index f563aca..cfb63fb 100644 --- a/src/chatweb/chatweb.py +++ b/src/chatweb/chatweb.py @@ -3,7 +3,7 @@ import openai def chatgpt(mess): openai.api_key ="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" response = openai.ChatCompletion.create( - model="gpt-3.5-turbo", + model="gpt-4", messages=mess ) re=response['choices'][0]['message']['content']