@@ -119,6 +119,12 @@ def __init__(
119119
120120 self ._default_stream_cls = Stream
121121
122+ @cached_property
123+ def chat (self ) -> ChatResource :
124+ from .resources .chat import ChatResource
125+
126+ return ChatResource (self )
127+
122128 @cached_property
123129 def agents (self ) -> AgentsResource :
124130 from .resources .agents import AgentsResource
@@ -143,12 +149,6 @@ def knowledge_bases(self) -> KnowledgeBasesResource:
143149
144150 return KnowledgeBasesResource (self )
145151
146- @cached_property
147- def chat (self ) -> ChatResource :
148- from .resources .chat import ChatResource
149-
150- return ChatResource (self )
151-
152152 @cached_property
153153 def inference (self ) -> InferenceResource :
154154 from .resources .inference import InferenceResource
@@ -359,6 +359,12 @@ def __init__(
359359
360360 self ._default_stream_cls = AsyncStream
361361
362+ @cached_property
363+ def chat (self ) -> AsyncChatResource :
364+ from .resources .chat import AsyncChatResource
365+
366+ return AsyncChatResource (self )
367+
362368 @cached_property
363369 def agents (self ) -> AsyncAgentsResource :
364370 from .resources .agents import AsyncAgentsResource
@@ -383,12 +389,6 @@ def knowledge_bases(self) -> AsyncKnowledgeBasesResource:
383389
384390 return AsyncKnowledgeBasesResource (self )
385391
386- @cached_property
387- def chat (self ) -> AsyncChatResource :
388- from .resources .chat import AsyncChatResource
389-
390- return AsyncChatResource (self )
391-
392392 @cached_property
393393 def inference (self ) -> AsyncInferenceResource :
394394 from .resources .inference import AsyncInferenceResource
@@ -539,6 +539,12 @@ class GradientAIWithRawResponse:
539539 def __init__ (self , client : GradientAI ) -> None :
540540 self ._client = client
541541
542+ @cached_property
543+ def chat (self ) -> chat .ChatResourceWithRawResponse :
544+ from .resources .chat import ChatResourceWithRawResponse
545+
546+ return ChatResourceWithRawResponse (self ._client .chat )
547+
542548 @cached_property
543549 def agents (self ) -> agents .AgentsResourceWithRawResponse :
544550 from .resources .agents import AgentsResourceWithRawResponse
@@ -563,12 +569,6 @@ def knowledge_bases(self) -> knowledge_bases.KnowledgeBasesResourceWithRawRespon
563569
564570 return KnowledgeBasesResourceWithRawResponse (self ._client .knowledge_bases )
565571
566- @cached_property
567- def chat (self ) -> chat .ChatResourceWithRawResponse :
568- from .resources .chat import ChatResourceWithRawResponse
569-
570- return ChatResourceWithRawResponse (self ._client .chat )
571-
572572 @cached_property
573573 def inference (self ) -> inference .InferenceResourceWithRawResponse :
574574 from .resources .inference import InferenceResourceWithRawResponse
@@ -588,6 +588,12 @@ class AsyncGradientAIWithRawResponse:
588588 def __init__ (self , client : AsyncGradientAI ) -> None :
589589 self ._client = client
590590
591+ @cached_property
592+ def chat (self ) -> chat .AsyncChatResourceWithRawResponse :
593+ from .resources .chat import AsyncChatResourceWithRawResponse
594+
595+ return AsyncChatResourceWithRawResponse (self ._client .chat )
596+
591597 @cached_property
592598 def agents (self ) -> agents .AsyncAgentsResourceWithRawResponse :
593599 from .resources .agents import AsyncAgentsResourceWithRawResponse
@@ -612,12 +618,6 @@ def knowledge_bases(self) -> knowledge_bases.AsyncKnowledgeBasesResourceWithRawR
612618
613619 return AsyncKnowledgeBasesResourceWithRawResponse (self ._client .knowledge_bases )
614620
615- @cached_property
616- def chat (self ) -> chat .AsyncChatResourceWithRawResponse :
617- from .resources .chat import AsyncChatResourceWithRawResponse
618-
619- return AsyncChatResourceWithRawResponse (self ._client .chat )
620-
621621 @cached_property
622622 def inference (self ) -> inference .AsyncInferenceResourceWithRawResponse :
623623 from .resources .inference import AsyncInferenceResourceWithRawResponse
@@ -637,6 +637,12 @@ class GradientAIWithStreamedResponse:
637637 def __init__ (self , client : GradientAI ) -> None :
638638 self ._client = client
639639
640+ @cached_property
641+ def chat (self ) -> chat .ChatResourceWithStreamingResponse :
642+ from .resources .chat import ChatResourceWithStreamingResponse
643+
644+ return ChatResourceWithStreamingResponse (self ._client .chat )
645+
640646 @cached_property
641647 def agents (self ) -> agents .AgentsResourceWithStreamingResponse :
642648 from .resources .agents import AgentsResourceWithStreamingResponse
@@ -661,12 +667,6 @@ def knowledge_bases(self) -> knowledge_bases.KnowledgeBasesResourceWithStreaming
661667
662668 return KnowledgeBasesResourceWithStreamingResponse (self ._client .knowledge_bases )
663669
664- @cached_property
665- def chat (self ) -> chat .ChatResourceWithStreamingResponse :
666- from .resources .chat import ChatResourceWithStreamingResponse
667-
668- return ChatResourceWithStreamingResponse (self ._client .chat )
669-
670670 @cached_property
671671 def inference (self ) -> inference .InferenceResourceWithStreamingResponse :
672672 from .resources .inference import InferenceResourceWithStreamingResponse
@@ -686,6 +686,12 @@ class AsyncGradientAIWithStreamedResponse:
686686 def __init__ (self , client : AsyncGradientAI ) -> None :
687687 self ._client = client
688688
689+ @cached_property
690+ def chat (self ) -> chat .AsyncChatResourceWithStreamingResponse :
691+ from .resources .chat import AsyncChatResourceWithStreamingResponse
692+
693+ return AsyncChatResourceWithStreamingResponse (self ._client .chat )
694+
689695 @cached_property
690696 def agents (self ) -> agents .AsyncAgentsResourceWithStreamingResponse :
691697 from .resources .agents import AsyncAgentsResourceWithStreamingResponse
@@ -710,12 +716,6 @@ def knowledge_bases(self) -> knowledge_bases.AsyncKnowledgeBasesResourceWithStre
710716
711717 return AsyncKnowledgeBasesResourceWithStreamingResponse (self ._client .knowledge_bases )
712718
713- @cached_property
714- def chat (self ) -> chat .AsyncChatResourceWithStreamingResponse :
715- from .resources .chat import AsyncChatResourceWithStreamingResponse
716-
717- return AsyncChatResourceWithStreamingResponse (self ._client .chat )
718-
719719 @cached_property
720720 def inference (self ) -> inference .AsyncInferenceResourceWithStreamingResponse :
721721 from .resources .inference import AsyncInferenceResourceWithStreamingResponse
0 commit comments