dataelement/bisheng

embedding问题

linyx2024 opened this issue · 8 comments

如果在国内本地部署不安装rt服务,且没有代理访问openai的条件下,知识库是否就无法正常解析问题,如果想通过api使用其他模型的embedding功能的话,应该如何配置系统配置中的文件。

如果api的协议符合openai的,可以使用openai的配置。
image
api-key 可以不填

现在有个rt和ft,是啥意思啊

我是这样配置的,但是最终显示解析失败。 看了后台日志有 POST https://api.app4gpt.com/v1/embeddings "200 OK" , 但我到第三方api调用看,并没有调用该api。应该如何解决呢?
image

后台日志如下:
[2024-04-24 17:19:42.907934] [INFO process-9-140179548543872 bisheng.utils.http_middleware:20] - trace=4b18f0ffae34495dbbc42b7c22f29757 /api/v1/knowledge/embedding_param 201 timecost=0.02
[2024-04-24 17:19:43.513005] [INFO process-9-140179548543872 bisheng.utils.http_middleware:20] - trace=2e0403fef904481aa269f1ea97510ac8 /api/v1/knowledge/ 200 timecost=0.01
[2024-04-24 17:19:46.366316] [INFO process-9-140179548543872 bisheng.utils.http_middleware:20] - trace=c4df5107b5904c0d817316912eaa9a67 /api/v1/knowledge/file_list/3 200 timecost=0.01
[2024-04-24 17:19:49.361142] [INFO process-9-140179548543872 bisheng.utils.http_middleware:20] - trace=9c9381e5a08344e89e0944bb8fd7be2d /api/v1/knowledge/retry 200 timecost=0.01
[2024-04-24 17:19:49.385972] [INFO process-9-140176475002560 bisheng.interface.initialize.vector_store:235] - trace=9c9381e5a08344e89e0944bb8fd7be2d init_milvus collection_name=col_1713942223_e81c1a1b partition={}
[2024-04-24 17:19:49.388807] [DEBUG process-9-140176475002560 bisheng_langchain.vectorstores.milvus:266] - trace=9c9381e5a08344e89e0944bb8fd7be2d Using previous connection: eb279d1626644d49be8d9d4955be534e
[2024-04-24 17:19:49.394315] [DEBUG process-9-140176475002560 bisheng_langchain.vectorstores.milvus:484] - trace=9c9381e5a08344e89e0944bb8fd7be2d Nothing to insert, skipping.
[2024-04-24 17:19:49.396640] [INFO process-9-140176475002560 bisheng.api.services.knowledge_imp:167] - trace=9c9381e5a08344e89e0944bb8fd7be2d query_milvus pk=[]
[2024-04-24 17:19:49.420143] [DEBUG process-9-140176475002560 urllib3.connectionpool:244] - trace=9c9381e5a08344e89e0944bb8fd7be2d Starting new HTTP connection (1): elasticsearch:9200
[2024-04-24 17:19:49.429732] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://elasticsearch:9200 "GET /col_1713942223_dfffc4fc HTTP/1.1" 200 None
[2024-04-24 17:19:49.432087] [INFO process-9-140176475002560 elastic_transport._transport:349] - trace=9c9381e5a08344e89e0944bb8fd7be2d GET http://elasticsearch:9200/col_1713942223_dfffc4fc
[2024-04-24 17:19:49.438047] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://elasticsearch:9200 "POST /col_1713942223_dfffc4fc/_refresh HTTP/1.1" 200 0
[2024-04-24 17:19:49.440517] [INFO process-9-140176475002560 elastic_transport._transport:349] - trace=9c9381e5a08344e89e0944bb8fd7be2d POST http://elasticsearch:9200/col_1713942223_dfffc4fc/_refresh
[2024-04-24 17:19:49.449544] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://elasticsearch:9200 "POST /col_1713942223_dfffc4fc/_delete_by_query HTTP/1.1" 200 0
[2024-04-24 17:19:49.452020] [INFO process-9-140176475002560 elastic_transport._transport:349] - trace=9c9381e5a08344e89e0944bb8fd7be2d POST http://elasticsearch:9200/col_1713942223_dfffc4fc/_delete_by_query
[2024-04-24 17:19:49.454169] [INFO process-9-140176475002560 bisheng.api.services.knowledge_imp:192] - trace=9c9381e5a08344e89e0944bb8fd7be2d act=delete_es file_id=19 res={'took': 3, 'timed_out': False, 'total': 0, 'deleted': 0, 'batches': 0, 'version_conflicts': 0, 'noops': 0, 'retries': {'bulk':
0, 'search': 0}, 'throttled_millis': 0, 'requests_per_second': -1.0, 'throttled_until_millis': 0, 'failures': []}
[2024-04-24 17:19:49.621888] [DEBUG process-9-140176475002560 urllib3.connectionpool:244] - trace=9c9381e5a08344e89e0944bb8fd7be2d Starting new HTTP connection (1): minio:9000
[2024-04-24 17:19:49.626887] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "GET /bisheng?location= HTTP/1.1" 200 0
[2024-04-24 17:19:49.631058] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "HEAD /bisheng HTTP/1.1" 200 0
[2024-04-24 17:19:49.637144] [DEBUG process-9-140176475002560 urllib3.connectionpool:244] - trace=9c9381e5a08344e89e0944bb8fd7be2d Starting new HTTP connection (1): minio:9000
[2024-04-24 17:19:49.641213] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "GET /bisheng?location= HTTP/1.1" 200 0
[2024-04-24 17:19:49.645881] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "HEAD /bisheng/original/19.txt HTTP/1.1" 200 0
[2024-04-24 17:19:49.650542] [DEBUG process-9-140176475002560 urllib3.connectionpool:244] - trace=9c9381e5a08344e89e0944bb8fd7be2d Starting new HTTP connection (1): minio:9000
[2024-04-24 17:19:49.655850] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "GET
/bisheng/original/19.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin%2F20240424%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240424T091949Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=adcabdba20ae045f4637a6c0e7fe064848daf7ca42a41ce55c2c
b4bcd74aaf10 HTTP/1.1" 200 6023
[2024-04-24 17:19:49.824138] [DEBUG process-9-140176475002560 urllib3.connectionpool:244] - trace=9c9381e5a08344e89e0944bb8fd7be2d Starting new HTTP connection (1): minio:9000
[2024-04-24 17:19:49.828458] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "GET /bisheng?location= HTTP/1.1" 200 0
[2024-04-24 17:19:49.833134] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "HEAD /bisheng HTTP/1.1" 200 0
[2024-04-24 17:19:49.851328] [DEBUG process-9-140176475002560 httpx._config:78] - trace=9c9381e5a08344e89e0944bb8fd7be2d load_ssl_context verify=True cert=None trust_env=True http2=False
[2024-04-24 17:19:49.854844] [DEBUG process-9-140176475002560 httpx._config:144] - trace=9c9381e5a08344e89e0944bb8fd7be2d load_verify_locations cafile='/usr/local/lib/python3.10/site-packages/certifi/cacert.pem'
[2024-04-24 17:19:49.905195] [DEBUG process-9-140176475002560 httpx._config:78] - trace=9c9381e5a08344e89e0944bb8fd7be2d load_ssl_context verify=True cert=None trust_env=True http2=False
[2024-04-24 17:19:49.908153] [DEBUG process-9-140176475002560 httpx._config:144] - trace=9c9381e5a08344e89e0944bb8fd7be2d load_verify_locations cafile='/usr/local/lib/python3.10/site-packages/certifi/cacert.pem'
[2024-04-24 17:19:49.973126] [INFO process-9-140176475002560 bisheng.interface.initialize.vector_store:235] - trace=9c9381e5a08344e89e0944bb8fd7be2d init_milvus collection_name=col_1713942223_e81c1a1b partition={}
[2024-04-24 17:19:49.995958] [INFO process-9-140179548543872 bisheng.utils.http_middleware:20] - trace=fff59d45dde54b62825b38bc6da8a187 /api/v1/knowledge/file_list/3 200 timecost=0.02
[2024-04-24 17:19:50.000556] [DEBUG process-9-140176475002560 bisheng_langchain.vectorstores.milvus:273] - trace=9c9381e5a08344e89e0944bb8fd7be2d Created new connection using: 05184d2f7e6248cd86f6b18e5575e74c
[2024-04-24 17:19:50.005720] [DEBUG process-9-140176475002560 bisheng_langchain.vectorstores.milvus:484] - trace=9c9381e5a08344e89e0944bb8fd7be2d Nothing to insert, skipping.
[2024-04-24 17:19:50.022865] [DEBUG process-9-140176475002560 urllib3.connectionpool:244] - trace=9c9381e5a08344e89e0944bb8fd7be2d Starting new HTTP connection (1): elasticsearch:9200
[2024-04-24 17:19:50.030863] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://elasticsearch:9200 "GET /col_1713942223_dfffc4fc HTTP/1.1" 200 None
[2024-04-24 17:19:50.033146] [INFO process-9-140176475002560 elastic_transport._transport:349] - trace=9c9381e5a08344e89e0944bb8fd7be2d GET http://elasticsearch:9200/col_1713942223_dfffc4fc
[2024-04-24 17:19:50.039659] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://elasticsearch:9200 "POST /col_1713942223_dfffc4fc/_refresh HTTP/1.1" 200 0
[2024-04-24 17:19:50.042160] [INFO process-9-140176475002560 elastic_transport._transport:349] - trace=9c9381e5a08344e89e0944bb8fd7be2d POST http://elasticsearch:9200/col_1713942223_dfffc4fc/_refresh
[2024-04-24 17:19:50.047261] [INFO process-9-140176475002560 bisheng.api.services.knowledge_imp:250] - trace=9c9381e5a08344e89e0944bb8fd7be2d process_file_begin knowledge_id=3 file_name=app4gpt_api文档.txt file_size=1
[2024-04-24 17:19:50.053909] [DEBUG process-9-140176475002560 bisheng.utils.minio_client:40] - trace=9c9381e5a08344e89e0944bb8fd7be2d upload_file obj=original/19.txt bucket=bisheng file_paht=/root/.cache/bisheng/bisheng/c28f1fdafe014a3848f90ff9377d2dadd9b8a46f8a818cc0a3f5df4d9f40cf7e.txt
[2024-04-24 17:19:50.061517] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "PUT /bisheng/original/19.txt HTTP/1.1" 200 0
[2024-04-24 17:19:50.063960] [INFO process-9-140176475002560 bisheng.api.services.knowledge_imp:282] - trace=9c9381e5a08344e89e0944bb8fd7be2d upload_original_file path=original/19.txt res=<minio.helpers.ObjectWriteResult object at 0x7f7dbc170940>
[2024-04-24 17:19:50.080493] [DEBUG process-9-140176475002560 bisheng.utils.minio_client:40] - trace=9c9381e5a08344e89e0944bb8fd7be2d upload_file obj=19 bucket=bisheng file_paht=/root/.cache/bisheng/bisheng/c28f1fdafe014a3848f90ff9377d2dadd9b8a46f8a818cc0a3f5df4d9f40cf7e.txt
[2024-04-24 17:19:50.087340] [DEBUG process-9-140176475002560 urllib3.connectionpool:549] - trace=9c9381e5a08344e89e0944bb8fd7be2d http://minio:9000 "PUT /bisheng/19 HTTP/1.1" 200 0
[2024-04-24 17:19:50.089735] [INFO process-9-140176475002560 bisheng.api.services.knowledge_imp:291] - trace=9c9381e5a08344e89e0944bb8fd7be2d chunk_split file_name=app4gpt_api文档.txt size=2
[2024-04-24 17:19:50.091854] [ERROR process-9-140176475002560 bisheng.api.services.knowledge_imp:292] - trace=9c9381e5a08344e89e0944bb8fd7be2d 1 =========================================================
[2024-04-24 17:19:50.094086] [ERROR process-9-140176475002560 bisheng.api.services.knowledge_imp:307] - trace=9c9381e5a08344e89e0944bb8fd7be2d ==========================================================
[2024-04-24 17:19:50.096236] [ERROR process-9-140176475002560 bisheng.api.services.knowledge_imp:312] - trace=9c9381e5a08344e89e0944bb8fd7be2d before vectore_client.add_texts ==========================================================
[2024-04-24 17:19:50.123094] [DEBUG process-9-140176475002560 openai._base_client:442] - trace=9c9381e5a08344e89e0944bb8fd7be2d Request options: {'method': 'post', 'url': '/embeddings', 'files': None, 'post_parser': <function Embeddings.create..parser at 0x7f7dbc632f80>, 'json_data':
{'input': [[30867, 29391, 30046, 67494, 198, 22656, 71890, 6701, 249, 71890, 22656, 37689, 92776, 18184, 30867, 29391, 30046, 29172, 84844, 91272, 13647, 101, 24615, 111, 23187, 9554, 5109, 15836, 79656, 9554, 7227, 48972, 11883, 30177, 40526, 3922, 24273, 20135, 123,
29504, 32943, 20600, 38129, 7305, 226, 22238, 30867, 39084, 16047, 38, 2898, 74445, 58291, 30046, 15836, 19817, 228, 35722, 253, 9554, 46056, 9554, 38129, 1811, 19361, 49988, 99849, 87219, 15225, 21601, 49126, 47453, 97, 73164, 65854, 44309, 5232, 47453, 97, 18476,
10336, 23181, 22159], [50021, 57106, 5109, 15836, 9554, 36668, 31634, 91272, 8239, 123, 198, 16937, 48249, 44416, 29504, 32943, 38129, 3922, 74770, 11883, 69362, 8676, 251, 47000, 69253, 3922, 81543, 16175, 223, 18476, 72406, 236, 14309, 102, 9174, 43292, 59462, 31640,
22649, 92776, 31540, 10414, 123, 57107, 3922, 81543, 43244, 247, 9554, 33443, 119, 26955, 99, 9174, 6708, 120, 37729, 5109, 15836, 30177, 40526, 69905, 3922, 74770, 49691, 248, 28037, 50211, 27552, 123, 1811, 7227, 11883, 25333, 75863, 31540, 74843, 78698, 8676, 246,
24273, 17161, 44559, 96, 198, 43292, 32335, 8687, 236, 33420, 81368, 81194, 58318, 32335, 8687, 236, 6708, 227, 26592, 81194, 3922, 74770, 19967, 18184, 22656, 30590, 82805, 30867, 29391, 9554, 47406, 58666, 27552, 123, 31640, 25446, 9174, 680, 19, 70, 418, 99873, 30177,
17701, 17161, 44559, 96, 198, 7227, 75910, 12774, 235, 198, 7227, 68438, 9412, 35959, 48972, 11883, 1811, 74257, 33671, 35959, 3922, 86206, 19000, 9412, 65455, 16325, 162, 238, 118, 13821, 99, 20600, 9554, 3404, 3922, 11883, 35304, 30051, 34577, 1811, 40265, 30051,
34577, 19653, 3922, 73548, 38093, 98657, 33976, 20600, 81201, 17982, 89783, 62291, 3922, 63344, 89783, 62291, 16937, 50266, 111, 96153, 32626, 198, 286, 5473, 850, 1232, 364, 1354, 27781, 20746, 16823, 9412, 35959, 30051, 34577, 198, 56438, 9412, 35959, 38129, 7227,
9857, 72917, 30051, 34577, 1811, 20600, 62789, 34547, 3922, 74770, 19000, 75976, 93233, 28037, 37026, 17597, 109, 9554, 3404, 1811, 19000, 74257, 15120, 33671, 7227, 35959, 13646, 3922, 45163, 3404, 13821, 99, 19000, 4137, 16325, 72917, 30051, 34577, 1811, 15225, 33563,
24326, 97, 53901, 57668, 9554, 3404, 6447, 16937, 31634, 45163, 37026, 17597, 109, 9554, 3404, 55999, 72843, 90112, 43511, 17792, 58291, 74245, 30177, 47585, 19000, 65854, 17982, 79982, 9554, 47200, 16325, 9174, 56438, 7227, 35959, 72368, 51611, 76982, 68379, 26955, 105,
7227, 9857, 19000, 18616, 10339, 12376, 16325, 3922, 57106, 30624, 29411, 286, 31662, 25, 220, 426, 21449, 21592, 11669, 19199, 198, 35959, 20379, 27452, 198, 88852, 21043, 48044, 7227, 35959, 9554, 20379, 27452, 1811, 41914, 8687, 237, 45163, 3, 7227, 19199, 27552, 123,
72234, 18184, 57668, 37026, 17597, 109, 9554, 7227, 5422, 9174, 20520, 29411, 286, 14284, 3788, 1129, 2113, 1632, 19, 70, 418, 916, 5574, 16, 72435, 26149, 11053, 919, 3120, 310, 482, 39, 330, 2831, 11038, 25, 3851, 9108, 1, 3120, 310, 482, 39, 330, 18616, 25, 220, 426,
21449, 400, 7227, 19199, 1, 3120, 310, 482, 67, 364, 517, 394, 330, 2590, 794, 330, 70, 418, 12, 18, 13, 20, 2442, 324, 754, 761, 394, 330, 16727, 794, 62853, 5898, 794, 330, 882, 498, 330, 1834, 794, 330, 46864, 420, 374, 264, 1296, 9135, 65154, 394, 330, 35658, 794,
220, 15, 13, 22, 198, 310, 335, 1270, 7071, 31380, 29411, 286, 1179, 7540, 198, 286, 5665, 284, 364, 2485, 1129, 2113, 1632, 19, 70, 418, 916, 5574, 16, 72435, 26149, 11053, 919, 1270, 286, 9216, 284, 7540, 6679, 41725, 11, 3024, 18013, 310, 364, 2590, 1232, 364, 70,
418, 12, 18, 13, 20, 2442, 324, 754, 756, 310, 364, 16727, 1232, 62208, 5898, 1232, 364, 882, 518, 364, 1834, 1232, 364, 18904, 59464, 44388, 21043, 48044, 82805, 8439, 1282, 310, 364, 35658, 1232, 220, 15, 345, 286, 2529, 7247, 18013, 310, 364, 18616, 1232, 330, 426,
21449, 400, 7227, 19199, 702, 286, 2820, 286, 1194, 20882, 4421, 2455, 7071, 44388, 19483, 35959, 45163, 48972, 11883, 70, 418, 12, 18, 13, 20, 2442, 324, 754, 54872, 25287, 3922, 61648, 33764, 58543, 1811, 57668, 45163, 38093, 50928, 28037, 22238, 17885, 120, 30624,
17297, 9554, 32626, 60251, 29411, 286, 341, 692, 330, 307, 3332, 9884, 6358, 501, 12, 13997, 4513, 761, 692, 330, 1735, 3332, 9884, 916, 14723, 761, 692, 330, 7266, 794, 11515, 22539, 25016, 17, 345, 692, 330, 2590, 3332, 70, 418, 12, 18, 13, 20, 2442, 324, 754, 12,
14649, 16, 761, 692, 330, 18168, 12888, 1078, 330, 41681, 29938, 794, 1032, 345, 1078, 330, 44412, 29938, 794, 22, 345, 1078, 330, 5143, 29938, 794, 508, 198, 692, 1173, 692, 330, 25825, 9075, 198, 1078, 341, 394, 330, 2037, 12888, 504, 330, 5898, 3332, 78191, 761, 504,
330, 1834, 3332, 59, 77, 1734, 2028, 374, 264, 1296, 25765, 394, 1173, 394, 330, 31250, 39329, 3332, 9684, 761, 394, 330, 1275, 794, 15, 198, 1078, 457, 692, 5243, 286, 457, 7071, 36668, 31634, 30177, 40526, 75910, 12774, 235, 12, 36735, 232, 36827, 198, 36735, 232,
36827, 33764, 58543, 198, 90112, 23187, 48044, 36735, 232, 36827, 33764, 58543, 3922, 54872, 25287, 45163, 32626, 48044, 36735, 232, 36827, 18904, 29857, 242, 20648, 235, 51611, 9174, 51477, 36735, 232, 36827, 33764, 58543, 198, 286, 13165, 3788, 1129, 2113, 1632, 19,
70, 418, 916, 5574, 16, 72435, 26149, 11053, 919, 198, 35959, 33765, 198, 2590, 33005, 25, 925, 59614, 69856, 198, 31634, 38129, 9554, 54872, 25287, 926, 1811, 88126, 74770, 38129, 1, 32218, 20834, 56438, 54872, 25287, 1, 7227, 33976, 52030, 56438, 31540, 11883, 9554,
54872, 25287, 3922, 58291, 33976, 52030, 98739, 9554, 1747, 24131, 35287, 50338, 8676, 225, 80578, 9554, 54581, 9174, 16727, 33005, 25, 1358, 59614, 69856, 198, 45059, 36735, 232, 36827, 9554, 46239, 65305, 3922, 69905, 18184, 5483, 65529, 3922, 68379, 96412, 88852,
46031, 29411, 5898, 5232, 64936, 39135, 3922, 74770, 21043, 9125, 11, 1089, 52044, 3922, 58291, 30046, 21043, 882, 198, 1834, 5232, 28469, 9554, 44915, 198, 35658, 33005, 25, 2273, 31540, 31867, 81646, 25, 220, 16, 198, 31634, 38129, 9554, 13393, 229, 91985, 35086, 102,
27479, 3922, 75910, 35304, 15, 34208, 17, 55030, 18363, 1811, 16205, 225, 45736, 9554, 26592, 10110, 78657, 15, 13, 23, 7705, 38093, 33655, 67117, 34226, 37795, 237, 33748, 3922, 69636, 16205, 225, 8687, 236, 9554, 26592, 10110, 78657, 15, 13, 17, 7705, 38093, 33655,
42246, 34226, 21601, 43167, 16325, 34208, 61710, 34171, 9174, 3565, 623, 33005, 25, 2273, 31540, 31867, 81646, 25, 220, 16, 198, 58318, 35086, 102, 27479, 15120, 72718, 13393, 229, 91985, 9554, 27552, 123, 31640, 41007, 3922, 25666, 18184, 72237, 64209, 13393, 229,
91985, 3922, 92019, 54872, 25287, 78698, 84264, 239, 77913, 19361, 3565, 623, 162, 25451, 96455, 13647, 101, 33857, 9554, 6271, 97, 17044, 234, 9554, 60251, 1811, 63212, 33091, 3922, 15, 13, 16, 52563, 6271, 227, 78698, 84264, 239, 41127, 13153, 25580, 605, 1569, 227,
162, 25451, 96455, 13647, 101, 33857, 9554, 6271, 97, 17044, 234, 9174, 77, 33005, 25, 528, 31540, 31867, 81646, 25, 220, 16, 198, 31634, 18184, 74257, 19483, 46239, 45059, 9554, 29857, 242, 81742, 9039, 9174, 2880, 29938, 33005, 25, 528, 31540, 31867, 81646, 25, 4225,
198, 33764, 58543, 32335, 43240, 74770, 45059, 9554, 6271, 97, 17044, 234, 9039, 9174, 74519, 83386, 33005, 25, 2273, 31540, 31867, 81646, 25, 220, 15, 198, 75910, 35304, 12, 17, 13, 15, 34208, 17, 13, 15, 55030, 18363, 9554, 83687, 1811, 37656, 26592, 38093, 15308, 117,
16423, 17039, 6271, 97, 17044, 234, 65571, 20834, 47551, 19000, 10287, 226, 37271, 18184, 82533, 9554, 17161, 22656, 16325, 33764, 42246, 72917, 33565, 102, 15581, 248, 3922, 50285, 21601, 54872, 25287, 39013, 230, 68931, 17039, 36668, 34972, 9554, 88367, 34171, 9174,
47621, 83386, 33005, 25, 2273, 31540, 31867, 81646, 25, 220, 15, 198, 75910, 35304, 12, 17, 13, 15, 34208, 17, 13, 15, 55030, 18363, 9554, 83687, 1811, 37656, 26592, 38093, 15308, 117, 16423, 10287, 226, 37271, 18184, 82533, 9554, 17161, 22656, 16325, 9554, 47551, 19361,
66052, 96455, 33565, 102, 15581, 248, 17039, 6271, 97, 17044, 234, 3922, 14309, 235, 8687, 236, 54872, 25287, 30358, 59464, 42016, 15120, 23039, 9554, 88367, 34171, 9174, 36668, 31634, 30177, 40526, 75910, 12774, 235, 12, 54872, 25287, 198, 32218, 20834, 56438, 54872,
25287, 198, 32218, 20834, 56438, 74770, 38129, 9554, 54872, 25287, 3922, 23897, 82317, 54872, 25287, 9554, 75146, 22656, 28469, 1811, 33565, 111, 35287, 50338, 54872, 25287, 74770, 49691, 248, 6271, 222, 82696, 3922, 54872, 25287, 18363, 19361, 6271, 222, 82696, 16937,
42016, 39045, 74843, 78698, 5109, 15836, 17161, 44559, 96, 9174, 286, 8049, 3788, 1129, 2113, 1632, 19, 70, 418, 916, 5574, 16, 20883, 198, 36668, 31634, 30177, 40526, 75910, 12774, 235, 12, 17161, 22656, 47770, 70141, 33857, 198, 17161, 22656, 47770, 70141, 33857,
38168, 25624, 198, 38743, 81368, 67494, 5232, 1342, 12, 95711, 12, 2649, 12, 6726, 6704, 45501, 25287, 9554, 9857, 220, 98580, 21043, 342, 418, 12, 18, 13, 20, 2442, 324, 754, 44689, 6708, 255, 17620, 55030, 15120, 3922, 98739, 37767, 28833, 36343, 24326, 246, 70203,
18184, 14191, 107, 17620, 39045, 23897, 14191, 107, 17620, 18184, 12870, 228, 1811, 74257, 33671, 35959, 32335, 8687, 236, 33420, 81368, 220, 19, 14191, 107, 17620, 9174, 286, 13165, 3788, 1129, 2113, 1632, 19, 70, 418, 916, 5574, 16, 59753, 25624, 198, 286, 6146, 2927,
20379, 27452, 198, 286, 738, 7963, 284, 1397, 446, 3593, 81140, 803, 286, 7963, 446, 2485, 1129, 2113, 1632, 19, 70, 418, 916, 5574, 16, 59753, 25624, 498, 341, 692, 1749, 25, 330, 3019, 761, 692, 7247, 25, 341, 310, 31662, 25, 330, 27497, 220, 57668, 9554, 2113, 3173,
761, 310, 330, 2831, 11038, 794, 330, 5242, 9108, 761, 692, 1173, 692, 2547, 25, 4823, 10258, 2313, 310, 1988, 25, 330, 99771, 99771, 99771, 99771, 99771, 761, 310, 1646, 25, 330, 1342, 12, 95711, 12, 2649, 12, 6726, 761, 692, 12240, 286, 1657, 1084, 35959, 33765, 198,
2590, 33005, 25, 925, 59614, 69856, 198, 9921, 118, 23187, 18184, 1495, 12, 95711, 12, 2649, 12, 6726, 220, 96511, 11883, 35304, 17161, 22656, 47770, 70141, 33857, 198, 32626, 20379, 27452, 198, 415, 341, 286, 330, 1735, 794, 330, 1638, 761, 286, 330, 695, 794, 2330,
692, 341, 310, 330, 1735, 794, 330, 95711, 761, 310, 330, 95711, 794, 2330, 1078, 220, 15, 13, 6726, 12879, 17837, 20, 345, 1078, 482, 15, 13, 13858, 13817, 16443, 345, 1078, 22666, 320, 9800, 21, 49002, 2860, 369, 35334, 12, 6726, 340, 1078, 482, 15, 13, 6726, 25962,
9716, 17, 345, 310, 3291, 310, 330, 1275, 794, 220, 15, 198, 692, 457, 286, 3291, 286, 330, 2590, 794, 330, 1342, 12, 95711, 12, 2649, 12, 6726, 761, 286, 330, 18168, 794, 341, 692, 330, 41681, 29938, 794, 220, 23, 345, 692, 330, 5143, 29938, 794, 220, 23, 198, 286, 457,
415, 335]], 'model': 'text-embedding-ada-002', 'encoding_format': 'base64'}}
[2024-04-24 17:19:50.198049] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d connect_tcp.started host='api.app4gpt.com' port=443 local_address=None timeout=None socket_options=None
[2024-04-24 17:19:50.410770] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7f7dbc6218d0>
[2024-04-24 17:19:50.413398] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d start_tls.started ssl_context=<ssl.SSLContext object at 0x7f7dbc44d3c0> server_hostname='api.app4gpt.com' timeout=None
[2024-04-24 17:19:50.616649] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d start_tls.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7f7dbc61a9b0>
[2024-04-24 17:19:50.619364] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d send_request_headers.started request=
[2024-04-24 17:19:50.621966] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d send_request_headers.complete
[2024-04-24 17:19:50.623978] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d send_request_body.started request=
[2024-04-24 17:19:50.627301] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d send_request_body.complete
[2024-04-24 17:19:50.629321] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d receive_response_headers.started request=
[2024-04-24 17:19:57.244665] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Wed, 24 Apr 2024 09:19:57 GMT'), (b'Content-Type', b'application/json; charset=utf-8'),
(b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Report-To',
b'{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=w4IW2LzavGRPr6tdozkEzjZ6ZA6bfGy8BXVjDSdZz8K9MVVAO%2BsTM%2BPmnegwC5GQsSoF8B5GxKPm1penAHtQXTYd8w6%2FT2zviFzwxco%2BWN5tYuEWNLuCPmmqHw9FoP3piMI%3D"}],"group":"cf-nel","max_age":604800}'), (b'NEL',
b'{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'), (b'Server', b'cloudflare'), (b'CF-RAY', b'87950395f8177783-LHR'), (b'Content-Encoding', b'gzip'), (b'alt-svc', b'h3=":443"; ma=86400')])
[2024-04-24 17:19:57.250668] [INFO process-9-140176475002560 httpx._client:1013] - trace=9c9381e5a08344e89e0944bb8fd7be2d HTTP Request: POST https://api.app4gpt.com/v1/embeddings "HTTP/1.1 200 OK"
[2024-04-24 17:19:57.253157] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d receive_response_body.started request=
[2024-04-24 17:19:57.256184] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d receive_response_body.complete
[2024-04-24 17:19:57.258250] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d response_closed.started
[2024-04-24 17:19:57.260343] [DEBUG process-9-140176475002560 httpcore._trace:45] - trace=9c9381e5a08344e89e0944bb8fd7be2d response_closed.complete
[2024-04-24 17:19:57.262372] [DEBUG process-9-140176475002560 openai._base_client:962] - trace=9c9381e5a08344e89e0944bb8fd7be2d HTTP Request: POST https://api.app4gpt.com/v1/embeddings "200 OK"
[2024-04-24 17:19:57.264703] [ERROR process-9-140176475002560 bisheng.api.services.knowledge_imp:339] - trace=9c9381e5a08344e89e0944bb8fd7be2d add_vectordb 'NoneType' object is not iterable

关注一下

有解决办法了吗

我是这样配的,用的智谱的embedding-2 的 api,貌似可以:

embeddings: # 配置知识库的embedding服务,以下示例填写了两类embedding服务的配置方法,第一个是openai的embedding模型服务的配置方法,第二个是本地部署的embedding模型服务的配置方法,如果有多个可以添加多个
    embedding-2: # 知识库下拉框中显示的embedding模型的名称,可自定义
      component: openai
      openai_api_base: "https://open.bigmodel.cn/api/paas/v4"
      openai_api_key: "xxx"
      model: "embedding-2"

我是这样配的,用的智谱的embedding-2 的 api,貌似可以:

embeddings: # 配置知识库的embedding服务,以下示例填写了两类embedding服务的配置方法,第一个是openai的embedding模型服务的配置方法,第二个是本地部署的embedding模型服务的配置方法,如果有多个可以添加多个
    embedding-2: # 知识库下拉框中显示的embedding模型的名称,可自定义
      component: openai
      openai_api_base: "https://open.bigmodel.cn/api/paas/v4"
      openai_api_key: "xxx"
      model: "embedding-2"

我去试试

AzureOpenAIEmbeddings 支持吗?需要怎么配置?