Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plus): add AI Help backend #230

Merged
merged 49 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
8f87dd5
feat(openai): inital openai support
fiji-flo May 26, 2023
c75b320
very wip
fiji-flo May 26, 2023
efad543
sqlx
fiji-flo May 26, 2023
9c9ed3c
wip ask
fiji-flo May 30, 2023
6daf2d1
join for slug
fiji-flo May 30, 2023
88e37be
refactor
fiji-flo May 31, 2023
4db07f6
clean up
fiji-flo May 31, 2023
3a6e181
refactor
fiji-flo Jun 1, 2023
42733f9
fix
fiji-flo Jun 1, 2023
51e0942
missing file
fiji-flo Jun 1, 2023
9d1d7cc
fmt
fiji-flo Jun 2, 2023
3a72b34
fix(ai-help): finish with MDN links
caugner Jun 5, 2023
b2666f3
Merge remote-tracking branch 'upstream/main' into chatone
fiji-flo Jun 13, 2023
d6ba200
send ref docs via sse
fiji-flo Jun 13, 2023
3d559a0
fmt
fiji-flo Jun 13, 2023
6d62454
fix(ai-help): ask for markdown list of related pages
caugner Jun 13, 2023
e633537
limits
fiji-flo Jun 13, 2023
4ea55c5
add missing files and title support
fiji-flo Jun 13, 2023
52f5514
chore(ai-help): force format of related pages section
caugner Jun 13, 2023
d6843ce
add quota endpoint and renaming
fiji-flo Jun 13, 2023
863851f
flip subscriber check
fiji-flo Jun 13, 2023
b09077c
typ -> type
fiji-flo Jun 13, 2023
308e5e1
check latest_start in quota
fiji-flo Jun 14, 2023
8b88195
chore(ai-help): update fallback response copy
caugner Jun 14, 2023
8c14443
chore(ai-help): update relevant pages section copy
caugner Jun 14, 2023
cd23539
chore(ai-help): remove page recommendations
caugner Jun 14, 2023
8711bd9
Revert "chore(ai-help): update fallback response copy"
caugner Jun 14, 2023
c9ad822
update latest_start
fiji-flo Jun 15, 2023
af942c6
fix limit reset
fiji-flo Jun 15, 2023
cd06d41
add counter and test
fiji-flo Jun 19, 2023
246ec5b
rename
fiji-flo Jun 19, 2023
a2922d9
fmt
fiji-flo Jun 19, 2023
b194c64
Merge remote-tracking branch 'upstream/main' into chatone
fiji-flo Jun 19, 2023
2af3056
fix merge
fiji-flo Jun 19, 2023
582af38
fmt
fiji-flo Jun 19, 2023
c94fe48
feedback 1
fiji-flo Jun 20, 2023
82cc1f0
patch tiktoken-rs
fiji-flo Jun 20, 2023
f52918a
feat(ai-help): return url in sources
caugner Jun 21, 2023
9b4ee3a
chore(ai): use gpt-3.5-turbo-0613
caugner Jun 21, 2023
00e0389
don't log supabase queries
fiji-flo Jun 21, 2023
18db0f2
fix(ai-help): deduplicate source refs
caugner Jun 21, 2023
0bfbc1b
Merge branch 'main' into chatone
caugner Jun 22, 2023
6fdc8e5
change ref dedup
fiji-flo Jun 26, 2023
9b1667e
chore(ai-help): increase related pages to 5
caugner Jun 26, 2023
21ccfd0
fix(ai-help): use default gpt-3.5-turbo model
caugner Jun 26, 2023
8fc2c74
update tiktoken-rs
fiji-flo Jun 26, 2023
54ed74c
chore(settings): sync dev/local/test
caugner Jun 27, 2023
01c2370
fixup! chore(settings): sync dev/local/test
caugner Jun 27, 2023
f719662
chore(migrations): add trailing newline
caugner Jun 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .settings.dev.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[db]
uri = "postgres://rumba:[email protected]:5432/mdn"
supabase_uri = ""

[server]
host = "localhost"
Expand Down Expand Up @@ -37,3 +38,16 @@ human_logs = true
[metrics]
statsd_label = "rumba"
statsd_port = 8125

[basket]
api_key = ""
basket_url = ""

[playground]
github_token = ""
crypt_key = ""
flag_repo = "flags"

[ai]
api_key = ""
limit_reset_duration_in_sec = 3600
18 changes: 17 additions & 1 deletion .settings.local.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[db]
uri = "postgres://postgres:[email protected]/mdn "
uri = "postgres://postgres:[email protected]/mdn"
supabase_uri = ""

[server]
host = "localhost"
Expand All @@ -12,6 +13,8 @@ scopes = "openid profile email profile:subscriptions"
auth_cookie_name = "auth-cookie"
login_cookie_name = "login-cookie"
auth_cookie_secure = false
client_id="TEST_CLIENT_ID"
client_secret="TEST_CLIENT_SECRET"
cookie_key = "DUwIFZuUYzRhHPlhOm6DwTHSDUSyR5SyvZHIeHdx4DIanxm5/GD/4dqXROLvn5vMofOYUq37HhhivjCyMCWP4w=="
admin_update_bearer_token="TEST_TOKEN"

Expand All @@ -35,3 +38,16 @@ human_logs = true
[metrics]
statsd_label = "rumba"
statsd_port = 8125

[basket]
api_key = ""
basket_url = ""

[playground]
github_token = ""
crypt_key = ""
flag_repo = "flags"

[ai]
api_key = ""
limit_reset_duration_in_sec = 3600
7 changes: 6 additions & 1 deletion .settings.test.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[db]
uri = "postgres://rumba:[email protected]:5432/mdn"
supabase_uri = ""

[server]
host = "0.0.0.0"
Expand Down Expand Up @@ -45,4 +46,8 @@ basket_url = "http://localhost:4321"
[playground]
github_token = "foobar"
crypt_key = "IXAe2h1MekK4LKysmMvxomja69PT6c20A3nmcDHQ2eQ="
flag_repo = "flags"
flag_repo = "flags"

[ai]
limit_reset_duration_in_sec = 5
api_key = ""
Loading