Skip to content

Commit 001a7f5

Browse files
committed
fix: update
2 parents 45c1109 + 17b9a2c commit 001a7f5

File tree

66 files changed

+20172
-10772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+20172
-10772
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ _dev
88
__dev
99
.vercel
1010
.vscode/
11+
12+
.vercel

apps/hasura/metadata/databases/masterbots/tables/public_category.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ array_relationships:
1414
foreign_key_constraint_on:
1515
column: category_id
1616
table:
17-
name: label_chatbot_category
17+
name: label_chatbot_category_domain
1818
schema: public
1919
select_permissions:
2020
- role: anonymous

apps/hasura/metadata/databases/masterbots/tables/public_chatbot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ array_relationships:
4141
foreign_key_constraint_on:
4242
column: chatbot_id
4343
table:
44-
name: label_chatbot_category
44+
name: label_chatbot_category_domain
4545
schema: public
4646
- name: preferences
4747
using:

apps/hasura/metadata/databases/masterbots/tables/public_label.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ array_relationships:
77
foreign_key_constraint_on:
88
column: label_id
99
table:
10-
name: label_chatbot_category
10+
name: label_chatbot_category_domain
1111
schema: public
1212
select_permissions:
1313
- role: anonymous

apps/hasura/metadata/databases/masterbots/tables/public_message.yaml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,35 @@ table:
22
name: message
33
schema: public
44
object_relationships:
5+
- name: message
6+
using:
7+
foreign_key_constraint_on: augmented_from
58
- name: messageTypeEnum
69
using:
710
foreign_key_constraint_on: role
811
- name: thread
912
using:
1013
foreign_key_constraint_on: thread_id
14+
array_relationships:
15+
- name: messages
16+
using:
17+
foreign_key_constraint_on:
18+
column: augmented_from
19+
table:
20+
name: message
21+
schema: public
1122
insert_permissions:
1223
- role: moderator
1324
permission:
1425
check: {}
1526
columns:
27+
- augmented_from
1628
- content
17-
- role
1829
- created_at
30+
- examples
1931
- message_id
32+
- prompt
33+
- role
2034
- thread_id
2135
comment: ""
2236
- role: user
@@ -26,19 +40,26 @@ insert_permissions:
2640
user_id:
2741
_eq: X-Hasura-User-Id
2842
columns:
43+
- augmented_from
2944
- content
3045
- role
3146
- created_at
47+
- examples
3248
- message_id
49+
- prompt
50+
- role
3351
- thread_id
3452
comment: ""
3553
select_permissions:
3654
- role: anonymous
3755
permission:
3856
columns:
57+
- augmented_from
3958
- content
4059
- created_at
60+
- examples
4161
- message_id
62+
- prompt
4263
- thread_id
4364
- role
4465
filter: {}
@@ -47,19 +68,24 @@ select_permissions:
4768
permission:
4869
columns:
4970
- content
50-
- role
5171
- created_at
72+
- examples
5273
- message_id
74+
- prompt
75+
- role
5376
- thread_id
5477
filter: {}
5578
comment: ""
5679
- role: user
5780
permission:
5881
columns:
82+
- augmented_from
5983
- content
6084
- role
6185
- created_at
86+
- examples
6287
- message_id
88+
- prompt
6389
- thread_id
6490
filter: {}
6591
comment: ""

apps/hasura/metadata/databases/masterbots/tables/public_thread.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,19 @@ insert_permissions:
4747
comment: ""
4848
- role: user
4949
permission:
50-
check:
51-
thread:
52-
user_id:
53-
_eq: X-Hasura-User-Id
50+
check: {}
51+
set:
52+
user_id: x-hasura-User-Id
5453
columns:
5554
- chatbot_id
55+
- created_at
56+
- is_approved
57+
- is_blocked
5658
- is_public
5759
- model
5860
- parent_thread_id
5961
- thread_id
62+
- updated_at
6063
- user_id
6164
comment: ""
6265
select_permissions:
@@ -66,6 +69,7 @@ select_permissions:
6669
- chatbot_id
6770
- created_at
6871
- is_approved
72+
- is_blocked
6973
- is_public
7074
- model
7175
- parent_thread_id
@@ -97,17 +101,14 @@ select_permissions:
97101
- chatbot_id
98102
- created_at
99103
- is_approved
104+
- is_blocked
100105
- is_public
101106
- model
102107
- parent_thread_id
103108
- thread_id
104109
- updated_at
105110
- user_id
106-
filter:
107-
thread:
108-
user_id:
109-
_eq: X-Hasura-User-Id
110-
allow_aggregations: true
111+
filter: {}
111112
comment: ""
112113
update_permissions:
113114
- role: moderator
@@ -123,8 +124,13 @@ update_permissions:
123124
permission:
124125
columns:
125126
- chatbot_id
127+
- created_at
126128
- is_public
127129
- model
130+
- parent_thread_id
131+
- thread_id
132+
- updated_at
133+
- user_id
128134
filter:
129135
thread:
130136
user_id:

