Skip to content

Commit ee323a0

Browse files
feat(api): SDKs for vector store file batches
1 parent 14c4e85 commit ee323a0

File tree

10 files changed

+6
-554
lines changed

10 files changed

+6
-554
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 105
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-d7bea816190382a93511491e33d1f37f707620926ab133ae8ce0883d763df741.yml
3-
openapi_spec_hash: f73b3af77108625edae3f25972b9e665
4-
config_hash: 548f336ac1b68ab1dfe385b79df764dd
1+
configured_endpoints: 102
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-3c569913f686c852ab392d470b9d905cc944d5a46a2324a21aa1376fb24e6714.yml
3+
openapi_spec_hash: 455f397c5f401ea425a4064bb39c6801
4+
config_hash: 53c09ba1fdae5045de1860c479a51dc7

api.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,7 @@ Methods:
351351
Types:
352352

353353
```python
354-
from llama_stack_client.types.vector_stores import (
355-
VectorStoreFile,
356-
FileDeleteResponse,
357-
FileContentResponse,
358-
)
354+
from llama_stack_client.types.vector_stores import VectorStoreFile, FileDeleteResponse
359355
```
360356

361357
Methods:
@@ -365,7 +361,6 @@ Methods:
365361
- <code title="post /v1/vector_stores/{vector_store_id}/files/{file_id}">client.vector_stores.files.<a href="./src/llama_stack_client/resources/vector_stores/files.py">update</a>(file_id, \*, vector_store_id, \*\*<a href="src/llama_stack_client/types/vector_stores/file_update_params.py">params</a>) -> <a href="./src/llama_stack_client/types/vector_stores/vector_store_file.py">VectorStoreFile</a></code>
366362
- <code title="get /v1/vector_stores/{vector_store_id}/files">client.vector_stores.files.<a href="./src/llama_stack_client/resources/vector_stores/files.py">list</a>(vector_store_id, \*\*<a href="src/llama_stack_client/types/vector_stores/file_list_params.py">params</a>) -> <a href="./src/llama_stack_client/types/vector_stores/vector_store_file.py">SyncOpenAICursorPage[VectorStoreFile]</a></code>
367363
- <code title="delete /v1/vector_stores/{vector_store_id}/files/{file_id}">client.vector_stores.files.<a href="./src/llama_stack_client/resources/vector_stores/files.py">delete</a>(file_id, \*, vector_store_id) -> <a href="./src/llama_stack_client/types/vector_stores/file_delete_response.py">FileDeleteResponse</a></code>
368-
- <code title="get /v1/vector_stores/{vector_store_id}/files/{file_id}/content">client.vector_stores.files.<a href="./src/llama_stack_client/resources/vector_stores/files.py">content</a>(file_id, \*, vector_store_id) -> <a href="./src/llama_stack_client/types/vector_stores/file_content_response.py">FileContentResponse</a></code>
369364

370365
# Models
371366

@@ -589,7 +584,5 @@ from llama_stack_client.types import DeleteFileResponse, File, ListFilesResponse
589584
Methods:
590585

591586
- <code title="post /v1/files">client.files.<a href="./src/llama_stack_client/resources/files.py">create</a>(\*\*<a href="src/llama_stack_client/types/file_create_params.py">params</a>) -> <a href="./src/llama_stack_client/types/file.py">File</a></code>
592-
- <code title="get /v1/files/{file_id}">client.files.<a href="./src/llama_stack_client/resources/files.py">retrieve</a>(file_id) -> <a href="./src/llama_stack_client/types/file.py">File</a></code>
593587
- <code title="get /v1/files">client.files.<a href="./src/llama_stack_client/resources/files.py">list</a>(\*\*<a href="src/llama_stack_client/types/file_list_params.py">params</a>) -> <a href="./src/llama_stack_client/types/file.py">SyncOpenAICursorPage[File]</a></code>
594-
- <code title="delete /v1/files/{file_id}">client.files.<a href="./src/llama_stack_client/resources/files.py">delete</a>(file_id) -> <a href="./src/llama_stack_client/types/delete_file_response.py">DeleteFileResponse</a></code>
595588
- <code title="get /v1/files/{file_id}/content">client.files.<a href="./src/llama_stack_client/resources/files.py">content</a>(file_id) -> object</code>

src/llama_stack_client/resources/files.py

Lines changed: 0 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from ..pagination import SyncOpenAICursorPage, AsyncOpenAICursorPage
2222
from ..types.file import File
2323
from .._base_client import AsyncPaginator, make_request_options
24-
from ..types.delete_file_response import DeleteFileResponse
2524

2625
__all__ = ["FilesResource", "AsyncFilesResource"]
2726

@@ -107,39 +106,6 @@ def create(
107106
cast_to=File,
108107
)
109108

