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

[Web] add web frontend for calling APIs #96

Draft
wants to merge 174 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
43a6018
Add API folder
qizheng7 May 25, 2023
e5dfcf8
add placeholders for more apis
qizheng7 May 26, 2023
7f6be35
fix formats
qizheng7 May 26, 2023
c35c903
temp check-in
qizheng7 May 26, 2023
60c3143
add agent lib
qizheng7 May 26, 2023
aee3477
add generateRspn methods
qizheng7 May 27, 2023
2e5a0b8
add addMemory
qizheng7 May 27, 2023
2bd6e00
follow JS/TS naming convention
qizheng7 May 27, 2023
924f2e8
add langchain
qizheng7 May 27, 2023
affa4de
add for debug
qizheng7 May 27, 2023
0b277ea
get authtoken from cookie
qizheng7 May 27, 2023
889ea07
FORBIDDEN MOVE
qizheng7 May 27, 2023
f2ffb50
try supabase access
qizheng7 May 27, 2023
c105c38
add the actual model for now
qizheng7 May 27, 2023
0f789a0
handle async
qizheng7 May 27, 2023
4e63017
fix more wainings
qizheng7 May 27, 2023
29126f1
try supabase agent table
qizheng7 May 27, 2023
560bf6b
debugging
qizheng7 May 27, 2023
9557b1b
continue debugging
qizheng7 May 27, 2023
6306871
continue debugging
qizheng7 May 27, 2023
b1af912
continue debugging
qizheng7 May 27, 2023
02283a0
continue debugging
qizheng7 May 27, 2023
5314821
debug supabase agent table
qizheng7 May 27, 2023
66e83a4
debug agent initialization
qizheng7 May 27, 2023
881277a
debug memory table later
qizheng7 May 27, 2023
f52a81a
don't read id from agent table
qizheng7 May 27, 2023
916f227
constructor can't be async
qizheng7 May 27, 2023
84de0a0
debug
qizheng7 May 27, 2023
d95a28b
debug vectorstore debug
qizheng7 May 27, 2023
65c4a3a
half-way done using the new retriever
qizheng7 May 27, 2023
9b3fd19
don't use global memories as the way to get mem slices
qizheng7 May 27, 2023
ba7c2ed
use global memory to handle slicing
qizheng7 May 27, 2023
5d117df
add more telemtries
qizheng7 May 29, 2023
740ffc2
add more telemtries
qizheng7 May 29, 2023
90702f4
add more telemtries
qizheng7 May 29, 2023
deea3cd
add more telemtries
qizheng7 May 29, 2023
35c9ce8
write async setup for class
qizheng7 May 29, 2023
e048441
debug db
qizheng7 May 29, 2023
87c9fd7
debug db
qizheng7 May 29, 2023
534b30f
debug db
qizheng7 May 30, 2023
387978c
debug db
qizheng7 May 30, 2023
351ba0a
debug db
qizheng7 May 30, 2023
e91273a
debug db
qizheng7 May 30, 2023
aceaab3
debug db
qizheng7 May 30, 2023
df6e652
debug db
qizheng7 May 30, 2023
c5b13aa
debug db
qizheng7 May 30, 2023
bb5eed4
debug db
qizheng7 May 30, 2023
fa111d8
debug memory table access
qizheng7 May 30, 2023
507b6fd
update
qizheng7 May 30, 2023
bfcd6fa
update
qizheng7 May 30, 2023
a53041d
update
qizheng7 May 30, 2023
479fe65
update
qizheng7 May 30, 2023
a527ec5
update
qizheng7 May 30, 2023
72eadce
update
qizheng7 May 30, 2023
8c35830
update
qizheng7 May 30, 2023
e5111d9
update
qizheng7 May 30, 2023
0f82f08
update
qizheng7 May 30, 2023
06e2a74
update
qizheng7 May 30, 2023
36b7090
update
qizheng7 May 30, 2023
2e07005
update
qizheng7 May 30, 2023
d706c2a
update
qizheng7 May 30, 2023
2095fba
update
qizheng7 May 30, 2023
abfe3b9
update
qizheng7 May 30, 2023
61d8ea5
update
qizheng7 May 30, 2023
cc4d360
test ordering
qizheng7 May 30, 2023
17f1304
test status
qizheng7 May 30, 2023
c382d67
test status
qizheng7 May 30, 2023
86cf4d3
test ordering
qizheng7 May 30, 2023
880804e
debug getmemory
qizheng7 May 30, 2023
809bcd9
who calls length
qizheng7 May 30, 2023
dfcf3fa
who calls length
qizheng7 May 30, 2023
ba6953b
who calls length
qizheng7 May 30, 2023
40fffca
who calls length
qizheng7 May 30, 2023
38c16fa
who calls length
qizheng7 May 30, 2023
aae9f8d
who calls length
qizheng7 May 30, 2023
a6b33c0
who calls length
qizheng7 May 30, 2023
f43e846
who calls length
qizheng7 May 30, 2023
b43d0ba
who calls length
qizheng7 May 30, 2023
779fece
who calls length
qizheng7 May 30, 2023
6de1ed2
who calls length
qizheng7 May 30, 2023
6647a4b
who calls length
qizheng7 May 30, 2023
1b3550c
who calls length
qizheng7 May 30, 2023
9cad138
who calls length
qizheng7 May 30, 2023
3e87e5b
who calls length
qizheng7 May 30, 2023
f39348e
who calls length
qizheng7 May 30, 2023
968cf69
who calls length
qizheng7 May 30, 2023
82925ea
creat the agent successfully
qizheng7 May 30, 2023
cb9d68f
clear up async calls
qizheng7 May 30, 2023
7f16d81
try generaterspn
qizheng7 May 30, 2023
caaaf84
add test functions to test adddoc and getrelevantdoc
qizheng7 May 31, 2023
f6ea822
test relevance
qizheng7 May 31, 2023
def1d80
fix sql
qizheng7 May 31, 2023
cce406d
debug create agent again with the new sql function
qizheng7 May 31, 2023
305af46
debug getrelevant
qizheng7 May 31, 2023
d87e0a2
new func in supabase
qizheng7 May 31, 2023
38630bc
add filter
qizheng7 May 31, 2023
803ef7c
debug filter using the vs directly
qizheng7 May 31, 2023
8009c66
add the filter to vs similaritysearch
qizheng7 May 31, 2023
fff5a87
change the syntax
qizheng7 May 31, 2023
5400140
change the syntax
qizheng7 May 31, 2023
cd605a7
use metdata subfield only
qizheng7 May 31, 2023
1c09653
vs working. try retriever now
qizheng7 May 31, 2023
b0294b2
try reduce k to 1
qizheng7 May 31, 2023
bb9384f
filter working. delete tmp debugging vs
qizheng7 May 31, 2023
71bbafd
continue debug generaterspn as retriever is working
qizheng7 May 31, 2023
77e1928
fix the self-maintained metadata
qizheng7 May 31, 2023
396dc74
debug getNumTokens
qizheng7 May 31, 2023
79c69f4
prompt.format is async
qizheng7 May 31, 2023
ad17353
debug action prediction chain
qizheng7 May 31, 2023
ff93e5a
continue debug actionPredictionChain
qizheng7 May 31, 2023
2650c3a
correct the initiate agent name
qizheng7 May 31, 2023
3969c40
try generateRspn again because kwargs looks good
qizheng7 May 31, 2023
c133949
debug where the issue is
qizheng7 May 31, 2023
69b1103
dry run
qizheng7 May 31, 2023
cbdf5f2
try a different prompt
qizheng7 May 31, 2023
d32dd2d
get gateway timeout
qizheng7 May 31, 2023
3d95712
get gateway timeout
qizheng7 May 31, 2023
b6959ee
get gateway timeout
qizheng7 May 31, 2023
31bffee
get gateway timeout
qizheng7 May 31, 2023
961c800
use call instead of run
qizheng7 May 31, 2023
1bd9b08
debug result
qizheng7 May 31, 2023
58a4b02
should work. but could hit timeout
qizheng7 May 31, 2023
fafc4ae
generateRspn working. try addMemory
qizheng7 May 31, 2023
ec1fe47
addmemory working
qizheng7 May 31, 2023
7297a99
debug adding to the message table
qizheng7 May 31, 2023
5984a7f
debug adding to the message table
qizheng7 May 31, 2023
ab65d95
debug message table insert
qizheng7 May 31, 2023
067bafd
debug specifically the insert
qizheng7 May 31, 2023
df45547
debug specifically the insert
qizheng7 May 31, 2023
0634ce3
add conversation to the message table
qizheng7 May 31, 2023
8b19345
add conversation to the message table
qizheng7 May 31, 2023
4c749e3
clean up TODO
qizheng7 May 31, 2023
80142d5
clean up todos
qizheng7 Jun 1, 2023
fadd8ba
delete two debug helper functions
qizheng7 Jun 1, 2023
5b5ad39
cache supabase
qizheng7 Jun 1, 2023
12872c7
use the cached storage
qizheng7 Jun 1, 2023
dc90371
add updatememoryaccesstime
qizheng7 Jun 1, 2023
6cc3e72
figure out the db part
qizheng7 Jun 1, 2023
da96f8b
debug table update
qizheng7 Jun 1, 2023
102ab1c
use single quote
qizheng7 Jun 1, 2023
1248680
try to use variables
qizheng7 Jun 1, 2023
df1b262
try to use variables
qizheng7 Jun 1, 2023
39dbd05
use something existing
qizheng7 Jun 1, 2023
ed1216c
try the fixed version
qizheng7 Jun 1, 2023
143f24d
cleanup
qizheng7 Jun 1, 2023
87e9aef
delete unused file
qizheng7 Jun 1, 2023
3be0350
remove testing hack
qizheng7 Jun 1, 2023
6b3e188
order should be desc
qizheng7 Jun 1, 2023
0203537
add create-agent endpoint
qizheng7 Jun 1, 2023
e5ed773
add incubate-agent
qizheng7 Jun 1, 2023
219538c
add update-agent-initial-memory
qizheng7 Jun 1, 2023
750bbfc
still need to calculate embeddings and importance
qizheng7 Jun 1, 2023
7642e40
add create-conversation ep
qizheng7 Jun 1, 2023
5d7ae19
Merge branch 'main' into qiz/add-more-endpoints
qizheng7 Jun 2, 2023
4fe3138
add debug hack
qizheng7 Jun 2, 2023
17da5ef
fix issue caused by merge conflict
qizheng7 Jun 2, 2023
ef181ac
debug create-agent
qizheng7 Jun 2, 2023
304d7a9
debug retrieval of the ID
qizheng7 Jun 2, 2023
8961403
debug retrieval of the ID
qizheng7 Jun 2, 2023
5b769e2
change the retrieval filter
qizheng7 Jun 2, 2023
1aec11f
return error
qizheng7 Jun 2, 2023
cda2275
return error
qizheng7 Jun 2, 2023
9f58f93
util func to check data validity
qizheng7 Jun 2, 2023
e9a6156
debug initial_memory
qizheng7 Jun 2, 2023
3290953
fix agent info read
qizheng7 Jun 2, 2023
a9bcc5d
make create-conversation field more self-explanatory
qizheng7 Jun 2, 2023
c3a6fe6
update incubate-agent
qizheng7 Jun 2, 2023
3b4d1f7
add failed reasons
qizheng7 Jun 2, 2023
55f1667
use contain for jsonb filter & return failure reason
qizheng7 Jun 2, 2023
af267fc
use var for memory collection
qizheng7 Jun 2, 2023
3891108
split memories with new line
qizheng7 Jun 2, 2023
c86a429
update update-agent-initial-memory
qizheng7 Jun 2, 2023
37d9389
add create-agent frontend skeleton
Jun 2, 2023
5af6f54
Merge branch 'main' into langxuans/create-agent-frontend
law-liet Jun 3, 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
Prev Previous commit
Next Next commit
continue debugging
qizheng7 committed May 27, 2023
commit b1af912d5a1537db770a506558d5e2a08fbdb7e5
Original file line number Diff line number Diff line change
@@ -17,7 +17,11 @@ export const PUT = (async ({ request, locals }: { request: Request; locals: App.
recipientAgentModel,
message
} = await request.json();
return new Response(JSON.stringify({"success": 1, "ID": request.json()}), { status: 200 });

console.log("before")
console.log(conversationId, initiateAgentId, initiateAgentModel, recipientAgentId, recipientAgentModel, message);
console.log("after")
return new Response(JSON.stringify({"success": 1}), { status: 200 });


// get initiate agent name