Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
agentchat
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟@五瓣科技
agentchat
Commits
74a445b4
Commit
74a445b4
authored
Jun 08, 2025
by
Wade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sleep 60s
parent
53607722
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
293 deletions
+16
-293
README.md
README.md
+15
-292
docker-compose.yml
docker-compose.yml
+1
-1
No files found.
README.md
View file @
74a445b4
#
agentchat
#
# 启动
docker compose -f docker-compose-milvus.yml -f docker-compose-graph.yml -f docker-compose.yml -f docker-compose-test.yml -f docker-compose-log.yml up -d
## 服务UI
curl -X POST
\
-H "Content-Type: application/json"
\
-d '{"content": "What is the capital of UK?", "username": "Alice", "user_id": "user123"}'
\
http://localhost:8000/chat
1.
swagger文档接口
http://server-ip:8000/swagger/index.html
2.
milvus
http://server-ip:9091/webui/collections
3.
graph
# milvus
http://54.92.111.204:5670/construct/knowledge
4.
日志
http://54.92.111.204:3000/login
http://54.92.111.204:9091/webui/collections
admin
tradeMoney
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"user_id": "user123", "username": "Alice", "content": "Paris is the capital of France?", "metadata": {}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"user_id": "user456", "username": "Bob", "content": "Paris is the capital of France?", "metadata": {}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"user_id": "user456", "username": "Bob", "content": "Paris is the capital of France?", "metadata": {}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"user_id": "user456", "username": "Bob", "content": "USA is the largest importer of coffee?"}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "Paris is the capital of France?", "metadata": {"user_id": "user456", "username": "Bob"}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "USA is the largest importer of coffee?", "metadata": {"user_id": "user456", "username": "Bob"}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "Water exists in 3 states - solid, liquid and gas?", "metadata": {"user_id": "user456", "username": "Bob"}}'
curl -X POST 'http://54.92.111.204:19530/v1/vector/query'
\
-H 'Content-Type: application/json'
\
-H 'Accept: application/json'
\
-d '{
"collectionName": "useridx",
"output_fields":
[
"text", "metadata"
]
,
"filter": "id >= 0",
"consistency_level": "Bounded",
"limit": 10000
}'
curl -X POST 'http://54.92.111.204:19530/v1/vector/query'
\
-H 'Content-Type: application/json'
\
-H 'Accept: application/json'
\
-d '{
"collectionName": "useridx",
"output_fields":
[
"text", "metadata"
]
,
"filter": "id >= 0",
"consistency_level": "Bounded",
"limit": 10000
}'
go test -v -run TestGenerateEmbedding
curl -X POST 'http://54.92.111.204:19530/v1/vector/search'
\
-H 'Content-Type: application/json'
\
-H 'Accept: application/json'
\
-d '{
"collectionName": "useridx",
"vector":
[
0.03843782,-0.10801815,-0.0035926814,-0.032693874,0.056900613,0.0008304928,-0.01797009,-0.04407662,0.028722305,0.035475362,0.012025777,0.029417625,0.0110262055,-0.0056345984,0.014061109,-0.02962587,-0.006755365,0.0427251,0.010741998,-0.0027486754,-0.011494913,0.014012163,-0.052847106,0.030533107,0.009317728,-0.046866167,0.05694148,-0.10013145,-0.008522527,0.04721908,-0.0935844,0.01525563,-0.045407284,-0.018691462,-0.012562303,-0.04597733,0.011337631,0.046569165,-0.027993403,0.04749836,-0.047419142,0.0045363186,-0.054364458,-0.01753046,0.038755823,-0.046353877,-0.011006325,-0.0007375204,0.009074053,-0.010157847,0.017491907,-0.00954587,0.066316284,0.0019034654,0.0057822997,-0.05477185,-0.021970555,-0.0010239695,-0.01607411,0.0014950585,0.006363975,-0.013846755,-0.029795729,0.108403504,0.019004984,-0.032896034,0.0060955286,0.01751849,0.08429002,-0.036379814,-0.018664123,-0.020807538,0.042101983,-0.085952275,-0.029209964,-0.061416525,-0.054797087,0.060695596,0.032199714,-0.033211406,-0.040252347,-0.048212383,-0.021892065,-0.007480298,-0.0123305945,0.017129714,-0.037697818,-0.0017359223,-0.059629463,0.063662216,-0.024002736,0.024401622,0.013918808,-0.07851171,-0.023397831,0.047224253,-0.008561025,0.003333451,0.009866563,-0.01003198,0.01773248,-0.033277538,-0.04143109,0.04302292,0.057809904,0.014543673,-0.026988465,0.05021075,-0.013174102,0.02797813,-0.063146524,0.02169135,-0.003975126,0.02197511,0.027379813,0.01036559,-0.041078504,0.016345913,-0.008343955,0.0009706061,0.027580908,0.019550655,0.030760653,0.0036855882,0.013893162,0.027626673,0.0011957875,0.05266148,-0.011196996,0.01972624,0.027441168,-0.014437115,0.021325465,0.010016581,0.0286445,0.053278413,0.060899243,-0.02569211,0.06738633,-0.0003625518,0.008291838,0.052956663,-0.013242047,0.042226885,-0.0058189365,0.019142745,-0.0018542466,-0.0884387,0.019708745,-0.037007075,-0.039165843,-0.0038330376,-0.020685727,0.002137646,0.07027587,0.03518618,-0.030722804,-0.007358352,0.020176003,-0.0041375197,0.031176096,0.013450053,0.028787,-0.0020090516,-0.017547552,-0.020471439,0.053509634,0.034363378,0.016745571,-0.010689201,-0.0004696568,-0.021028008,-0.012343767,-0.02550123,0.007090246,-0.044418834,-0.016250396,-0.0086489795,-0.02585847,-0.033675477,-0.020478738,-0.01872456,0.011485122,-0.011701649,0.021184927,-0.019761706,0.037907097,-0.019539472,-0.025849065,0.027579935,-0.015540514,-0.035462152,-0.019292327,-0.022316614,-0.032853737,-0.0046322835,-0.005645606,-0.009486374,0.013942138,-0.047477145,-0.02784789,0.04943112,0.022930803,-0.023028154,0.0054635513,-0.0029833561,0.09663836,-0.08132662,-0.055230737,0.053583585,-0.046705246,-0.019914608,-0.062459424,0.035461556,0.033540323,-0.008629142,0.07065029,-0.011131455,0.006748144,-0.026757697,0.008806499,0.013059393,0.00055636454,-0.007769469,0.009478725,0.031457435,0.00858889,-0.048824117,-0.010520719,-0.05175352,-0.0409364,0.043944433,0.023581086,-0.025504746,0.042948272,0.037335046,0.03305401,0.011610304,0.027044967,-0.016982887,-0.06568399,-0.014548956,0.060233794,0.046012785,-0.048627976,-0.025827475,-0.028141076,-0.010040662,0.022237075,0.02736023,-0.034950055,-0.01623169,0.048911132,0.047720775,-0.05130803,0.016685862,-0.07295039,-0.004899238,-0.0043403734,0.003088271,0.036508102,0.017506996,0.032738738,-0.015836785,-0.0013161921,0.0361747,-0.012067375,-0.070750274,-0.0333092,0.014063581,0.019375961,-0.06256034,0.0017063153,-0.012136579,-0.011229105,0.028304802,-0.07528331,0.06016997,0.029876763,-0.06395304,0.018585209,0.02975133,0.0028785008,-0.04924631,-0.043987665,-0.009941707,-0.055947542,0.013884691,0.037246287,-0.017856054,-0.05137497,-0.048647474,-0.0023736819,-0.02097837,-0.08181237,-0.005045473,-0.06783967,0.053175204,0.058839116,0.002499179,-0.044353765,0.018165607,0.010746604,-0.07590331,0.0058653834,-0.017330524,-0.025738854,-0.040734474,0.013614571,0.012065889,0.028441897,-0.062838145,-0.07294751,0.02001647,0.0007125493,0.045819327,0.025182892,0.029725231,-0.010736619,0.09262206,0.0012555165,0.07174206,0.049362436,-0.020202195,-0.0018069926,-0.008525045,0.0017738127,0.07568828,0.026272647,-0.03250389,0.0019000544,0.012771353,-0.071174614,0.054063544,0.021146003,0.04374504,-0.00060066825,0.035537522,-0.038593676,0.04771156,0.04203235,0.010245813,-0.00235554,-0.023127967,-0.013158689,0.031120904,0.015238158,-0.0128886625,0.07628496,-0.02310663,0.0049422635,0.040248256,-0.021316642,-0.00080234784,-0.04902802,-0.0090737445,0.046291407,-0.003604421,0.063522205,-0.038646687,-0.07702935,0.038741115,-0.026668169,0.0019375713,-0.012160694,-0.0075221728,0.020110747,0.0019848133,-0.0016097312,0.0045474414,0.003488366,0.00469658,0.015401817,0.0028999213,0.0033466578,-0.015722046,-0.07937359,0.0040238434,-0.018728433,-0.008615699,-0.018277144,-0.029722715,0.06308558,0.02747852,0.023718102,-0.01945246,-0.0021234846,0.043668415,-0.0077830027,-0.000046238987,0.0016559111,0.021699231,0.013173144,0.025017582,-0.030180639,0.012013951,-0.025960943,-0.017600875,0.03018518,-0.012639231,-0.0012533896,-0.008609881,0.018118052,-0.009618411,-0.05527289,-0.01931072,-0.052839328,-0.031092139,0.0012166839,-0.0062457602,0.067721024,0.018339036,0.04792489,-0.04823303,-0.026953172,-0.027333282,0.04068963,-0.04834921,0.023894843,0.082817584,0.018735636,0.022978166,-0.011063285,-0.004295578,-0.044304732,-0.031063922,-0.0076035853,0.0026813871,0.024401488,-0.02101709,0.046551276,0.035206564,-0.005318038,-0.041359857,-0.024637321,-0.067124374,0.03334972,0.0019507223,-0.032958914,0.021708334,-0.0105287,-0.0066022375,0.028227085,0.04198249,-0.11609742,-0.019205382,-0.03305458,-0.0134911835,0.011170767,-0.07622374,0.020747215,-0.045790035,-0.00055858045,-0.054602053,-0.05993622,-0.06972769,0.013321911,0.048117246,-0.045701638,0.03200826,0.020918777,-0.0233393,-0.004020572,-0.048618045,0.020268548,0.0038998018,0.024773447,0.013144061,0.04321931,0.01800262,-0.012426906,-0.025510177,-0.0016893614,0.057901636,-0.0020053675,0.0045196135,-0.034931004,-0.0014150724,-0.037426088,-0.033266198,0.01643143,-0.024206428,0.0486749,0.032961223,-0.029839497,0.041842952,0.02268545,-0.020682879,-0.014362875,0.03580479,-0.04809911,0.024257628,-0.038557447,0.0023051384,-0.018996917,-0.025063388,-0.045062415,-0.021734884,0.0043491824,0.013081417,0.005029725,-0.042347617,-0.03879548,-0.024494866,0.066701815,-0.06986873,0.012743599,0.006759854,-0.02953009,-0.015046655,0.0006723915,0.016235502,-0.0043912837,0.006860745,0.019004779,0.03154714,0.012958628,0.048807457,0.057284165,-0.009824063,0.008037203,-0.001331536,-0.1324089,-0.013416185,-0.037767302,-0.013199997,0.034174956,0.053463183,-0.10178892,0.0060007875,0.0033546693,0.040941097,-0.03946203,-0.04135147,-0.024251232,-0.028510451,-0.018926073,0.036001626,0.087967224,0.020472396,-0.0005375871,-0.016304435,-0.010142697,0.011056987,0.014712494,0.003878636,0.015348929,-0.056971747,-0.0036313592,0.002476419,-0.026496837,-0.025325615,-0.013806501,-0.023463268,0.045808807,-0.051661372,-0.027449891,0.037827387,0.0041856677,-0.058483418,-0.073383115,-0.009435511,0.018742751,-0.006449073,0.11232101,0.05219001,-0.0044432585,0.024387227,0.06527803,-0.0061585326,-0.028151052,0.008557303,0.038960703,0.0031750035,0.054188415,-0.010951798,0.057138752,-0.019067472,0.002403626,-0.036895093,-0.0016023847,0.00009474349,-0.011695137,0.011138796,0.0076994505,0.10477774,0.022854181,0.054656964,0.055053733,0.05250508,-0.042696957,0.028732788,-0.00043513018,0.0132617215,0.036658082,0.021649256,-0.01052684,0.0129563995,-0.0014551458,-0.015237829,0.0347423,-0.050486915,0.041249175,-0.0027445664,-0.0031073985,0.03755217,-0.02502292,0.0047116913,-0.066570505,0.025984047,-0.011073829,-0.03437807,0.015215991,-0.01920109,-0.00046103404,-0.020339169,0.035763685,-0.01302836,0.021347135,-0.021851663,0.06411822,-0.015544492,-0.023034595,-0.028390259,0.053352203,0.0014498043,0.0020170521,-0.012576962,0.019091347,0.024778945,0.022792315,0.029053282,-0.0016118597,-0.01335711,-0.044073258,0.008068568,-0.023724945,-0.017707447,0.031818114,-0.035340257,-0.04644913,-0.0009944814,0.028104724,-0.028160615,0.033014968,0.12304963,0.033116627,-0.05225309,-0.0177489,0.020387227,-0.033281643,-0.041645706,0.011079419,-0.027180828,0.037914414,-0.03198912,-0.05688515,-0.057961848,0.01796609,-0.0045953603,-0.01214499,0.028735612,0.002434496,0.038295057,-0.038296636,-0.019474015,-0.037487578,-0.039340846,-0.03123182,0.044120025,-0.013044836,0.030975817,0.026351977,-0.006351776,0.033150315,0.04635382,-0.041898567,-0.02942466,0.012956598,-0.009453329,-0.006535657,-0.03331614,-0.016319979,-0.00937613,-0.034845177,0.008653715,0.06742186,0.0075705387,-0.022165032,-0.008388943,0.02006902,0.010607576,-0.05950851,-0.035042312,0.12647206,0.011953123,0.030103208,-0.026901055,-0.007572808,0.03579223,-0.009801378,-0.0704989,-0.029652314,-0.006752585,-0.0048610684,-0.014324836,-0.013467202,0.030755645,0.025676837,0.029660994,0.040610775,-0.042911142,-0.05377423,0.04263892,-0.010766625,-0.033704326,0.013111667,-0.015244707,-0.000034227425,0.046604767,0.06113486,0.032315064,0.031093886,-0.025785316,-0.048322752,0.051937714,-0.08809941,0.020804005,-0.026868736,0.006706912,0.10312094,0.0167206,-0.01909287,-0.0034649465,-0.035236653,0.0948521,0.003023375,0.001908022,0.00755883,-0.05999634,0.0020193893,-0.0030316054,-0.007999254,0.051412076,0.03285594,-0.00617675,-0.02589824,0.0374277,-0.01807927,-0.06921412,-0.040555634,0.014909444,-0.019136429,0.03623242,0.04555616,0.009243677,0.0018954773,0.022733297,0.0022532232,-0.014581746,-0.03628447,-0.01626001,0.035858408,0.038414206,-0.005562079,0.018296504,0.021874206,0.008055072
]
,
"topk": 10,
"metric_type": "L2",
"consistency_level": "Bounded",
"output_fields":
[
"id"
]
,
"filter": "id >= 0"
}'
curl -X POST 'http://54.92.111.204:19530/v1/vector/query'
\
-H 'Content-Type: application/json'
\
-H 'Accept: application/json'
\
-d '{
"collectionName": "useridx",
"output_fields":
[
"text", "metadata"
]
,
"filter": "id IN
[
458341973210780985, 458455329819611103, 458455329819611105, 458455329819611107, 458455329819611109, 458455329819611113, 458455329819611111
]
",
"consistency_level": "Bounded",
"limit": 10
}'
# graph
http://54.92.111.204:5670/
curl -d '{"content": "What is the capital of UK?"}' http://localhost:8000/chat
curl -X POST
\
-H "Content-Type: application/json"
\
-d '{"content": "What is the capital of UK?", "username": "Alice", "user_id": "user123"}'
\
http://localhost:8000/chat
curl -X POST
\
-H "Content-Type: application/json"
\
-d '{"content": "What is the capital of UK?", "username": "Bob", "user_id": "user456"}'
\
http://localhost:8000/chat
curl -d '{"content": "What is the capital of UK?"}' http://localhost:8000/indexDocuments
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "What is the capital of UK?", "metadata": {"user_id": "user456", "username": "Bob"}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "What is the capital of UK 11111 ?", "metadata": {"user_id": "user456", "username": "Bob"}}'
curl -X POST http://localhost:8000/indexGraph
\
-H "Content-Type: application/json"
\
-d '{"user_id": "user456", "username": "Bob", "content": "Paris is the capital of France", "metadata": {}}'
curl -X POST http://localhost:8000/indexGraph
\
-H "Content-Type: application/json"
\
-d '{"user_id": "user456", "username": "Bob", "content": "USA is the largest importer of coffee", "metadata": {}}'
curl -X POST http://localhost:8000/indexGraph
\
-H "Content-Type: application/json"
\
-d '{"user_id": "user456", "username": "Bob", "content": "Water exists in 3 states - solid, liquid and gas", "metadata": {}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "What is the capital of UK?", "metadata": {"user_id": "user456", "username": "Bob"}}'
{"result": "Document indexed successfully"}
d1 := ai.DocumentFromText("Paris is the capital of France", nil)
d2 := ai.DocumentFromText("USA is the largest importer of coffee", nil)
d3 := ai.DocumentFromText("Water exists in 3 states - solid, liquid and gas", nil)
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "Paris is the capital of France", "metadata": {"user_id": "user456", "username": "Bob"}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "USA is the largest importer of coffee", "metadata": {"user_id": "user456", "username": "Bob"}}'
curl -X POST http://localhost:8000/indexDocuments
\
-H "Content-Type: application/json"
\
-d '{"content": "Water exists in 3 states - solid, liquid and gas", "metadata": {"user_id": "user456", "username": "Bob"}}'
curl -X 'POST'
\
'http://54.92.111.204:5670/api/v1/chat/completions'
\
-H 'accept: application/json'
\
-H 'Content-Type: application/json'
\
-d '{
"conv_uid": "",
"user_input": "",
"user_name": "string",
"chat_mode": "",
"app_code": "",
"temperature": 0.5,
"max_new_tokens": 4000,
"select_param": "string",
"model_name": "string",
"incremental": false,
"sys_code": "string",
"prompt_code": "string",
"ext_info": {}
}'
curl -X 'POST'
\
'http://54.92.111.204:5670/api/v1/chat/completions'
\
-H 'accept: application/json'
\
-H 'Content-Type: application/json'
\
-d '{
"user_input": "111111111",
"chat_mode": "chat_knowledge",
"app_code": "chat_knowledge",
"temperature": 0.5,
"max_new_tokens": 4000,
"select_param": "user456",
"incremental": false,
"model_name": "Qwen/Qwen2.5-Coder-32B-Instruct"
}'
curl -X 'POST'
\
'http://54.92.111.204:5670/api/v2/chat/completions'
\
-H 'accept: application/json'
\
-H 'Content-Type: application/json'
\
-d '{
"model": "Qwen/Qwen2.5-Coder-32B-Instruct",
"messages": "What is the capital of UK?",
"temperature": 0.7,
"top_p": 1,
"top_k": -1,
"n": 1,
"max_tokens": 0,
"stream": false,
"repetition_penalty": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"chat_mode": "chat_knowledge",
"chat_param": "user456",
"incremental": true,
"enable_vis": true
}'
{"id":"feb02244-deac-4955-97f8-175f1f541d20","object":"chat.completion","created":1748949140,"model":"Qwen/Qwen2.5-Coder-32B-Instruct","choices":
[
{"index":0,"message":{"role":"assistant","content":"知识库中提供的内容不足以回答此问题\n\n<references title=\"References\" references=\"[
]
\"
/>","reasoning_content":null},"finish_reason":null}],"usage":{"prompt_tokens":0,"total_tokens":0,"completion_tokens":0}}%wade@WadeLeedeMacBook-Pro graphrag %
5.
压测
http://54.92.111.204:8089/
docker-compose.yml
View file @
74a445b4
...
...
@@ -11,7 +11,7 @@ services:
-
GEMINI_API_KEY=${GEMINI_API_KEY}
# Reference variable from .env
ports
:
-
"
8000:8000"
entrypoint
:
/bin/sh -c "sleep
3
0 && /app/myapp -milvus-addr=standalone:19530 -graphrag-addr=webserver:5670"
entrypoint
:
/bin/sh -c "sleep
6
0 && /app/myapp -milvus-addr=standalone:19530 -graphrag-addr=webserver:5670"
depends_on
:
-
standalone
-
webserver
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment