diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embedding_index.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embedding_index.yaml new file mode 100644 index 0000000000000..866d8ecf39ba1 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embedding_index.yaml @@ -0,0 +1,453 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:16 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:16 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:16 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:16 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "c3d6c1fc-144a-4550-b0b6-0df30dca528e", "data": "penguin", "metadata": + {"topic": "bird", "text": "penguin"}}, {"id": "2843c257-5a00-41ca-baee-45e6616b2432", + "data": "albatros", "metadata": {"topic": "bird", "text": "albatros"}}, {"id": + "e428e4e9-b6d1-4ee6-a240-3825c6a6d040", "data": "beethoven", "metadata": {"topic": + "composer", "text": "beethoven"}}, {"id": "0c5ae333-d55d-42d3-bf44-75df6519b227", + "data": "rachmaninoff", "metadata": {"topic": "composer", "text": "rachmaninoff"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '492' + content-type: + - application/json + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/upsert-data + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:17 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 6470,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:17 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 6470,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:17 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 6470,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:18 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 2, "includeVectors": false, "includeMetadata": true, "filter": + "", "data": "eagle"}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '92' + content-type: + - application/json + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/query-data + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"c3d6c1fc-144a-4550-b0b6-0df30dca528e\",\n + \ \"score\" : 0.8220105,\n \"metadata\" : {\"topic\":\"bird\",\"text\":\"penguin\"}\n + \ }, {\n \"id\" : \"2843c257-5a00-41ca-baee-45e6616b2432\",\n \"score\" + : 0.7761154,\n \"metadata\" : {\"topic\":\"bird\",\"text\":\"albatros\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '288' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:18 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 2, "includeVectors": false, "includeMetadata": true, "filter": + "", "data": "mozart"}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '93' + content-type: + - application/json + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/query-data + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"e428e4e9-b6d1-4ee6-a240-3825c6a6d040\",\n + \ \"score\" : 0.88179696,\n \"metadata\" : {\"topic\":\"composer\",\"text\":\"beethoven\"}\n + \ }, {\n \"id\" : \"0c5ae333-d55d-42d3-bf44-75df6519b227\",\n \"score\" + : 0.84151983,\n \"metadata\" : {\"topic\":\"composer\",\"text\":\"rachmaninoff\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '304' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:18 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embedding_index_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embedding_index_async.yaml new file mode 100644 index 0000000000000..2c4855b1ff49c --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embedding_index_async.yaml @@ -0,0 +1,453 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:18 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:19 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:19 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:19 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "c91b9d1b-4b1e-4223-bf88-5a6711bd9648", "data": "penguin", "metadata": + {"topic": "bird", "text": "penguin"}}, {"id": "baf22a55-e3b8-47f1-a43a-c5c6eb41d53d", + "data": "albatros", "metadata": {"topic": "bird", "text": "albatros"}}, {"id": + "0c1f7416-625e-4d19-b18b-79e229fdca42", "data": "beethoven", "metadata": {"topic": + "composer", "text": "beethoven"}}, {"id": "ec613f2b-2bb8-430a-88bf-7ed374c201b1", + "data": "rachmaninoff", "metadata": {"topic": "composer", "text": "rachmaninoff"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '492' + content-type: + - application/json + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/upsert-data + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:19 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 6470,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:19 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 6470,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:20 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 6470,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:20 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 2, "includeVectors": false, "includeMetadata": true, "filter": + "", "data": "eagle"}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '92' + content-type: + - application/json + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/query-data + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"c91b9d1b-4b1e-4223-bf88-5a6711bd9648\",\n + \ \"score\" : 0.8220105,\n \"metadata\" : {\"topic\":\"bird\",\"text\":\"penguin\"}\n + \ }, {\n \"id\" : \"baf22a55-e3b8-47f1-a43a-c5c6eb41d53d\",\n \"score\" + : 0.7761154,\n \"metadata\" : {\"topic\":\"bird\",\"text\":\"albatros\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '288' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:20 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 2, "includeVectors": false, "includeMetadata": true, "filter": + "", "data": "mozart"}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '93' + content-type: + - application/json + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/query-data + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"0c1f7416-625e-4d19-b18b-79e229fdca42\",\n + \ \"score\" : 0.88179696,\n \"metadata\" : {\"topic\":\"composer\",\"text\":\"beethoven\"}\n + \ }, {\n \"id\" : \"ec613f2b-2bb8-430a-88bf-7ed374c201b1\",\n \"score\" + : 0.84151983,\n \"metadata\" : {\"topic\":\"composer\",\"text\":\"rachmaninoff\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '304' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:21 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embeddings_configurations.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embeddings_configurations.yaml new file mode 100644 index 0000000000000..1b6918d19a408 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_embeddings_configurations.yaml @@ -0,0 +1,174 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:15 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:15 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:15 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:16 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_async_index.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_async_index.yaml new file mode 100644 index 0000000000000..7d71e20044031 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_async_index.yaml @@ -0,0 +1,218 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:53 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:54 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:54 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:54 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:54 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_credentials.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_credentials.yaml new file mode 100644 index 0000000000000..f772c70c8f40a --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_credentials.yaml @@ -0,0 +1,218 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:54 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:55 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:55 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:55 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:55 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_credentials_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_credentials_async.yaml new file mode 100644 index 0000000000000..7ce2a3d49727e --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_credentials_async.yaml @@ -0,0 +1,218 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:55 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:56 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:56 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:56 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:56 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_index.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_index.yaml new file mode 100644 index 0000000000000..04603565b86ef --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_init_from_index.yaml @@ -0,0 +1,218 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:53 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:53 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:53 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:53 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:53 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_add_documents_mixed_metadata.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_add_documents_mixed_metadata.yaml new file mode 100644 index 0000000000000..6c6a36be651d6 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_add_documents_mixed_metadata.yaml @@ -0,0 +1,399 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:59 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:59 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:59 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:59 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "0", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], + "metadata": {"text": "foo"}}, {"id": "1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"baz": 1, "text": "bar"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '218' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:59 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 2,\n \"pendingVectorCount\" + : 2,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:59 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 2,\n \"pendingVectorCount\" + : 2,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:00 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 2,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:01 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 4, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"0\",\n \"score\" : 1.0,\n + \ \"metadata\" : {\"text\":\"foo\"}\n }, {\n \"id\" : \"1\",\n \"score\" + : 0.97434163,\n \"metadata\" : {\"baz\":1,\"text\":\"bar\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '182' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:01 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_add_documents_no_metadata.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_add_documents_no_metadata.yaml new file mode 100644 index 0000000000000..c593713ee6258 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_add_documents_no_metadata.yaml @@ -0,0 +1,397 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:56 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:57 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:57 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:57 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "00a18513-7630-4a38-89be-dbea501b2d2d", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"text": "foo"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '139' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:57 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 1,\n \"pendingVectorCount\" + : 1,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:57 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 1,\n \"pendingVectorCount\" + : 1,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:58 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 1,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:58 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 4, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"00a18513-7630-4a38-89be-dbea501b2d2d\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"text\":\"foo\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '128' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:58 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_max_marginal_relevance_search_with_metadata.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_max_marginal_relevance_search_with_metadata.yaml new file mode 100644 index 0000000000000..bb8fbe25850c0 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_max_marginal_relevance_search_with_metadata.yaml @@ -0,0 +1,404 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:11 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:11 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:11 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:11 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "0", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], + "metadata": {"text": "foo"}}, {"id": "1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"waldo": 1, "text": "bar"}}, {"id": "3", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"waldo": + 1, "text": "baz"}}, {"id": "4", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 3.0], "metadata": {"waldo": 2, "text": "fred"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '453' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:11 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:11 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:12 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:12 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 20, "includeVectors": true, "includeMetadata": true, "filter": + "waldo = 1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '146' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"1\",\n \"score\" : 0.97434163,\n + \ \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ],\n \"metadata\" + : {\"waldo\":1,\"text\":\"bar\"}\n }, {\n \"id\" : \"3\",\n \"score\" + : 0.91602516,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 2.0 ],\n \"metadata\" : {\"waldo\":1,\"text\":\"baz\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '339' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:13 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_max_marginal_relevance_search_with_metadata_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_max_marginal_relevance_search_with_metadata_async.yaml new file mode 100644 index 0000000000000..cfa31240c2faf --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_max_marginal_relevance_search_with_metadata_async.yaml @@ -0,0 +1,404 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:13 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:13 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:13 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:13 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "0", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], + "metadata": {"text": "foo"}}, {"id": "1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"waldo": 1, "text": "bar"}}, {"id": "3", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"waldo": + 1, "text": "baz"}}, {"id": "4", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 3.0], "metadata": {"waldo": 2, "text": "fred"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '453' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:13 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:14 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:14 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:15 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 20, "includeVectors": true, "includeMetadata": true, "filter": + "waldo = 1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '146' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"1\",\n \"score\" : 0.97434163,\n + \ \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ],\n \"metadata\" + : {\"waldo\":1,\"text\":\"bar\"}\n }, {\n \"id\" : \"3\",\n \"score\" + : 0.91602516,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 2.0 ],\n \"metadata\" : {\"waldo\":1,\"text\":\"baz\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '339' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:15 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr.yaml new file mode 100644 index 0000000000000..09b2b3e0b0cbd --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr.yaml @@ -0,0 +1,406 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:43 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:43 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:43 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:43 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "2596d017-3ece-4f78-8298-317f42845a95", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"text": "foo"}}, {"id": "78c5c468-6b24-4fc1-b85e-aa3da1442187", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"text": + "bar"}}, {"id": "b5e48d09-e77a-4a37-b5e2-3c7b2f1d3b58", "vector": [1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '417' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:44 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:44 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:44 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:45 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 20, "includeVectors": true, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"2596d017-3ece-4f78-8298-317f42845a95\",\n + \ \"score\" : 1.0,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 0.0 ],\n \"metadata\" : {\"text\":\"foo\"}\n }, {\n \"id\" + : \"78c5c468-6b24-4fc1-b85e-aa3da1442187\",\n \"score\" : 0.97434163,\n + \ \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ],\n \"metadata\" + : {\"text\":\"bar\"}\n }, {\n \"id\" : \"b5e48d09-e77a-4a37-b5e2-3c7b2f1d3b58\",\n + \ \"score\" : 0.91602516,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 2.0 ],\n \"metadata\" : {\"text\":\"baz\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '567' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:45 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_async.yaml new file mode 100644 index 0000000000000..db2e172672ccc --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_async.yaml @@ -0,0 +1,406 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:45 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:45 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:46 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:46 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "a9af95ed-b0f7-4ea9-a7bf-bc1224cc2504", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"text": "foo"}}, {"id": "5e1802fb-31e3-4424-840f-25da228f7a07", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"text": + "bar"}}, {"id": "ef9e3286-0d28-42bc-aaed-faeed7a1c9cd", "vector": [1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '417' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:46 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:46 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:47 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:47 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 20, "includeVectors": true, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"a9af95ed-b0f7-4ea9-a7bf-bc1224cc2504\",\n + \ \"score\" : 1.0,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 0.0 ],\n \"metadata\" : {\"text\":\"foo\"}\n }, {\n \"id\" + : \"5e1802fb-31e3-4424-840f-25da228f7a07\",\n \"score\" : 0.97434163,\n + \ \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ],\n \"metadata\" + : {\"text\":\"bar\"}\n }, {\n \"id\" : \"ef9e3286-0d28-42bc-aaed-faeed7a1c9cd\",\n + \ \"score\" : 0.91602516,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 2.0 ],\n \"metadata\" : {\"text\":\"baz\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '567' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:47 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_by_vector.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_by_vector.yaml new file mode 100644 index 0000000000000..ab26a04143d2a --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_by_vector.yaml @@ -0,0 +1,406 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:48 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:48 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:48 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:48 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "a087b72e-906f-4724-a867-4af800e67052", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"text": "foo"}}, {"id": "f561d2fb-113f-44de-8f97-133984e195da", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"text": + "bar"}}, {"id": "0bb4529a-9431-49d8-ba5b-4af6813e4435", "vector": [1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '417' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:49 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:49 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:49 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:50 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 20, "includeVectors": true, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"a087b72e-906f-4724-a867-4af800e67052\",\n + \ \"score\" : 1.0,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 0.0 ],\n \"metadata\" : {\"text\":\"foo\"}\n }, {\n \"id\" + : \"f561d2fb-113f-44de-8f97-133984e195da\",\n \"score\" : 0.97434163,\n + \ \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ],\n \"metadata\" + : {\"text\":\"bar\"}\n }, {\n \"id\" : \"0bb4529a-9431-49d8-ba5b-4af6813e4435\",\n + \ \"score\" : 0.91602516,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 2.0 ],\n \"metadata\" : {\"text\":\"baz\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '567' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:50 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_by_vector_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_by_vector_async.yaml new file mode 100644 index 0000000000000..b7b43bd43a273 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_mmr_by_vector_async.yaml @@ -0,0 +1,406 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:50 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:50 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:50 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:51 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "cda72878-0b62-4790-a565-e5b3ec2f62c4", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"text": "foo"}}, {"id": "7246c7a9-9f83-4867-a0a7-b8e68358afc4", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"text": + "bar"}}, {"id": "59ef5dfa-b434-4bec-892e-9f18ac4bed9f", "vector": [1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '417' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:51 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:51 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:51 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:52 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 20, "includeVectors": true, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"cda72878-0b62-4790-a565-e5b3ec2f62c4\",\n + \ \"score\" : 1.0,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 0.0 ],\n \"metadata\" : {\"text\":\"foo\"}\n }, {\n \"id\" + : \"7246c7a9-9f83-4867-a0a7-b8e68358afc4\",\n \"score\" : 0.97434163,\n + \ \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ],\n \"metadata\" + : {\"text\":\"bar\"}\n }, {\n \"id\" : \"59ef5dfa-b434-4bec-892e-9f18ac4bed9f\",\n + \ \"score\" : 0.91602516,\n \"vector\" : [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 2.0 ],\n \"metadata\" : {\"text\":\"baz\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '567' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:52 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_by_vector_with_metadata.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_by_vector_with_metadata.yaml new file mode 100644 index 0000000000000..cacf31e686029 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_by_vector_with_metadata.yaml @@ -0,0 +1,403 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:06 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:06 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:06 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:06 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "0", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], + "metadata": {"text": "foo"}}, {"id": "1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"waldo": 1, "text": "bar"}}, {"id": "3", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"waldo": + 1, "text": "baz"}}, {"id": "4", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 3.0], "metadata": {"waldo": 2, "text": "fred"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '453' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:07 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:07 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:07 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:08 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 5, "includeVectors": false, "includeMetadata": true, "filter": + "waldo = 1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '146' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"1\",\n \"score\" : 1.0,\n + \ \"metadata\" : {\"waldo\":1,\"text\":\"bar\"}\n }, {\n \"id\" : \"3\",\n + \ \"score\" : 0.98238194,\n \"metadata\" : {\"waldo\":1,\"text\":\"baz\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '194' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:08 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_by_vector_with_metadata_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_by_vector_with_metadata_async.yaml new file mode 100644 index 0000000000000..e80434fc2e120 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_by_vector_with_metadata_async.yaml @@ -0,0 +1,403 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:08 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:08 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:08 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:08 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "0", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], + "metadata": {"text": "foo"}}, {"id": "1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"waldo": 1, "text": "bar"}}, {"id": "3", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"waldo": + 1, "text": "baz"}}, {"id": "4", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 3.0], "metadata": {"waldo": 2, "text": "fred"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '453' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:09 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:09 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:09 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:10 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 5, "includeVectors": false, "includeMetadata": true, "filter": + "waldo = 1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '146' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"1\",\n \"score\" : 1.0,\n + \ \"metadata\" : {\"waldo\":1,\"text\":\"bar\"}\n }, {\n \"id\" : \"3\",\n + \ \"score\" : 0.98238194,\n \"metadata\" : {\"waldo\":1,\"text\":\"baz\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '194' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:10 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_with_metadata.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_with_metadata.yaml new file mode 100644 index 0000000000000..176979c3c8a01 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_with_metadata.yaml @@ -0,0 +1,449 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:01 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:01 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:01 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:01 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "0", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], + "metadata": {"text": "foo"}}, {"id": "1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"waldo": 1, "text": "bar"}}, {"id": "3", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"waldo": + 1, "text": "baz"}}, {"id": "4", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 3.0], "metadata": {"waldo": 2, "text": "fred"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '453' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:02 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:02 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:02 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:03 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 5, "includeVectors": false, "includeMetadata": true, "filter": + "waldo = 1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '146' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"1\",\n \"score\" : 0.97434163,\n + \ \"metadata\" : {\"waldo\":1,\"text\":\"bar\"}\n }, {\n \"id\" : \"3\",\n + \ \"score\" : 0.91602516,\n \"metadata\" : {\"waldo\":1,\"text\":\"baz\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '201' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:03 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 5, "includeVectors": false, "includeMetadata": true, "filter": + "waldo = 2", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '146' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"4\",\n \"score\" : 0.8535534,\n + \ \"metadata\" : {\"waldo\":2,\"text\":\"fred\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '110' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:03 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_with_metadata_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_with_metadata_async.yaml new file mode 100644 index 0000000000000..b80fb883425d9 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_similarity_search_with_metadata_async.yaml @@ -0,0 +1,449 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:03 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:03 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:04 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:04 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "0", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], + "metadata": {"text": "foo"}}, {"id": "1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"waldo": 1, "text": "bar"}}, {"id": "3", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"waldo": + 1, "text": "baz"}}, {"id": "4", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 3.0], "metadata": {"waldo": 2, "text": "fred"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '453' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:04 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:04 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 4,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:05 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 4,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:05 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 5, "includeVectors": false, "includeMetadata": true, "filter": + "waldo = 1", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '146' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"1\",\n \"score\" : 0.97434163,\n + \ \"metadata\" : {\"waldo\":1,\"text\":\"bar\"}\n }, {\n \"id\" : \"3\",\n + \ \"score\" : 0.91602516,\n \"metadata\" : {\"waldo\":1,\"text\":\"baz\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '201' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:05 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 5, "includeVectors": false, "includeMetadata": true, "filter": + "waldo = 2", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '146' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"4\",\n \"score\" : 0.8535534,\n + \ \"metadata\" : {\"waldo\":2,\"text\":\"fred\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '110' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:45:06 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_simple_insert.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_simple_insert.yaml new file mode 100644 index 0000000000000..7a64df116cea7 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_simple_insert.yaml @@ -0,0 +1,400 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:24 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:24 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:24 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:24 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "03f31e48-b455-4d3f-9b75-80cd8fa5be4b", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"text": "foo"}}, {"id": "cc432a24-a3c7-47e3-a806-399c7dde2a92", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"text": + "bar"}}, {"id": "08a56f3c-c711-4329-95cd-8516e2f05df3", "vector": [1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '417' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:25 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:25 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:25 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:26 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 1, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"03f31e48-b455-4d3f-9b75-80cd8fa5be4b\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"text\":\"foo\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '128' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:26 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_simple_insert_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_simple_insert_async.yaml new file mode 100644 index 0000000000000..4538ff52dc27c --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_simple_insert_async.yaml @@ -0,0 +1,400 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:26 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:27 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:27 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:27 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "e087e36e-79c3-4a54-bd2a-97626f9a6672", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"text": "foo"}}, {"id": "864b4e8d-7b2b-4e3b-8295-9bc3d8a3e84b", + "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"text": + "bar"}}, {"id": "ea52dce9-09f5-44a3-aa2a-17c6074f0a93", "vector": [1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '417' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:27 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:27 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:28 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:28 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 1, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"e087e36e-79c3-4a54-bd2a-97626f9a6672\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"text\":\"foo\"}\n } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '128' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:28 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas.yaml new file mode 100644 index 0000000000000..9d50448bf0725 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas.yaml @@ -0,0 +1,402 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:29 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:29 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:29 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:29 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "dd2765fb-75dd-4cab-bf39-e0f2f2c7efd8", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"page": "0", "text": "foo"}}, + {"id": "4416d38f-3bd5-496c-a15a-ccfaed29e26f", "vector": [1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"page": "1", "text": "bar"}}, {"id": + "608ded88-6e6d-45bb-b433-7f1f65d5e500", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"page": "2", "text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '456' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:29 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:29 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:30 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:31 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 1, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"dd2765fb-75dd-4cab-bf39-e0f2f2c7efd8\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"page\":\"0\",\"text\":\"foo\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:31 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_async.yaml new file mode 100644 index 0000000000000..4a01e6cec10ad --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_async.yaml @@ -0,0 +1,402 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:31 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:31 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:31 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:31 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "dc7bf301-074f-482d-90ca-e5db2aaf7856", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"page": "0", "text": "foo"}}, + {"id": "c2aa384e-7ab9-44c8-a67a-19d2f3e005ec", "vector": [1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"page": "1", "text": "bar"}}, {"id": + "ba09467b-6d64-48a4-a7eb-a7f1d18d29a2", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"page": "2", "text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '456' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:32 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:32 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:32 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:33 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 1, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"dc7bf301-074f-482d-90ca-e5db2aaf7856\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"page\":\"0\",\"text\":\"foo\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:33 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores.yaml new file mode 100644 index 0000000000000..9aa30e1f02f14 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores.yaml @@ -0,0 +1,402 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:33 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:34 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:34 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:34 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "e8719d31-0b3a-4882-81ae-74ea7d362054", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"page": "0", "text": "foo"}}, + {"id": "7ec8a1b1-a120-4cd1-88fa-c74510da1f57", "vector": [1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"page": "1", "text": "bar"}}, {"id": + "0d87b9db-6081-45f6-a97f-8874c8980fee", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"page": "2", "text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '456' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:34 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:34 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:35 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:35 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 1, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"e8719d31-0b3a-4882-81ae-74ea7d362054\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"page\":\"0\",\"text\":\"foo\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:35 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_async.yaml new file mode 100644 index 0000000000000..3f0b4ed9a6933 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_async.yaml @@ -0,0 +1,402 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:36 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:36 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:36 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:36 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "ecbee7c1-f349-4647-8058-8d4a3c21f3d6", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"page": "0", "text": "foo"}}, + {"id": "e0a194f3-92fd-40ba-a5fd-892f075d6e11", "vector": [1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"page": "1", "text": "bar"}}, {"id": + "f91cf846-2f1a-4587-9713-b25815adcdc5", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"page": "2", "text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '456' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:36 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:36 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:37 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:38 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 1, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"ecbee7c1-f349-4647-8058-8d4a3c21f3d6\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"page\":\"0\",\"text\":\"foo\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:38 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_using_vector.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_using_vector.yaml new file mode 100644 index 0000000000000..5542bec8c9f20 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_using_vector.yaml @@ -0,0 +1,402 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:38 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:38 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:38 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:39 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "cad5b766-d164-4bd8-856d-1d9558483ca1", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"page": "0", "text": "foo"}}, + {"id": "ff046a51-4b15-4c11-a084-013c5eebde7c", "vector": [1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"page": "1", "text": "bar"}}, {"id": + "2cdb2f17-2e5f-4dc8-9d14-cd8642be4b69", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"page": "2", "text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '456' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:39 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:39 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:39 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:40 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 1, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"cad5b766-d164-4bd8-856d-1d9558483ca1\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"page\":\"0\",\"text\":\"foo\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:40 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_using_vector_async.yaml b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_using_vector_async.yaml new file mode 100644 index 0000000000000..d03f46bdb820f --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/cassettes/test_upstash/test_upstash_with_metadatas_with_scores_using_vector_async.yaml @@ -0,0 +1,402 @@ +interactions: +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:40 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/reset + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:41 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:41 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - thankful-dane-25695-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://thankful-dane-25695-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 0,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 384,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '155' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:41 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '[{"id": "3c3699b1-fded-4d20-add3-aeed630f3894", "vector": [1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0], "metadata": {"page": "0", "text": "foo"}}, + {"id": "5324945d-39c4-4a40-a4cf-80b28a0e993e", "vector": [1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], "metadata": {"page": "1", "text": "bar"}}, {"id": + "e425444c-d555-4b9f-877d-e04914551342", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 2.0], "metadata": {"page": "2", "text": "baz"}}]' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '456' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/upsert + response: + body: + string: "{\n \"result\" : \"Success\"\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:41 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:41 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 3,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:42 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '0' + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/info + response: + body: + string: "{\n \"result\" : {\n \"vectorCount\" : 3,\n \"pendingVectorCount\" + : 0,\n \"indexSize\" : 0,\n \"dimension\" : 10,\n \"similarityFunction\" + : \"COSINE\"\n }\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '154' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:42 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: '{"topK": 1, "includeVectors": false, "includeMetadata": true, "filter": + "", "vector": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0]}' + headers: + User-Agent: + - User-Agent-DUMMY + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - authorization-DUMMY + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - fond-mutt-96644-eu1-vector.upstash.io + upstash-telemetry-platform: + - unknown + upstash-telemetry-runtime: + - python@v3.9.19 + upstash-telemetry-sdk: + - upstash-vector-py@v0.3.1 + method: POST + uri: https://fond-mutt-96644-eu1-vector.upstash.io/query + response: + body: + string: "{\n \"result\" : [ {\n \"id\" : \"3c3699b1-fded-4d20-add3-aeed630f3894\",\n + \ \"score\" : 1.0,\n \"metadata\" : {\"page\":\"0\",\"text\":\"foo\"}\n + \ } ]\n}" + headers: + Connection: + - keep-alive + Content-Length: + - '139' + Content-Type: + - application/json + Date: + - Sat, 27 Apr 2024 21:44:43 GMT + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/libs/community/tests/integration_tests/vectorstores/test_upstash.py b/libs/community/tests/integration_tests/vectorstores/test_upstash.py index 4d9d02c62fc86..a378713a5041a 100644 --- a/libs/community/tests/integration_tests/vectorstores/test_upstash.py +++ b/libs/community/tests/integration_tests/vectorstores/test_upstash.py @@ -6,16 +6,30 @@ import pytest from langchain_core.documents import Document -from upstash_vector import AsyncIndex, Index from langchain_community.vectorstores.upstash import UpstashVectorStore from tests.integration_tests.vectorstores.fake_embeddings import ( FakeEmbeddings, ) +# to fix the following error in test with vcr and asyncio +# +# RuntimeError: asyncio.run() cannot be called from a running event loop +import nest_asyncio +nest_asyncio.apply() + + +@pytest.fixture(scope="module") +def vcr_cassette_dir(request): + # save under cassettes/test_upstash/{item}.yaml + return os.path.join("cassettes", "test_upstash") + @pytest.fixture(scope="function", autouse=True) def fixture() -> None: + + from upstash_vector import Index + index = Index.from_env() embedding_index = Index( url=os.environ["UPSTASH_VECTOR_URL_EMBEDDING"], @@ -49,6 +63,7 @@ def check_response_with_score( assert result == expected +@pytest.mark.vcr() def test_upstash_simple_insert() -> None: """Test end to end construction and search.""" texts = ["foo", "bar", "baz"] @@ -58,6 +73,7 @@ def test_upstash_simple_insert() -> None: assert output == [Document(page_content="foo")] +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_simple_insert_async() -> None: """Test end to end construction and search.""" @@ -68,6 +84,7 @@ async def test_upstash_simple_insert_async() -> None: assert output == [Document(page_content="foo")] +@pytest.mark.vcr() def test_upstash_with_metadatas() -> None: """Test end to end construction and search.""" texts = ["foo", "bar", "baz"] @@ -82,6 +99,7 @@ def test_upstash_with_metadatas() -> None: assert output == [Document(page_content="foo", metadata={"page": "0"})] +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_with_metadatas_async() -> None: """Test end to end construction and search.""" @@ -97,6 +115,7 @@ async def test_upstash_with_metadatas_async() -> None: assert output == [Document(page_content="foo", metadata={"page": "0"})] +@pytest.mark.vcr() def test_upstash_with_metadatas_with_scores() -> None: """Test end to end construction and scored search.""" texts = ["foo", "bar", "baz"] @@ -111,6 +130,7 @@ def test_upstash_with_metadatas_with_scores() -> None: assert output == [(Document(page_content="foo", metadata={"page": "0"}), 1.0)] +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_with_metadatas_with_scores_async() -> None: """Test end to end construction and scored search.""" @@ -126,6 +146,7 @@ async def test_upstash_with_metadatas_with_scores_async() -> None: assert output == [(Document(page_content="foo", metadata={"page": "0"}), 1.0)] +@pytest.mark.vcr() def test_upstash_with_metadatas_with_scores_using_vector() -> None: """Test end to end construction and scored search, using embedding vector.""" texts = ["foo", "bar", "baz"] @@ -143,6 +164,7 @@ def test_upstash_with_metadatas_with_scores_using_vector() -> None: assert output == [(Document(page_content="foo", metadata={"page": "0"}), 1.0)] +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_with_metadatas_with_scores_using_vector_async() -> None: """Test end to end construction and scored search, using embedding vector.""" @@ -163,6 +185,7 @@ async def test_upstash_with_metadatas_with_scores_using_vector_async() -> None: assert output == [(Document(page_content="foo", metadata={"page": "0"}), 1.0)] +@pytest.mark.vcr() def test_upstash_mmr() -> None: """Test end to end construction and search.""" texts = ["foo", "bar", "baz"] @@ -172,6 +195,7 @@ def test_upstash_mmr() -> None: assert output == [Document(page_content="foo")] +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_mmr_async() -> None: """Test end to end construction and search.""" @@ -182,6 +206,7 @@ async def test_upstash_mmr_async() -> None: assert output == [Document(page_content="foo")] +@pytest.mark.vcr() def test_upstash_mmr_by_vector() -> None: """Test end to end construction and search.""" texts = ["foo", "bar", "baz"] @@ -192,7 +217,7 @@ def test_upstash_mmr_by_vector() -> None: output = store.max_marginal_relevance_search_by_vector(embedded_query, k=1) assert output == [Document(page_content="foo")] - +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_mmr_by_vector_async() -> None: """Test end to end construction and search.""" @@ -205,7 +230,11 @@ async def test_upstash_mmr_by_vector_async() -> None: assert output == [Document(page_content="foo")] +@pytest.mark.vcr() def test_init_from_index() -> None: + + from upstash_vector import Index + index = Index.from_env() store = UpstashVectorStore(index=index) @@ -213,8 +242,12 @@ def test_init_from_index() -> None: assert store.info() is not None +@pytest.mark.vcr() @pytest.mark.asyncio async def test_init_from_async_index() -> None: + + from upstash_vector import AsyncIndex + index = AsyncIndex.from_env() store = UpstashVectorStore(async_index=index) @@ -222,6 +255,7 @@ async def test_init_from_async_index() -> None: assert await store.ainfo() is not None +@pytest.mark.vcr() def test_init_from_credentials() -> None: store = UpstashVectorStore( index_url=os.environ["UPSTASH_VECTOR_REST_URL"], @@ -231,6 +265,7 @@ def test_init_from_credentials() -> None: assert store.info() is not None +@pytest.mark.vcr() @pytest.mark.asyncio async def test_init_from_credentials_async() -> None: store = UpstashVectorStore( @@ -241,6 +276,7 @@ async def test_init_from_credentials_async() -> None: assert await store.ainfo() is not None +@pytest.mark.vcr() def test_upstash_add_documents_no_metadata() -> None: store = UpstashVectorStore(embedding=FakeEmbeddings()) store.add_documents([Document(page_content="foo")]) @@ -250,6 +286,7 @@ def test_upstash_add_documents_no_metadata() -> None: assert search == [Document(page_content="foo")] +@pytest.mark.vcr() def test_upstash_add_documents_mixed_metadata() -> None: store = UpstashVectorStore(embedding=FakeEmbeddings()) docs = [ @@ -266,6 +303,7 @@ def test_upstash_add_documents_mixed_metadata() -> None: ) +@pytest.mark.vcr() def test_upstash_similarity_search_with_metadata() -> None: store = UpstashVectorStore(embedding=FakeEmbeddings()) docs = [ @@ -292,6 +330,7 @@ def test_upstash_similarity_search_with_metadata() -> None: ) +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_similarity_search_with_metadata_async() -> None: store = UpstashVectorStore(embedding=FakeEmbeddings()) @@ -321,6 +360,7 @@ async def test_upstash_similarity_search_with_metadata_async() -> None: ) +@pytest.mark.vcr() def test_upstash_similarity_search_by_vector_with_metadata() -> None: store = UpstashVectorStore(embedding=FakeEmbeddings()) docs = [ @@ -348,6 +388,7 @@ def test_upstash_similarity_search_by_vector_with_metadata() -> None: ) +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_similarity_search_by_vector_with_metadata_async() -> None: store = UpstashVectorStore(embedding=FakeEmbeddings()) @@ -376,6 +417,7 @@ async def test_upstash_similarity_search_by_vector_with_metadata_async() -> None ) +@pytest.mark.vcr() def test_upstash_max_marginal_relevance_search_with_metadata() -> None: store = UpstashVectorStore(embedding=FakeEmbeddings()) docs = [ @@ -396,6 +438,7 @@ def test_upstash_max_marginal_relevance_search_with_metadata() -> None: ] +@pytest.mark.vcr() @pytest.mark.asyncio async def test_upstash_max_marginal_relevance_search_with_metadata_async() -> None: store = UpstashVectorStore(embedding=FakeEmbeddings()) @@ -419,6 +462,7 @@ async def test_upstash_max_marginal_relevance_search_with_metadata_async() -> No ] +@pytest.mark.vcr() def test_embeddings_configurations() -> None: """ test the behavior of the vector store for different `embeddings` parameter @@ -443,10 +487,8 @@ def test_embeddings_configurations() -> None: # case 3: pass True as embedding # Upstash embeddings will be used store = UpstashVectorStore( - index=Index( - url=os.environ["UPSTASH_VECTOR_URL_EMBEDDING"], - token=os.environ["UPSTASH_VECTOR_TOKEN_EMBEDDING"], - ), + index_url=os.environ["UPSTASH_VECTOR_URL_EMBEDDING"], + index_token=os.environ["UPSTASH_VECTOR_TOKEN_EMBEDDING"], embedding=True, ) embedding = store._embed_query("query") @@ -455,12 +497,11 @@ def test_embeddings_configurations() -> None: assert embedding == ["doc1", "doc2"] +@pytest.mark.vcr() def test_embedding_index() -> None: store = UpstashVectorStore( - index=Index( - url=os.environ["UPSTASH_VECTOR_URL_EMBEDDING"], - token=os.environ["UPSTASH_VECTOR_TOKEN_EMBEDDING"], - ), + index_url=os.environ["UPSTASH_VECTOR_URL_EMBEDDING"], + index_token=os.environ["UPSTASH_VECTOR_TOKEN_EMBEDDING"], embedding=True, ) @@ -499,6 +540,7 @@ def test_embedding_index() -> None: ) +@pytest.mark.vcr() @pytest.mark.asyncio async def test_embedding_index_async() -> None: store = UpstashVectorStore(