scale-gp-beta 0.1.0a2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. scale_gp/__init__.py +96 -0
  2. scale_gp/_base_client.py +2058 -0
  3. scale_gp/_client.py +544 -0
  4. scale_gp/_compat.py +219 -0
  5. scale_gp/_constants.py +14 -0
  6. scale_gp/_exceptions.py +108 -0
  7. scale_gp/_files.py +123 -0
  8. scale_gp/_models.py +801 -0
  9. scale_gp/_qs.py +150 -0
  10. scale_gp/_resource.py +43 -0
  11. scale_gp/_response.py +830 -0
  12. scale_gp/_streaming.py +333 -0
  13. scale_gp/_types.py +217 -0
  14. scale_gp/_utils/__init__.py +57 -0
  15. scale_gp/_utils/_logs.py +25 -0
  16. scale_gp/_utils/_proxy.py +62 -0
  17. scale_gp/_utils/_reflection.py +42 -0
  18. scale_gp/_utils/_streams.py +12 -0
  19. scale_gp/_utils/_sync.py +86 -0
  20. scale_gp/_utils/_transform.py +402 -0
  21. scale_gp/_utils/_typing.py +149 -0
  22. scale_gp/_utils/_utils.py +414 -0
  23. scale_gp/_version.py +4 -0
  24. scale_gp/lib/.keep +4 -0
  25. scale_gp/pagination.py +83 -0
  26. scale_gp/py.typed +0 -0
  27. scale_gp/resources/__init__.py +103 -0
  28. scale_gp/resources/chat/__init__.py +33 -0
  29. scale_gp/resources/chat/chat.py +102 -0
  30. scale_gp/resources/chat/completions.py +1054 -0
  31. scale_gp/resources/completions.py +765 -0
  32. scale_gp/resources/files/__init__.py +33 -0
  33. scale_gp/resources/files/content.py +162 -0
  34. scale_gp/resources/files/files.py +558 -0
  35. scale_gp/resources/inference.py +210 -0
  36. scale_gp/resources/models.py +834 -0
  37. scale_gp/resources/question_sets.py +680 -0
  38. scale_gp/resources/questions.py +396 -0
  39. scale_gp/types/__init__.py +33 -0
  40. scale_gp/types/chat/__init__.py +8 -0
  41. scale_gp/types/chat/chat_completion.py +257 -0
  42. scale_gp/types/chat/chat_completion_chunk.py +240 -0
  43. scale_gp/types/chat/completion_create_params.py +156 -0
  44. scale_gp/types/chat/completion_create_response.py +11 -0
  45. scale_gp/types/completion.py +116 -0
  46. scale_gp/types/completion_create_params.py +108 -0
  47. scale_gp/types/file.py +30 -0
  48. scale_gp/types/file_create_params.py +13 -0
  49. scale_gp/types/file_delete_response.py +16 -0
  50. scale_gp/types/file_list.py +27 -0
  51. scale_gp/types/file_list_params.py +16 -0
  52. scale_gp/types/file_update_params.py +12 -0
  53. scale_gp/types/files/__init__.py +3 -0
  54. scale_gp/types/inference_create_params.py +25 -0
  55. scale_gp/types/inference_create_response.py +11 -0
  56. scale_gp/types/inference_model.py +167 -0
  57. scale_gp/types/inference_model_list.py +27 -0
  58. scale_gp/types/inference_response.py +14 -0
  59. scale_gp/types/inference_response_chunk.py +14 -0
  60. scale_gp/types/model_create_params.py +165 -0
  61. scale_gp/types/model_delete_response.py +16 -0
  62. scale_gp/types/model_list_params.py +20 -0
  63. scale_gp/types/model_update_params.py +161 -0
  64. scale_gp/types/question.py +68 -0
  65. scale_gp/types/question_create_params.py +59 -0
  66. scale_gp/types/question_list.py +27 -0
  67. scale_gp/types/question_list_params.py +16 -0
  68. scale_gp/types/question_set.py +106 -0
  69. scale_gp/types/question_set_create_params.py +115 -0
  70. scale_gp/types/question_set_delete_response.py +16 -0
  71. scale_gp/types/question_set_list.py +27 -0
  72. scale_gp/types/question_set_list_params.py +20 -0
  73. scale_gp/types/question_set_retrieve_params.py +12 -0
  74. scale_gp/types/question_set_update_params.py +23 -0
  75. scale_gp_beta-0.1.0a2.dist-info/METADATA +440 -0
  76. scale_gp_beta-0.1.0a2.dist-info/RECORD +78 -0
  77. scale_gp_beta-0.1.0a2.dist-info/WHEEL +4 -0
  78. scale_gp_beta-0.1.0a2.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,102 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..._compat import cached_property
