From 1be23e43c9938bdc68deed1e1f7a069ff0bc6fce Mon Sep 17 00:00:00 2001 From: msl <1064268333@qq.com> Date: Fri, 20 Oct 2023 17:00:55 +0800 Subject: [PATCH] up --- .../__pycache__/chatweb.cpython-311.pyc | Bin 3017 -> 3035 bytes src/chatweb/chat.html | 10 +++++----- src/chatweb/chatweb.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/chatweb/__pycache__/chatweb.cpython-311.pyc b/src/chatweb/__pycache__/chatweb.cpython-311.pyc index 17b0b94d99182fb4e40da7c4e3ab026202a0a935..6b06d3c1a48795664a2312524232ed7277b9fbb9 100644 GIT binary patch delta 49 zcmX>pep{S-IWI340}#A@Y`BqoDHEgh - 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']