Skip to content

Commit 4a13f5b

Browse files
committed
Update for the URL type changes
1 parent 453921d commit 4a13f5b

21 files changed

+71
-32
lines changed

src/llama_stack_client/resources/datasets.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
async_to_streamed_response_wrapper,
2323
)
2424
from .._base_client import make_request_options
25+
from ..types.shared_params.url import URL
2526
from ..types.dataset_list_response import DatasetListResponse
2627
from ..types.shared_params.param_type import ParamType
2728
from ..types.dataset_retrieve_response import DatasetRetrieveResponse
@@ -126,7 +127,7 @@ def register(
126127
*,
127128
dataset_id: str,
128129
dataset_schema: Dict[str, ParamType],
129-
url: str,
130+
url: URL,
130131
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
131132
provider_dataset_id: str | NotGiven = NOT_GIVEN,
132133
provider_id: str | NotGiven = NOT_GIVEN,
@@ -308,7 +309,7 @@ async def register(
308309
*,
309310
dataset_id: str,
310311
dataset_schema: Dict[str, ParamType],
311-
url: str,
312+
url: URL,
312313
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
313314
provider_dataset_id: str | NotGiven = NOT_GIVEN,
314315
provider_id: str | NotGiven = NOT_GIVEN,

src/llama_stack_client/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .model import Model as Model
77
from .trace import Trace as Trace
88
from .shared import (
9+
URL as URL,
910
ToolCall as ToolCall,
1011
ParamType as ParamType,
1112
Attachment as Attachment,

src/llama_stack_client/types/dataset_list_response.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing_extensions import Literal
55

66
from .._models import BaseModel
7+
from .shared.url import URL
78
from .shared.param_type import ParamType
89

910
__all__ = ["DatasetListResponse"]
@@ -22,4 +23,4 @@ class DatasetListResponse(BaseModel):
2223

2324
type: Literal["dataset"]
2425

25-
url: str
26+
url: URL

src/llama_stack_client/types/dataset_register_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from typing_extensions import Required, Annotated, TypedDict
77

88
from .._utils import PropertyInfo
9+
from .shared_params.url import URL
910
from .shared_params.param_type import ParamType
1011

1112
__all__ = ["DatasetRegisterParams"]
@@ -16,7 +17,7 @@ class DatasetRegisterParams(TypedDict, total=False):
1617

1718
dataset_schema: Required[Dict[str, ParamType]]
1819

19-
url: Required[str]
20+
url: Required[URL]
2021

2122
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
2223

src/llama_stack_client/types/dataset_retrieve_response.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing_extensions import Literal
55

66
from .._models import BaseModel
7+
from .shared.url import URL
78
from .shared.param_type import ParamType
89

910
__all__ = ["DatasetRetrieveResponse"]
@@ -22,4 +23,4 @@ class DatasetRetrieveResponse(BaseModel):
2223

2324
type: Literal["dataset"]
2425

25-
url: str
26+
url: URL

src/llama_stack_client/types/memory_insert_params.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
77

88
from .._utils import PropertyInfo
9+
from .shared_params.url import URL
910
from .shared_params.interleaved_content_item import InterleavedContentItem
1011

1112
__all__ = [
@@ -32,7 +33,7 @@ class DocumentContentImageContentItem(TypedDict, total=False):
3233

3334
data: str
3435

35-
url: str
36+
url: URL
3637

3738

3839
class DocumentContentTextContentItem(TypedDict, total=False):
@@ -42,7 +43,7 @@ class DocumentContentTextContentItem(TypedDict, total=False):
4243

4344

4445
DocumentContent: TypeAlias = Union[
45-
str, DocumentContentImageContentItem, DocumentContentTextContentItem, Iterable[InterleavedContentItem]
46+
str, DocumentContentImageContentItem, DocumentContentTextContentItem, Iterable[InterleavedContentItem], URL
4647
]
4748

4849

src/llama_stack_client/types/shared/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .url import URL as URL
34
from .tool_call import ToolCall as ToolCall
45
from .attachment import Attachment as Attachment
56
from .param_type import ParamType as ParamType

src/llama_stack_client/types/shared/attachment.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import List, Union, Optional
44
from typing_extensions import Literal, TypeAlias
55

6+
from .url import URL
67
from ..._models import BaseModel
78
from .interleaved_content_item import InterleavedContentItem
89

@@ -14,7 +15,7 @@ class ContentImageContentItem(BaseModel):
1415

1516
data: Optional[str] = None
1617

17-
url: Optional[str] = None
18+
url: Optional[URL] = None
1819

1920

2021
class ContentTextContentItem(BaseModel):
@@ -23,7 +24,7 @@ class ContentTextContentItem(BaseModel):
2324
type: Literal["text"]
2425

2526

26-
Content: TypeAlias = Union[str, ContentImageContentItem, ContentTextContentItem, List[InterleavedContentItem]]
27+
Content: TypeAlias = Union[str, ContentImageContentItem, ContentTextContentItem, List[InterleavedContentItem], URL]
2728

2829

2930
class Attachment(BaseModel):

src/llama_stack_client/types/shared/interleaved_content.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import List, Union, Optional
44
from typing_extensions import Literal, TypeAlias
55

6+
from .url import URL
67
from ..._models import BaseModel
78
from .interleaved_content_item import InterleavedContentItem
89

@@ -14,7 +15,7 @@ class ImageContentItem(BaseModel):
1415

1516
data: Optional[str] = None
1617

17-
url: Optional[str] = None
18+
url: Optional[URL] = None
1819

1920

2021
class TextContentItem(BaseModel):

src/llama_stack_client/types/shared/interleaved_content_item.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Union, Optional
44
from typing_extensions import Literal, TypeAlias
55

6+
from .url import URL
67
from ..._models import BaseModel
78

89
__all__ = ["InterleavedContentItem", "ImageContentItem", "TextContentItem"]
@@ -13,7 +14,7 @@ class ImageContentItem(BaseModel):
1314

1415
data: Optional[str] = None
1516

16-
url: Optional[str] = None
17+
url: Optional[URL] = None
1718

1819

1920
class TextContentItem(BaseModel):

0 commit comments

Comments
 (0)