Update handler.py
Browse files- handler.py +4 -2
handler.py
CHANGED
|
@@ -2,8 +2,7 @@ from typing import Dict, Any, List
|
|
| 2 |
from environs import Env
|
| 3 |
import json
|
| 4 |
import requests
|
| 5 |
-
|
| 6 |
-
from corechat import get_conversation_suggestions, NUMBER_OF_MESSAGES_FOR_CONTEXT as NUMBER_OF_MESSAGES_FOR_CONTEXT_CHAT
|
| 7 |
|
| 8 |
def download_env_file(url: str, local_path: str):
|
| 9 |
response = requests.get(url)
|
|
@@ -16,6 +15,9 @@ env_file_url = "https://www.dropbox.com/scl/fi/21ldek2cdsak2v3mhyy5x/openai.env?
|
|
| 16 |
local_env_path = "openai.env"
|
| 17 |
download_env_file(env_file_url, local_env_path)
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
env = Env()
|
| 20 |
|
| 21 |
class EndpointHandler:
|
|
|
|
| 2 |
from environs import Env
|
| 3 |
import json
|
| 4 |
import requests
|
| 5 |
+
|
|
|
|
| 6 |
|
| 7 |
def download_env_file(url: str, local_path: str):
|
| 8 |
response = requests.get(url)
|
|
|
|
| 15 |
local_env_path = "openai.env"
|
| 16 |
download_env_file(env_file_url, local_env_path)
|
| 17 |
|
| 18 |
+
from coresugg import create_conversation_starter_prompt, generate_conversation_starters, NUMBER_OF_MESSAGES_FOR_CONTEXT as NUMBER_OF_MESSAGES_FOR_CONTEXT_SUGG
|
| 19 |
+
from corechat import get_conversation_suggestions, NUMBER_OF_MESSAGES_FOR_CONTEXT as NUMBER_OF_MESSAGES_FOR_CONTEXT_CHAT
|
| 20 |
+
|
| 21 |
env = Env()
|
| 22 |
|
| 23 |
class EndpointHandler:
|