todo
This commit is contained in:
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 {
|
||||
message := r.PostForm.Get("Message")
|
||||
if len(message) == 0 {
|
||||
if len(message) == 0 && r.URL.Query.Get("more") != "true" {
|
||||
return errors.New("empty Message")
|
||||
}
|
||||
|
||||
@@ -475,6 +475,7 @@ func chatBotGenerateAndFillInputF(ctx context.Context, cacheF, inputF, reversePr
|
||||
justNew = justNew[:idx+len(trimmedReversePrompt)-len(priorContent)]
|
||||
}
|
||||
}
|
||||
panic("TODO TRIM THE GARBO AT THE END")
|
||||
if err := _appendFile(inputF, string(justNew)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -12,8 +12,11 @@
|
||||
}
|
||||
|
||||
function appendStreamLog(message) {
|
||||
if (message)
|
||||
if (!message)
|
||||
return
|
||||
document.getElementById("stream-log").innerHTML += "\n" + message
|
||||
var textarea = document.getElementById("stream-log")
|
||||
textarea.scrollTop = textarea.scrollHeight
|
||||
}
|
||||
|
||||
function startStream(newPrompt) {
|
||||
@@ -65,6 +68,7 @@
|
||||
</script>
|
||||
</header>
|
||||
<body onload="loadStream()">
|
||||
TODO ?more=true
|
||||
<details>
|
||||
<summary>Set up a new session</summary>
|
||||
<form id="prompt" onsubmit="startStream(this); return false;">
|
||||
|
||||
Reference in New Issue
Block a user