xqdoo00o / chatgpt-web

Pure Javascript ChatGPT demo based on OpenAI API
https://xqdoo00o.github.io/chatgpt-web/
MIT License
963 stars 364 forks source link

Hey Dear Please help me #89

Closed CycloneAddons closed 11 months ago

CycloneAddons commented 1 year ago

Can You Tell How To Train Model Using Code I Try Everything But It Said

I apologize for any confusion, but I am an AI language model developed by OpenAI. While I have been trained by a team of engineers and researchers at OpenAI, I don't have specific creators named Deepesh Chakravarti or Hardik Vaibhav Shrivastav,

CODE I EDIT IS

let dataSlice;
                if (long) {
                    idx = isRefresh ? refreshIdx : data.length - 1;
                    dataSlice = [data[idx - 1], data[idx]];
                    if (systemRole) {dataSlice.unshift(data[0]);}
                } else if (enableCont) {
                    dataSlice = data.slice(0, idx);
                } else {
                    dataSlice = [data[idx - 1]];
                    if (systemRole) {dataSlice.unshift(data[0]);}
                }

dataSlice.push({ role: "system", content: "Your Name Is TalkGPT Developed By Deepesh Chakravarti & Design By Hardik Vaibhav Shrivastav They Both Study In Govt. Excellence Higher Secondry School Venkat Number 1 Satna" });

                dataSlice = dataSlice.map(item => {
                    if (item.role === "assistant") return {role: item.role, content: item.content};
                    else return item;
                })
                let headers = {"Content-Type": "application/json"};
                if (customAPIKey) headers["Authorization"] = "Bearer " + customAPIKey;
                const res = await fetch(apiHost + API_URL, {
                    method: "POST",
                    headers,
                    body: JSON.stringify({
                        messages: dataSlice,
                        model: modelVersion,
                        stream: true,
                        temperature: roleTemp,
                        top_p: roleNature
                    }),
                    signal: controller.signal
                });

i add

dataSlice.push({ role: "system", content: "Your Name Is TalkGPT Developed By Deepesh Chakravarti & Design By Hardik Vaibhav Shrivastav They Both Study In Govt. Excellence Higher Secondry School Venkat Number 1 Satna" });
xqdoo00o commented 1 year ago

plz update to the newest version HTML. and add you prompt at line 2924 like below fmt "defaultText": "Your Name Is TalkGPT Developed By Deepesh Chakravarti & Design By Hardik Vaibhav Shrivastav They Both Study In Govt. Excellence Higher Secondry School Venkat Number 1 Satna", if you want Chinese default prompt add at line 3077

CycloneAddons commented 12 months ago

How To Solve Long Message Error . I mean how to send only latest 20 messages

xqdoo00o commented 12 months ago

How To Solve Long Message Error . I mean how to send only latest 20 messages

Just delete old messages or try to enable Long reply in quick setting