6
+ from ..._resource import SyncAPIResource, AsyncAPIResource
7
+ from .completions import (
8
+ CompletionsResource,
9
+ AsyncCompletionsResource,
10
+ CompletionsResourceWithRawResponse,
11
+ AsyncCompletionsResourceWithRawResponse,
12
+ CompletionsResourceWithStreamingResponse,
13
+ AsyncCompletionsResourceWithStreamingResponse,
14
+ )
15
+
16
+ __all__ = ["ChatResource", "AsyncChatResource"]
17
+
18
+
19
+ class ChatResource(SyncAPIResource):
20
+ @cached_property
21
+ def completions(self) -> CompletionsResource:
22
+ return CompletionsResource(self._client)
23
+
24
+ @cached_property
25
+ def with_raw_response(self) -> ChatResourceWithRawResponse:
26
+ """
27
+ This property can be used as a prefix for any HTTP method call to return
28
+ the raw response object instead of the parsed content.
29
+
30
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
31
+ """
32
+ return ChatResourceWithRawResponse(self)
33
+
34
+ @cached_property
35
+ def with_streaming_response(self) -> ChatResourceWithStreamingResponse:
36
+ """
37
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38
+
39
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
40
+ """
41
+ return ChatResourceWithStreamingResponse(self)
42
+
43
+
44
+ class AsyncChatResource(AsyncAPIResource):
45
+ @cached_property
46
+ def completions(self) -> AsyncCompletionsResource:
47
+ return AsyncCompletionsResource(self._client)
48
+
49
+ @cached_property
50
+ def with_raw_response(self) -> AsyncChatResourceWithRawResponse:
51
+ """
52
+ This property can be used as a prefix for any HTTP method call to return
53
+ the raw response object instead of the parsed content.
54
+
55
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
56
+ """
57
+ return AsyncChatResourceWithRawResponse(self)
58
+
59
+ @cached_property
60
+ def with_streaming_response(self) -> AsyncChatResourceWithStreamingResponse:
61
+ """
62
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63
+
64
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
65
+ """
66
+ return AsyncChatResourceWithStreamingResponse(self)
67
+
68
+
69
+ class ChatResourceWithRawResponse:
70
+ def __init__(self, chat: ChatResource) -> None:
71
+ self._chat = chat
72
+
73
+ @cached_property
74
+ def completions(self) -> CompletionsResourceWithRawResponse:
75
+ return CompletionsResourceWithRawResponse(self._chat.completions)
76
+
77
+
78
+ class AsyncChatResourceWithRawResponse:
79
+ def __init__(self, chat: AsyncChatResource) -> None:
80
+ self._chat = chat
81
+
82
+ @cached_property
83
+ def completions(self) -> AsyncCompletionsResourceWithRawResponse:
84
+ return AsyncCompletionsResourceWithRawResponse(self._chat.completions)
85
+
86
+
87
+ class ChatResourceWithStreamingResponse:
88
+ def __init__(self, chat: ChatResource) -> None:
89
+ self._chat = chat
90
+
91
+ @cached_property
92
+ def completions(self) -> CompletionsResourceWithStreamingResponse:
93
+ return CompletionsResourceWithStreamingResponse(self._chat.completions)
94
+
95
+
96
+ class AsyncChatResourceWithStreamingResponse:
97
+ def __init__(self, chat: AsyncChatResource) -> None:
98
+ self._chat = chat
99
+
100
+ @cached_property
101
+ def completions(self) -> AsyncCompletionsResourceWithStreamingResponse:
102
+ return AsyncCompletionsResourceWithStreamingResponse(self._chat.completions)