Skip to content

Commit

Permalink
Remvoe endpoints from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vhaldemar committed Nov 1, 2024
1 parent ee59597 commit 2d4c844
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 80 deletions.
9 changes: 1 addition & 8 deletions examples/async/assistants/assistant_with_search_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ def local_path(path: str) -> pathlib.Path:


async def main() -> None:
sdk = AsyncYCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-assistants': 'assistant.api.cloud.yandex.net',
'ai-files': 'assistant.api.cloud.yandex.net',
'operation': 'assistant.api.cloud.yandex.net',
}
)
sdk = AsyncYCloudML(folder_id='b1ghsjum2v37c2un8h64')

file_coros = (
sdk.files.upload(
Expand Down
7 changes: 1 addition & 6 deletions examples/async/assistants/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@


async def main() -> None:
sdk = AsyncYCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-assistants': 'assistant.api.cloud.yandex.net'
}
)
sdk = AsyncYCloudML(folder_id='b1ghsjum2v37c2un8h64')

assistant = await sdk.assistants.create(
'yandexgpt',
Expand Down
7 changes: 1 addition & 6 deletions examples/async/assistants/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@


async def main() -> None:
sdk = AsyncYCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-files': 'assistant.api.cloud.yandex.net'
}
)
sdk = AsyncYCloudML(folder_id='b1ghsjum2v37c2un8h64')

path = pathlib.Path(__file__).parent / 'example_file'
file = await sdk.files.upload(path, ttl_days=5, expiration_policy="static")
Expand Down
7 changes: 1 addition & 6 deletions examples/async/assistants/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@


async def main() -> None:
sdk = AsyncYCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-assistants': 'assistant.api.cloud.yandex.net'
}
)
sdk = AsyncYCloudML(folder_id='b1ghsjum2v37c2un8h64')

assistant = await sdk.assistants.create(
'yandexgpt',
Expand Down
9 changes: 1 addition & 8 deletions examples/async/assistants/search_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,7 @@ def local_path(path: str) -> pathlib.Path:


async def main() -> None:
sdk = AsyncYCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-files': 'assistant.api.cloud.yandex.net',
'ai-assistants': 'assistant.api.cloud.yandex.net',
'operation': 'assistant.api.cloud.yandex.net',
}
)
sdk = AsyncYCloudML(folder_id='b1ghsjum2v37c2un8h64')

file_coros = (
sdk.files.upload(
Expand Down
7 changes: 1 addition & 6 deletions examples/async/assistants/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@


async def main() -> None:
sdk = AsyncYCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-assistants': 'assistant.api.cloud.yandex.net'
}
)
sdk = AsyncYCloudML(folder_id='b1ghsjum2v37c2un8h64')

thread = await sdk.threads.create(name='foo', ttl_days=5, expiration_policy="static")
print(f"new {thread=}")
Expand Down
9 changes: 1 addition & 8 deletions examples/sync/assistants/assistant_with_search_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ def local_path(path: str) -> pathlib.Path:


def main() -> None:
sdk = YCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-assistants': 'assistant.api.cloud.yandex.net',
'ai-files': 'assistant.api.cloud.yandex.net',
'operation': 'assistant.api.cloud.yandex.net',
}
)
sdk = YCloudML(folder_id='b1ghsjum2v37c2un8h64')

files = []
for path in ['turkey_example.txt', 'maldives_example.txt']:
Expand Down
7 changes: 1 addition & 6 deletions examples/sync/assistants/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@


def main() -> None:
sdk = YCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-assistants': 'assistant.api.cloud.yandex.net'
}
)
sdk = YCloudML(folder_id='b1ghsjum2v37c2un8h64')

assistant = sdk.assistants.create(
'yandexgpt',
Expand Down
7 changes: 1 addition & 6 deletions examples/sync/assistants/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@


def main() -> None:
sdk = YCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-files': 'assistant.api.cloud.yandex.net'
}
)
sdk = YCloudML(folder_id='b1ghsjum2v37c2un8h64')

path = pathlib.Path(__file__).parent / 'example_file'
file = sdk.files.upload(path, ttl_days=5, expiration_policy="static")
Expand Down
7 changes: 1 addition & 6 deletions examples/sync/assistants/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@


def main() -> None:
sdk = YCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-assistants': 'assistant.api.cloud.yandex.net'
}
)
sdk = YCloudML(folder_id='b1ghsjum2v37c2un8h64')

assistant = sdk.assistants.create(
'yandexgpt',
Expand Down
9 changes: 1 addition & 8 deletions examples/sync/assistants/search_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ def local_path(path: str) -> pathlib.Path:


def main() -> None:
sdk = YCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-files': 'assistant.api.cloud.yandex.net',
'ai-assistants': 'assistant.api.cloud.yandex.net',
'operation': 'assistant.api.cloud.yandex.net',
}
)
sdk = YCloudML(folder_id='b1ghsjum2v37c2un8h64')

files = []
for path in ['turkey_example.txt', 'maldives_example.txt']:
Expand Down
7 changes: 1 addition & 6 deletions examples/sync/assistants/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@


def main() -> None:
sdk = YCloudML(
folder_id='b1ghsjum2v37c2un8h64',
service_map={
'ai-assistants': 'assistant.api.cloud.yandex.net'
}
)
sdk = YCloudML(folder_id='b1ghsjum2v37c2un8h64')

thread = sdk.threads.create(name='foo', ttl_days=5, expiration_policy="static")
print(f"new {thread=}")
Expand Down

0 comments on commit 2d4c844

Please sign in to comment.