110-
def retrieve(
111-
self,
112-
file_id: str,
113-
*,
114-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
115-
# The extra values given here take precedence over values defined on the client or passed to this method.
116-
extra_headers: Headers | None = None,
117-
extra_query: Query | None = None,
118-
extra_body: Body | None = None,
119-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
120-
) -> File:
121-
"""
122-
Returns information about a specific file.
123-
124-
Args:
125-
extra_headers: Send extra headers
126-
127-
extra_query: Add additional query parameters to the request
128-
129-
extra_body: Add additional JSON properties to the request
130-
131-
timeout: Override the client-level default timeout for this request, in seconds
132-
"""
133-
if not file_id:
134-
raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
135-
return self._get(
136-
f"/v1/files/{file_id}",
137-
options=make_request_options(
138-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
139-
),
140-
cast_to=File,
141-
)
142-
143109
def list(
144110
self,
145111
*,
@@ -200,39 +166,6 @@ def list(
200166
model=File,
201167
)
202168

203-
def delete(
204-
self,
205-
file_id: str,
206-
*,
207-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
208-
# The extra values given here take precedence over values defined on the client or passed to this method.
209-
extra_headers: Headers | None = None,
210-
extra_query: Query | None = None,
211-
extra_body: Body | None = None,
212-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
213-
) -> DeleteFileResponse:
214-
"""
215-
Delete a file.
216-
217-
Args:
218-
extra_headers: Send extra headers
219-
220-
extra_query: Add additional query parameters to the request
221-
222-
extra_body: Add additional JSON properties to the request
223-
224-
timeout: Override the client-level default timeout for this request, in seconds
225-
"""
226-
if not file_id:
227-
raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
228-
return self._delete(
229-
f"/v1/files/{file_id}",
230-
options=make_request_options(
231-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
232-
),
233-
cast_to=DeleteFileResponse,
234-
)
235-
236169
def content(
237170
self,
238171
file_id: str,
@@ -348,39 +281,6 @@ async def create(
348281
cast_to=File,
349282
)
350283

351-
async def retrieve(
352-
self,
353-
file_id: str,
354-
*,
355-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
356-
# The extra values given here take precedence over values defined on the client or passed to this method.
357-
extra_headers: Headers | None = None,
358-
extra_query: Query | None = None,
359-
extra_body: Body | None = None,
360-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
361-
) -> File:
362-
"""
363-
Returns information about a specific file.
364-
365-
Args:
366-
extra_headers: Send extra headers
367-
368-
extra_query: Add additional query parameters to the request
369-
370-
extra_body: Add additional JSON properties to the request
371-
372-
timeout: Override the client-level default timeout for this request, in seconds
373-
"""
374-
if not file_id:
375-
raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
376-
return await self._get(
377-
f"/v1/files/{file_id}",
378-
options=make_request_options(
379-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
380-
),
381-
cast_to=File,
382-
)
383-
384284
def list(
385285
self,
386286
*,
@@ -441,39 +341,6 @@ def list(
441341
model=File,
442342
)
443343

444-
async def delete(
445-
self,
446-
file_id: str,
447-
*,
448-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
449-
# The extra values given here take precedence over values defined on the client or passed to this method.
450-
extra_headers: Headers | None = None,
451-
extra_query: Query | None = None,
452-
extra_body: Body | None = None,
453-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
454-
) -> DeleteFileResponse:
455-
"""
456-
Delete a file.
457-
458-
Args:
459-
extra_headers: Send extra headers
460-
461-
extra_query: Add additional query parameters to the request
462-
463-
extra_body: Add additional JSON properties to the request
464-
465-
timeout: Override the client-level default timeout for this request, in seconds
466-
"""
467-
if not file_id:
468-
raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
469-
return await self._delete(
470-
f"/v1/files/{file_id}",
471-
options=make_request_options(
472-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
473-
),
474-
cast_to=DeleteFileResponse,
475-
)
476-
477344
async def content(
478345
self,
479346
file_id: str,
@@ -515,15 +382,9 @@ def __init__(self, files: FilesResource) -> None:
515382
self.create = to_raw_response_wrapper(
516383
files.create,
517384
)
518-
self.retrieve = to_raw_response_wrapper(
519-
files.retrieve,
520-
)
521385
self.list = to_raw_response_wrapper(
522386
files.list,
523387
)
524-
self.delete = to_raw_response_wrapper(
525-
files.delete,
526-
)
527388
self.content = to_raw_response_wrapper(
528389
files.content,
529390
)
@@ -536,15 +397,9 @@ def __init__(self, files: AsyncFilesResource) -> None:
536397
self.create = async_to_raw_response_wrapper(
537398
files.create,
538399
)
539-
self.retrieve = async_to_raw_response_wrapper(
540-
files.retrieve,
541-
)
542400
self.list = async_to_raw_response_wrapper(
543401
files.list,
544402
)
545-
self.delete = async_to_raw_response_wrapper(
546-
files.delete,
547-
)
548403
self.content = async_to_raw_response_wrapper(
549404
files.content,
550405
)
@@ -557,15 +412,9 @@ def __init__(self, files: FilesResource) -> None:
557412
self.create = to_streamed_response_wrapper(
558413
files.create,
559414
)
560-
self.retrieve = to_streamed_response_wrapper(
561-
files.retrieve,
562-
)
563415
self.list = to_streamed_response_wrapper(
564416
files.list,
565417
)
566-
self.delete = to_streamed_response_wrapper(
567-
files.delete,
568-
)
569418
self.content = to_streamed_response_wrapper(
570419
files.content,
571420
)
@@ -578,15 +427,9 @@ def __init__(self, files: AsyncFilesResource) -> None:
578427
self.create = async_to_streamed_response_wrapper(
579428
files.create,
580429
)
581-
self.retrieve = async_to_streamed_response_wrapper(
582-
files.retrieve,
583-
)
584430
self.list = async_to_streamed_response_wrapper(
585431
files.list,
586432
)
587-
self.delete = async_to_streamed_response_wrapper(
588-
files.delete,
589-
)
590433
self.content = async_to_streamed_response_wrapper(
591434
files.content,
592435
)

0 commit comments

Comments
 (0)