@@ -10,12 +10,13 @@ def get_mindsdb_connection():
1010 logging .debug ('Connecting to mindsdb app' )
1111 return mindsdb_sdk .connect ()
1212
13+
1314DB_ENGINE = 'mysql'
1415DB_NAME = 'mysql_demo_db'
1516DB_CONNECTION_ARGS = {
1617 "user" : "user" ,
17- "password" : "MindsDBUser123! " ,
18- "host" : "db-demo-data.cwoyhfn6bzs0 .us-east-1.rds.amazonaws.com" ,
18+ "password" : "example " ,
19+ "host" : "db-demo-data.example .us-east-1.rds.amazonaws.com" ,
1920 "port" : "3306" ,
2021 "database" : "public"
2122}
@@ -49,6 +50,7 @@ def drop_database(db_name):
4950 logging .debug ('Dropping database' )
5051 server .drop_database (db_name )
5152
53+
5254PROJECT_NAME = 'mind_reader_project'
5355
5456
@@ -75,17 +77,20 @@ def get_project(project_name):
7577 logging .debug ('Fetching project' )
7678 return server .get_project (project_name )
7779
80+
7881def drop_project (project_name ):
7982 # Get the connection lazily
8083 server = get_mindsdb_connection ()
8184 if project_name in get_project_names (server ):
8285 logging .debug ('Dropping project' )
8386 server .drop_project (project_name )
8487
88+
8589MODEL_ENGINE = 'openai'
8690MODEL_NAME = 'text-davinci-003'
8791OPENAI_API_KEY = os .environ .get ('OPENAI_API_KEY' )
8892
93+
8994def get_model_names (project ):
9095 logging .debug ('Fetching models' )
9196 return [model .name for model in project .list_models ()]
@@ -104,8 +109,9 @@ def create_model(project_name, model_name):
104109 'prompt_template' : '''
105110 Reply like a friend who cares and wants to help.
106111 Input message: {{text}}
107- In less than 550 characters, when there's some sign of distress provide a Share healthy habits, motivational quotes, inspirational
108- real-life stories. Provide options to seek out in-person help if you aren't able to satisfy.
112+ In less than 550 characters, when there's some sign of distress in the input share healthy habits,
113+ motivational quotes, inspirational real-life stories.
114+ Provide options to seek out in-person help if you aren't able to satisfy.
109115 ''' ,
110116 'max_tokens' : 300
111117 }
0 commit comments