apps/hasura/metadata/databases/masterbots/tables/public_user.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ insert_permissions:
7676
- favourite_topic
7777
- get_free_month
7878
- is_blocked
79+
- is_verified
7980
- last_login
80-
- password
8181
- pro_user_subscription_id
8282
- profile_picture
8383
- role
@@ -122,8 +122,10 @@ select_permissions:
122122
- role: moderator
123123
permission:
124124
columns:
125+
- bio
125126
- date_joined
126127
- email
128+
- favourite_topic
127129
- get_free_month
128130
- is_blocked
129131
- is_verified
@@ -163,15 +165,17 @@ update_permissions:
163165
columns:
164166
- bio
165167
- date_joined
168+
- email
166169
- favourite_topic
167170
- get_free_month
168171
- is_blocked
172+
- is_verified
169173
- last_login
170-
- password
171174
- pro_user_subscription_id
172175
- profile_picture
173176
- role
174177
- slug
178+
- user_id
175179
- username
176180
filter: {}
177181
check: null

apps/hasura/metadata/databases/masterbots/tables/tables.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
- "!include public_category.yaml"
2+
- "!include public_category_enum.yaml"
23
- "!include public_chat.yaml"
34
- "!include public_chatbot.yaml"
45
- "!include public_chatbot_category.yaml"
56
- "!include public_complexity_enum.yaml"
7+
- "!include public_domain_enum.yaml"
8+
- "!include public_example.yaml"
69
- "!include public_label.yaml"
7-
- "!include public_label_chatbot_category.yaml"
10+
- "!include public_label_chatbot_category_domain.yaml"
811
- "!include public_length_enum.yaml"
912
- "!include public_message.yaml"
1013
- "!include public_message_type_enum.yaml"
@@ -16,6 +19,8 @@
1619
- "!include public_prompt_user.yaml"
1720
- "!include public_referral.yaml"
1821
- "!include public_social_following.yaml"
22+
- "!include public_subcategory_enum.yaml"
23+
- "!include public_tag_enum.yaml"
1924
- "!include public_thread.yaml"
2025
- "!include public_token.yaml"
2126
- "!include public_tone_enum.yaml"

apps/hasura/seeds/masterbots/1724269974513_init_config_seeds.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ INSERT INTO public.category VALUES (9, 'Homecare')
7373
ON CONFLICT (category_id) DO NOTHING;
7474
INSERT INTO public.category VALUES (10, 'Legal')
7575
ON CONFLICT (category_id) DO NOTHING;
76+
INSERT INTO public.category VALUES (11, 'Natural Health')
77+
ON CONFLICT (category_id) DO NOTHING;
7678
INSERT INTO public.category VALUES (13, 'Other')
7779
ON CONFLICT (category_id) DO NOTHING;
7880

@@ -85,6 +87,8 @@ INSERT INTO public.chatbot VALUES (2, 'MoneyBot', 'MoneyBot assists people in fi
8587
ON CONFLICT (name) DO NOTHING;
8688
INSERT INTO public.chatbot VALUES (3, 'TechBot', 'Techbot assists people in technology & computing. This includes: latest tech trends and gadgets, software troubleshooting, coding and programming help, cybersecurity and online privacy.', 'https://robohash.org/TechBot', 'merivercap', 'neutral', 'clear_and_succinct', 'bullet_points', 'adult')
8789
ON CONFLICT (name) DO NOTHING;
90+
INSERT INTO public.chatbot VALUES (4, 'NaturalHealthBot', 'NaturalHealthBot assists people in holistic health and wellness. This includes: herbal remedies, alternative medicine practices, nutritional supplements, and lifestyle changes for improved well-being.', 'https://robohash.org/NaturalHealthBot', 'merivercap', 'professional', 'clear_and_succinct', 'bullet_points', 'adult')
91+
ON CONFLICT (name) DO NOTHING;
8892
INSERT INTO public.chatbot VALUES (7, 'SciBot', 'SciBot assists people in science & research. This includes: recent scientific discoveries, environmental sustainability, space and astronomy, biology, chemistry, and physics inquiries.', 'https://robohash.org/SciBot', 'merivercap', 'neutral', 'clear_and_succinct', 'step_by_step', 'adult')
8993
ON CONFLICT (name) DO NOTHING;
9094
INSERT INTO public.chatbot VALUES (8, 'TravelBot', 'TravelBot assists people in travel & leisure. This includes: travel recommendations, cultural insights and etiquettes, language translation and phrases, local cuisines and must-visits.', 'https://robohash.org/TravelBot', 'merivercap', 'friendly', 'clear_and_succinct', 'narrative', 'adult')
@@ -229,6 +233,8 @@ INSERT INTO public.chatbot_category VALUES (40, 5)
229233
ON CONFLICT (chatbot_id, category_id) DO NOTHING;
230234
INSERT INTO public.chatbot_category VALUES (42, 13)
231235
ON CONFLICT (chatbot_id, category_id) DO NOTHING;
236+
INSERT INTO public.chatbot_category VALUES (4, 11)
237+
ON CONFLICT (chatbot_id, category_id) DO NOTHING;
232238

233239
-- ? Inserting LLM Models Enumerations
234240
INSERT INTO public.models_enum VALUES ('perplexity', 'llama3_7B')

0 commit comments

Comments
 (0)