todo
parent
a29101296b
commit
429bdfff78
Binary file not shown.
|
|
@ -343,7 +343,7 @@ func handleAPIChatBotPost(w http.ResponseWriter, r *http.Request) error {
|
||||||
|
|
||||||
func handleAPIChatBotPut(w http.ResponseWriter, r *http.Request) error {
|
func handleAPIChatBotPut(w http.ResponseWriter, r *http.Request) error {
|
||||||
message := r.PostForm.Get("Message")
|
message := r.PostForm.Get("Message")
|
||||||
if len(message) == 0 {
|
if len(message) == 0 && r.URL.Query.Get("more") != "true" {
|
||||||
return errors.New("empty Message")
|
return errors.New("empty Message")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -475,6 +475,7 @@ func chatBotGenerateAndFillInputF(ctx context.Context, cacheF, inputF, reversePr
|
||||||
justNew = justNew[:idx+len(trimmedReversePrompt)-len(priorContent)]
|
justNew = justNew[:idx+len(trimmedReversePrompt)-len(priorContent)]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
panic("TODO TRIM THE GARBO AT THE END")
|
||||||
if err := _appendFile(inputF, string(justNew)); err != nil {
|
if err := _appendFile(inputF, string(justNew)); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendStreamLog(message) {
|
function appendStreamLog(message) {
|
||||||
if (message)
|
if (!message)
|
||||||
|
return
|
||||||
document.getElementById("stream-log").innerHTML += "\n" + message
|
document.getElementById("stream-log").innerHTML += "\n" + message
|
||||||
|
var textarea = document.getElementById("stream-log")
|
||||||
|
textarea.scrollTop = textarea.scrollHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
function startStream(newPrompt) {
|
function startStream(newPrompt) {
|
||||||
|
|
@ -65,6 +68,7 @@
|
||||||
</script>
|
</script>
|
||||||
</header>
|
</header>
|
||||||
<body onload="loadStream()">
|
<body onload="loadStream()">
|
||||||
|
TODO ?more=true
|
||||||
<details>
|
<details>
|
||||||
<summary>Set up a new session</summary>
|
<summary>Set up a new session</summary>
|
||||||
<form id="prompt" onsubmit="startStream(this); return false;">
|
<form id="prompt" onsubmit="startStream(this); return false;">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue