Commit
·
eaeb469
1
Parent(s):
1e3f569
Should work
Browse files- app-kobold.py +5 -2
app-kobold.py
CHANGED
@@ -28,7 +28,7 @@ def bot(input_message: str, db_info="", temperature=0.1, top_p=0.9, top_k=0, rep
|
|
28 |
# Format the user's input message
|
29 |
messages = f"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: {input_message} {db_info}\n\n### Response:\n\n"
|
30 |
|
31 |
-
url = "https://
|
32 |
payload = {
|
33 |
"prompt": messages,
|
34 |
"temperature": temperature,
|
@@ -42,7 +42,10 @@ def bot(input_message: str, db_info="", temperature=0.1, top_p=0.9, top_k=0, rep
|
|
42 |
"sampler_order": [6,0,1,3,4,2,5],
|
43 |
"stop_sequence": ["###", "Result"],
|
44 |
}
|
45 |
-
headers = {
|
|
|
|
|
|
|
46 |
|
47 |
for _ in range(3):
|
48 |
try:
|
|
|
28 |
# Format the user's input message
|
29 |
messages = f"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: {input_message} {db_info}\n\n### Response:\n\n"
|
30 |
|
31 |
+
url = "https://e9f4be879d38-8269039109365193683.ngrok-free.app/api/v1/generate"
|
32 |
payload = {
|
33 |
"prompt": messages,
|
34 |
"temperature": temperature,
|
|
|
42 |
"sampler_order": [6,0,1,3,4,2,5],
|
43 |
"stop_sequence": ["###", "Result"],
|
44 |
}
|
45 |
+
headers = {
|
46 |
+
"Content-Type": "application/json",
|
47 |
+
"ngrok-skip-browser-warning": "1" # added this line
|
48 |
+
}
|
49 |
|
50 |
for _ in range(3):
|
51 |
try:
|