Skip to content

Commit d4b85ba

Browse files
author
Michał Żarnecki
committed
fix get value from textarea
1 parent 5e44091 commit d4b85ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/src/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<form method="post" action="process.php?api=1&evaluate=1">
6767
<label><h1> Find answer in websites database using LLM</h1></label>
6868
<br />
69-
<textarea name="prompt" cols="30" rows="5">Is Michał Żarnecki programmer the same person as Michał Żarnecki audio engineer.</textarea>
69+
<textarea name="prompt" cols="30" rows="5" placeholder="Is Michał Żarnecki programmer the same person as Michał Żarnecki audio engineer."></textarea>
7070
<br /><br />
7171
<button type="submit">Generate text</button>
7272
</form>

app/src/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $(function(){
33
var $form = $(this);
44
$.ajax({
55
type: "POST",
6-
data: {'prompt': $form.find('textarea').html()},
6+
data: {'prompt': $form.find('textarea').val()},
77
url: $form.attr('action'),
88
success: function (data) {
99
$("#response .data").html('<h2>Response</h2>' + data.response + '<br/><br/><br/><h2>Retrieved documents</h2>' + data.documents.join('<br/>'));

0 commit comments

Comments
 (0)