|
31 | 31 | ) |
32 | 32 |
|
33 | 33 | if TYPE_CHECKING: |
34 | | - from .resources import agents, models, regions, api_keys, providers, indexing_jobs, knowledge_bases |
| 34 | + from .resources import chat, agents, models, regions, api_keys, providers, indexing_jobs, knowledge_bases |
35 | 35 | from .resources.models import ModelsResource, AsyncModelsResource |
36 | 36 | from .resources.regions import RegionsResource, AsyncRegionsResource |
| 37 | + from .resources.chat.chat import ChatResource, AsyncChatResource |
37 | 38 | from .resources.agents.agents import AgentsResource, AsyncAgentsResource |
38 | 39 | from .resources.indexing_jobs import IndexingJobsResource, AsyncIndexingJobsResource |
39 | 40 | from .resources.api_keys.api_keys import APIKeysResource, AsyncAPIKeysResource |
@@ -144,6 +145,12 @@ def api_keys(self) -> APIKeysResource: |
144 | 145 |
|
145 | 146 | return APIKeysResource(self) |
146 | 147 |
|
| 148 | + @cached_property |
| 149 | + def chat(self) -> ChatResource: |
| 150 | + from .resources.chat import ChatResource |
| 151 | + |
| 152 | + return ChatResource(self) |
| 153 | + |
147 | 154 | @cached_property |
148 | 155 | def models(self) -> ModelsResource: |
149 | 156 | from .resources.models import ModelsResource |
@@ -357,6 +364,12 @@ def api_keys(self) -> AsyncAPIKeysResource: |
357 | 364 |
|
358 | 365 | return AsyncAPIKeysResource(self) |
359 | 366 |
|
| 367 | + @cached_property |
| 368 | + def chat(self) -> AsyncChatResource: |
| 369 | + from .resources.chat import AsyncChatResource |
| 370 | + |
| 371 | + return AsyncChatResource(self) |
| 372 | + |
360 | 373 | @cached_property |
361 | 374 | def models(self) -> AsyncModelsResource: |
362 | 375 | from .resources.models import AsyncModelsResource |
@@ -520,6 +533,12 @@ def api_keys(self) -> api_keys.APIKeysResourceWithRawResponse: |
520 | 533 |
|
521 | 534 | return APIKeysResourceWithRawResponse(self._client.api_keys) |
522 | 535 |
|
| 536 | + @cached_property |
| 537 | + def chat(self) -> chat.ChatResourceWithRawResponse: |
| 538 | + from .resources.chat import ChatResourceWithRawResponse |
| 539 | + |
| 540 | + return ChatResourceWithRawResponse(self._client.chat) |
| 541 | + |
523 | 542 | @cached_property |
524 | 543 | def models(self) -> models.ModelsResourceWithRawResponse: |
525 | 544 | from .resources.models import ModelsResourceWithRawResponse |
@@ -569,6 +588,12 @@ def api_keys(self) -> api_keys.AsyncAPIKeysResourceWithRawResponse: |
569 | 588 |
|
570 | 589 | return AsyncAPIKeysResourceWithRawResponse(self._client.api_keys) |
571 | 590 |
|
| 591 | + @cached_property |
| 592 | + def chat(self) -> chat.AsyncChatResourceWithRawResponse: |
| 593 | + from .resources.chat import AsyncChatResourceWithRawResponse |
| 594 | + |
| 595 | + return AsyncChatResourceWithRawResponse(self._client.chat) |
| 596 | + |
572 | 597 | @cached_property |
573 | 598 | def models(self) -> models.AsyncModelsResourceWithRawResponse: |
574 | 599 | from .resources.models import AsyncModelsResourceWithRawResponse |
@@ -618,6 +643,12 @@ def api_keys(self) -> api_keys.APIKeysResourceWithStreamingResponse: |
618 | 643 |
|
619 | 644 | return APIKeysResourceWithStreamingResponse(self._client.api_keys) |
620 | 645 |
|
| 646 | + @cached_property |
| 647 | + def chat(self) -> chat.ChatResourceWithStreamingResponse: |
| 648 | + from .resources.chat import ChatResourceWithStreamingResponse |
| 649 | + |
| 650 | + return ChatResourceWithStreamingResponse(self._client.chat) |
| 651 | + |
621 | 652 | @cached_property |
622 | 653 | def models(self) -> models.ModelsResourceWithStreamingResponse: |
623 | 654 | from .resources.models import ModelsResourceWithStreamingResponse |
@@ -667,6 +698,12 @@ def api_keys(self) -> api_keys.AsyncAPIKeysResourceWithStreamingResponse: |
667 | 698 |
|
668 | 699 | return AsyncAPIKeysResourceWithStreamingResponse(self._client.api_keys) |
669 | 700 |
|
| 701 | + @cached_property |
| 702 | + def chat(self) -> chat.AsyncChatResourceWithStreamingResponse: |
| 703 | + from .resources.chat import AsyncChatResourceWithStreamingResponse |
| 704 | + |
| 705 | + return AsyncChatResourceWithStreamingResponse(self._client.chat) |
| 706 | + |
670 | 707 | @cached_property |
671 | 708 | def models(self) -> models.AsyncModelsResourceWithStreamingResponse: |
672 | 709 | from .resources.models import AsyncModelsResourceWithStreamingResponse |
|
0 commit comments