Skip to content

Commit b8371ef

Browse files
authored
regenerate clients after re-naming (#5)
1 parent f30cd3e commit b8371ef

File tree

131 files changed

+6269
-1515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+6269
-1515
lines changed

src/examples/notebooks/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pdf

src/examples/notebooks/vectorize.ipynb

Lines changed: 106 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
},
88
"kernelspec": {
99
"name": "python3",
10-
"display_name": "Python 3"
10+
"display_name": "Python 3 (ipykernel)",
11+
"language": "python"
1112
},
1213
"language_info": {
1314
"name": "python"
@@ -34,25 +35,32 @@
3435
"colab": {
3536
"base_uri": "https://localhost:8080/"
3637
},
37-
"outputId": "06daf601-2ed5-45f2-b3cb-9c5d8ba85654"
38+
"outputId": "06daf601-2ed5-45f2-b3cb-9c5d8ba85654",
39+
"ExecuteTime": {
40+
"end_time": "2025-03-06T17:01:18.767327Z",
41+
"start_time": "2025-03-06T17:01:18.083827Z"
42+
}
3843
},
39-
"execution_count": 3,
4044
"outputs": [
4145
{
42-
"output_type": "stream",
4346
"name": "stdout",
47+
"output_type": "stream",
4448
"text": [
45-
"Requirement already satisfied: vectorize-client in /usr/local/lib/python3.11/dist-packages (0.1.2)\n",
46-
"Requirement already satisfied: pydantic>=2 in /usr/local/lib/python3.11/dist-packages (from vectorize-client) (2.10.6)\n",
47-
"Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/dist-packages (from vectorize-client) (2.8.2)\n",
48-
"Requirement already satisfied: typing-extensions>=4.7.1 in /usr/local/lib/python3.11/dist-packages (from vectorize-client) (4.12.2)\n",
49-
"Requirement already satisfied: urllib3<3.0.0,>=1.25.3 in /usr/local/lib/python3.11/dist-packages (from vectorize-client) (2.3.0)\n",
50-
"Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic>=2->vectorize-client) (0.7.0)\n",
51-
"Requirement already satisfied: pydantic-core==2.27.2 in /usr/local/lib/python3.11/dist-packages (from pydantic>=2->vectorize-client) (2.27.2)\n",
52-
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/dist-packages (from python-dateutil>=2.8.2->vectorize-client) (1.17.0)\n"
49+
"Requirement already satisfied: vectorize-client in /Users/nicoloboschi/dev/vectorize-client-generator/tests/python/.venv/lib/python3.11/site-packages (1.0.0)\r\n",
50+
"Requirement already satisfied: urllib3<3.0.0,>=1.25.3 in /Users/nicoloboschi/dev/vectorize-client-generator/tests/python/.venv/lib/python3.11/site-packages (from vectorize-client) (2.3.0)\r\n",
51+
"Requirement already satisfied: python-dateutil>=2.8.2 in /Users/nicoloboschi/dev/vectorize-client-generator/tests/python/.venv/lib/python3.11/site-packages (from vectorize-client) (2.9.0.post0)\r\n",
52+
"Requirement already satisfied: pydantic>=2 in /Users/nicoloboschi/dev/vectorize-client-generator/tests/python/.venv/lib/python3.11/site-packages (from vectorize-client) (2.10.6)\r\n",
53+
"Requirement already satisfied: typing-extensions>=4.7.1 in /Users/nicoloboschi/dev/vectorize-client-generator/tests/python/.venv/lib/python3.11/site-packages (from vectorize-client) (4.12.2)\r\n",
54+
"Requirement already satisfied: annotated-types>=0.6.0 in /Users/nicoloboschi/dev/vectorize-client-generator/tests/python/.venv/lib/python3.11/site-packages (from pydantic>=2->vectorize-client) (0.7.0)\r\n",
55+
"Requirement already satisfied: pydantic-core==2.27.2 in /Users/nicoloboschi/dev/vectorize-client-generator/tests/python/.venv/lib/python3.11/site-packages (from pydantic>=2->vectorize-client) (2.27.2)\r\n",
56+
"Requirement already satisfied: six>=1.5 in /Users/nicoloboschi/dev/vectorize-client-generator/tests/python/.venv/lib/python3.11/site-packages (from python-dateutil>=2.8.2->vectorize-client) (1.17.0)\r\n",
57+
"\r\n",
58+
"\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip is available: \u001B[0m\u001B[31;49m24.3.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m25.0.1\u001B[0m\r\n",
59+
"\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\r\n"
5360
]
5461
}
55-
]
62+
],
63+
"execution_count": 2
5664
},
5765
{
5866
"cell_type": "code",
@@ -66,27 +74,22 @@
6674
"base_uri": "https://localhost:8080/"
6775
},
6876
"id": "Wtp1hi4Reh8q",
69-
"outputId": "39503ec7-e8ca-4ff3-bf3b-ba80fff2af0b"
70-
},
71-
"execution_count": 6,
72-
"outputs": [
73-
{
74-
"name": "stdout",
75-
"output_type": "stream",
76-
"text": [
77-
"Vectorize Organization ID:582893ba-291c-4ec7-a6ee-e85c26888817\n",
78-
"Vectorize Token:··········\n"
79-
]
77+
"outputId": "39503ec7-e8ca-4ff3-bf3b-ba80fff2af0b",
78+
"ExecuteTime": {
79+
"end_time": "2025-03-06T17:02:02.626216Z",
80+
"start_time": "2025-03-06T17:01:29.119649Z"
8081
}
81-
]
82+
},
83+
"outputs": [],
84+
"execution_count": 3
8285
},
8386
{
8487
"cell_type": "code",
8588
"source": [
8689
"import vectorize_client as v\n",
8790
"\n",
8891
"\n",
89-
"api = v.ApiClient(v.Configuration(access_token=token))\n",
92+
"api = v.ApiClient(v.Configuration(access_token=token, host=\"http://localhost:3000/api\"), \"x-lambda-api-key\", token)\n",
9093
"pipelines = v.PipelinesApi(api)\n",
9194
"\n",
9295
"response = pipelines.get_pipelines(org)\n",
@@ -98,30 +101,56 @@
98101
"colab": {
99102
"base_uri": "https://localhost:8080/"
100103
},
101-
"outputId": "694382e2-27e4-42c2-9da0-304ce9b588ce"
104+
"outputId": "694382e2-27e4-42c2-9da0-304ce9b588ce",
105+
"ExecuteTime": {
106+
"end_time": "2025-03-06T17:09:50.998069Z",
107+
"start_time": "2025-03-06T17:09:32.057335Z"
108+
}
102109
},
103-
"execution_count": 13,
104110
"outputs": [
105111
{
106-
"output_type": "stream",
107112
"name": "stdout",
113+
"output_type": "stream",
108114
"text": [
109115
"Pipeline: My Pipeline From API\n",
110-
"Pipeline: from api\n",
116+
"Pipeline: Test pipeline\n",
111117
"Pipeline: Test pipeline\n",
112118
"Pipeline: Test pipeline\n"
113119
]
114120
}
115-
]
121+
],
122+
"execution_count": 9
116123
},
117124
{
118125
"cell_type": "code",
119126
"source": "!wget -O apple.pdf https://www.apple.com/newsroom/pdfs/fy2024-q1/FY24_Q1_Consolidated_Financial_Statements.pdf ",
120127
"metadata": {
121-
"id": "sb43XYA1mEfN"
128+
"id": "sb43XYA1mEfN",
129+
"ExecuteTime": {
130+
"end_time": "2025-03-06T17:12:57.720738Z",
131+
"start_time": "2025-03-06T17:12:52.794818Z"
132+
}
122133
},
123-
"execution_count": 25,
124-
"outputs": []
134+
"outputs": [
135+
{
136+
"name": "stdout",
137+
"output_type": "stream",
138+
"text": [
139+
"--2025-03-06 18:12:53-- https://www.apple.com/newsroom/pdfs/fy2024-q1/FY24_Q1_Consolidated_Financial_Statements.pdf\r\n",
140+
"Resolving www.apple.com (www.apple.com)... 23.205.48.213\r\n",
141+
"Connecting to www.apple.com (www.apple.com)|23.205.48.213|:443... connected.\r\n",
142+
"HTTP request sent, awaiting response... 200 OK\r\n",
143+
"Length: 3129308 (3.0M) [application/pdf]\r\n",
144+
"Saving to: ‘apple.pdf’\r\n",
145+
"\r\n",
146+
"apple.pdf 100%[===================>] 2.98M 778KB/s in 3.8s \r\n",
147+
"\r\n",
148+
"2025-03-06 18:12:57 (799 KB/s) - ‘apple.pdf’ saved [3129308/3129308]\r\n",
149+
"\r\n"
150+
]
151+
}
152+
],
153+
"execution_count": 12
125154
},
126155
{
127156
"cell_type": "code",
@@ -140,24 +169,25 @@
140169
"height": 35
141170
},
142171
"id": "FHuFKLufe0fi",
143-
"outputId": "5d1b887e-1925-4ff9-d44c-3479fa394575"
172+
"outputId": "5d1b887e-1925-4ff9-d44c-3479fa394575",
173+
"ExecuteTime": {
174+
"end_time": "2025-03-06T17:12:30.433445Z",
175+
"start_time": "2025-03-06T17:12:16.696363Z"
176+
}
144177
},
145-
"execution_count": 8,
146178
"outputs": [
147179
{
148-
"output_type": "execute_result",
149180
"data": {
150181
"text/plain": [
151-
"'cdfa4981-c0fa-4b1d-9fba-83845cc103f0'"
152-
],
153-
"application/vnd.google.colaboratory.intrinsic+json": {
154-
"type": "string"
155-
}
182+
"'e49a6ede-83cb-4698-b751-dd0364918c53'"
183+
]
156184
},
185+
"execution_count": 10,
157186
"metadata": {},
158-
"execution_count": 8
187+
"output_type": "execute_result"
159188
}
160-
]
189+
],
190+
"execution_count": 10
161191
},
162192
{
163193
"cell_type": "code",
@@ -190,18 +220,22 @@
190220
"base_uri": "https://localhost:8080/"
191221
},
192222
"id": "TZs5os0Ae4kb",
193-
"outputId": "3f47b11e-556b-464b-e3a4-4ebca7bfba52"
223+
"outputId": "3f47b11e-556b-464b-e3a4-4ebca7bfba52",
224+
"ExecuteTime": {
225+
"end_time": "2025-03-06T17:13:10.495588Z",
226+
"start_time": "2025-03-06T17:13:00.038846Z"
227+
}
194228
},
195-
"execution_count": 10,
196229
"outputs": [
197230
{
198-
"output_type": "stream",
199231
"name": "stdout",
232+
"output_type": "stream",
200233
"text": [
201234
"Upload successful\n"
202235
]
203236
}
204-
]
237+
],
238+
"execution_count": 13
205239
},
206240
{
207241
"cell_type": "code",
@@ -213,18 +247,27 @@
213247
"builtin_vector_db = [c.id for c in vector_databases.destination_connectors if c.type == \"VECTORIZE\"][0]"
214248
],
215249
"metadata": {
216-
"id": "3rqzxB3aeoif"
250+
"id": "3rqzxB3aeoif",
251+
"ExecuteTime": {
252+
"end_time": "2025-03-06T17:13:33.985317Z",
253+
"start_time": "2025-03-06T17:13:11.451383Z"
254+
}
217255
},
218-
"execution_count": 11,
219-
"outputs": []
256+
"outputs": [],
257+
"execution_count": 14
220258
},
221259
{
222260
"cell_type": "code",
223261
"source": [
224262
"response = pipelines.create_pipeline(org, v.PipelineConfigurationSchema(\n",
225263
" source_connectors=[v.SourceConnectorSchema(id=source_connector_id, type=\"FILE_UPLOAD\", config={})],\n",
226264
" destination_connector=v.DestinationConnectorSchema(id=builtin_vector_db, type=\"VECTORIZE\", config={}),\n",
227-
" ai_platform=v.AIPlatformSchema(id=builtin_ai_platform, type=\"VECTORIZE\", config={}),\n",
265+
" ai_platform=v.AIPlatformSchema(id=builtin_ai_platform, type=\"VECTORIZE\", config={\n",
266+
" \"chunkSize\": 600,\n",
267+
" \"chunkingStrategy\": \"FIXED\",\n",
268+
" \"embeddingModel\": \"VECTORIZE_OPEN_AI_TEXT_EMBEDDING_3_LARGE\",\n",
269+
" #\"extractionStrategy\": \"MIXED\"\n",
270+
" }),\n",
228271
" pipeline_name=\"My Pipeline From API\",\n",
229272
" schedule=v.ScheduleSchema(type=\"manual\")\n",
230273
"))\n",
@@ -237,24 +280,25 @@
237280
"height": 35
238281
},
239282
"id": "59b9VSaykDSh",
240-
"outputId": "f43499ce-08e3-4f23-c502-cead17f2e1c0"
283+
"outputId": "f43499ce-08e3-4f23-c502-cead17f2e1c0",
284+
"ExecuteTime": {
285+
"end_time": "2025-03-06T17:25:59.003091Z",
286+
"start_time": "2025-03-06T17:25:29.022232Z"
287+
}
241288
},
242-
"execution_count": 12,
243289
"outputs": [
244290
{
245-
"output_type": "execute_result",
246291
"data": {
247292
"text/plain": [
248-
"'aipf9ab5-702c-40de-a2f7-8a2139129ba5'"
249-
],
250-
"application/vnd.google.colaboratory.intrinsic+json": {
251-
"type": "string"
252-
}
293+
"'aipea5dd-bfa6-4e78-9211-019f65e106d2'"
294+
]
253295
},
296+
"execution_count": 21,
254297
"metadata": {},
255-
"execution_count": 12
298+
"output_type": "execute_result"
256299
}
257-
]
300+
],
301+
"execution_count": 21
258302
},
259303
{
260304
"cell_type": "code",
@@ -786,24 +830,6 @@
786830
]
787831
}
788832
]
789-
},
790-
{
791-
"cell_type": "code",
792-
"source": [],
793-
"metadata": {
794-
"id": "hCLlbeZ3lprg"
795-
},
796-
"execution_count": null,
797-
"outputs": []
798-
},
799-
{
800-
"cell_type": "code",
801-
"source": [],
802-
"metadata": {
803-
"id": "GAbtIAv8lFdB"
804-
},
805-
"execution_count": null,
806-
"outputs": []
807833
}
808834
]
809835
}

src/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "vectorize-client"
3-
version = "0.1.2"
3+
version = "1.0.0"
44
description = "Python client for the Vectorize API"
55
authors = [ "Vectorize <[email protected]>" ]
66
license = "MIT"

0 commit comments

Comments
 (0)