c63a5cfe-b235-4fbe-8bbb-82a9e02a482a-python 0.1.0a4__py3-none-any.whl → 0.1.0a6__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 (143) hide show
  1. {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info}/METADATA +41 -16
  2. c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info/RECORD +230 -0
  3. gradientai/_client.py +73 -71
  4. gradientai/_version.py +1 -1
  5. gradientai/resources/__init__.py +14 -28
  6. gradientai/resources/agents/__init__.py +69 -13
  7. gradientai/resources/agents/agents.py +148 -20
  8. gradientai/resources/{regions → agents}/evaluation_datasets.py +3 -3
  9. gradientai/resources/agents/evaluation_metrics/__init__.py +33 -0
  10. gradientai/resources/agents/evaluation_metrics/evaluation_metrics.py +177 -0
  11. gradientai/resources/agents/evaluation_metrics/workspaces/__init__.py +33 -0
  12. gradientai/resources/agents/evaluation_metrics/workspaces/agents.py +324 -0
  13. gradientai/resources/agents/evaluation_metrics/workspaces/workspaces.py +654 -0
  14. gradientai/resources/{regions/evaluation_runs → agents}/evaluation_runs.py +197 -47
  15. gradientai/resources/{regions → agents}/evaluation_test_cases.py +30 -9
  16. gradientai/resources/agents/{child_agents.py → routes.py} +64 -64
  17. gradientai/resources/chat/completions.py +20 -2
  18. gradientai/resources/inference/__init__.py +0 -14
  19. gradientai/resources/inference/inference.py +0 -32
  20. gradientai/resources/knowledge_bases/__init__.py +14 -0
  21. gradientai/resources/{indexing_jobs.py → knowledge_bases/indexing_jobs.py} +16 -12
  22. gradientai/resources/knowledge_bases/knowledge_bases.py +32 -0
  23. gradientai/resources/{providers → model_providers}/__init__.py +13 -13
  24. gradientai/resources/{providers → model_providers}/anthropic/keys.py +12 -7
  25. gradientai/resources/{providers/providers.py → model_providers/model_providers.py} +31 -31
  26. gradientai/resources/{providers → model_providers}/openai/keys.py +12 -7
  27. gradientai/resources/models.py +77 -105
  28. gradientai/resources/regions.py +195 -0
  29. gradientai/types/__init__.py +2 -17
  30. gradientai/types/agent_list_response.py +2 -2
  31. gradientai/types/agents/__init__.py +44 -8
  32. gradientai/types/{api_evaluation_metric.py → agents/api_evaluation_metric.py} +1 -1
  33. gradientai/types/{regions/evaluation_runs → agents}/api_evaluation_metric_result.py +1 -1
  34. gradientai/types/{regions/evaluation_runs/api_prompt.py → agents/api_evaluation_prompt.py} +3 -3
  35. gradientai/types/{regions/evaluation_runs → agents}/api_evaluation_run.py +13 -1
  36. gradientai/types/{regions → agents}/api_evaluation_test_case.py +1 -1
  37. gradientai/types/agents/api_key_list_response.py +2 -2
  38. gradientai/types/{region_list_evaluation_metrics_response.py → agents/evaluation_metric_list_response.py} +3 -3
  39. gradientai/types/agents/evaluation_metrics/__init__.py +14 -0
  40. gradientai/types/agents/evaluation_metrics/workspace_create_params.py +16 -0
  41. gradientai/types/agents/evaluation_metrics/workspace_create_response.py +16 -0
  42. gradientai/types/agents/evaluation_metrics/workspace_delete_response.py +11 -0
  43. gradientai/types/agents/evaluation_metrics/workspace_list_evaluation_test_cases_response.py +12 -0
  44. gradientai/types/agents/evaluation_metrics/workspace_list_response.py +16 -0
  45. gradientai/types/agents/evaluation_metrics/workspace_retrieve_response.py +16 -0
  46. gradientai/types/agents/evaluation_metrics/workspace_update_params.py +18 -0
  47. gradientai/types/agents/evaluation_metrics/workspace_update_response.py +16 -0
  48. gradientai/types/agents/evaluation_metrics/workspaces/__init__.py +8 -0
  49. gradientai/types/agents/evaluation_metrics/workspaces/agent_list_params.py +26 -0
  50. gradientai/types/agents/evaluation_metrics/workspaces/agent_list_response.py +22 -0
  51. gradientai/types/agents/evaluation_metrics/workspaces/agent_move_params.py +16 -0
  52. gradientai/types/agents/evaluation_metrics/workspaces/agent_move_response.py +16 -0
  53. gradientai/types/{regions → agents}/evaluation_run_create_params.py +3 -2
  54. gradientai/types/{regions → agents}/evaluation_run_create_response.py +2 -2
  55. gradientai/types/{regions/evaluation_runs/result_retrieve_response.py → agents/evaluation_run_list_results_response.py} +5 -5
  56. gradientai/types/{regions → agents}/evaluation_run_retrieve_response.py +1 -1
  57. gradientai/types/agents/evaluation_run_retrieve_results_response.py +12 -0
  58. gradientai/types/{regions → agents}/evaluation_test_case_list_evaluation_runs_response.py +1 -1
  59. gradientai/types/agents/evaluation_test_case_retrieve_params.py +12 -0
  60. gradientai/types/agents/{child_agent_add_params.py → route_add_params.py} +2 -2
  61. gradientai/types/agents/{child_agent_add_response.py → route_add_response.py} +2 -2
  62. gradientai/types/agents/{child_agent_delete_response.py → route_delete_response.py} +2 -2
  63. gradientai/types/agents/{child_agent_update_params.py → route_update_params.py} +2 -2
  64. gradientai/types/agents/{child_agent_update_response.py → route_update_response.py} +2 -2
  65. gradientai/types/agents/{child_agent_view_response.py → route_view_response.py} +2 -2
  66. gradientai/types/agents/version_list_response.py +2 -2
  67. gradientai/types/api_knowledge_base.py +1 -1
  68. gradientai/types/api_workspace.py +1 -1
  69. gradientai/types/inference/__init__.py +0 -2
  70. gradientai/types/inference/api_key_list_response.py +2 -2
  71. gradientai/types/knowledge_base_list_response.py +2 -2
  72. gradientai/types/knowledge_bases/__init__.py +12 -0
  73. gradientai/types/{indexing_job_retrieve_data_sources_response.py → knowledge_bases/api_indexed_data_source.py} +4 -8
  74. gradientai/types/{api_indexing_job.py → knowledge_bases/api_indexing_job.py} +13 -1
  75. gradientai/types/knowledge_bases/api_knowledge_base_data_source.py +4 -1
  76. gradientai/types/knowledge_bases/data_source_list_response.py +2 -2
  77. gradientai/types/{indexing_job_create_response.py → knowledge_bases/indexing_job_create_response.py} +1 -1
  78. gradientai/types/{indexing_job_list_response.py → knowledge_bases/indexing_job_list_response.py} +3 -3
  79. gradientai/types/knowledge_bases/indexing_job_retrieve_data_sources_response.py +12 -0
  80. gradientai/types/{indexing_job_retrieve_response.py → knowledge_bases/indexing_job_retrieve_response.py} +1 -1
  81. gradientai/types/{indexing_job_update_cancel_params.py → knowledge_bases/indexing_job_update_cancel_params.py} +1 -1
  82. gradientai/types/{indexing_job_update_cancel_response.py → knowledge_bases/indexing_job_update_cancel_response.py} +1 -1
  83. gradientai/types/{inference/model.py → model.py} +1 -1
  84. gradientai/types/model_list_response.py +5 -8
  85. gradientai/types/{providers → model_providers}/anthropic/key_list_agents_response.py +2 -2
  86. gradientai/types/{providers → model_providers}/anthropic/key_list_response.py +2 -2
  87. gradientai/types/{providers → model_providers}/openai/key_list_response.py +2 -2
  88. gradientai/types/{providers → model_providers}/openai/key_retrieve_agents_response.py +2 -2
  89. gradientai/types/shared/__init__.py +4 -0
  90. c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info/RECORD +0 -217
  91. gradientai/resources/inference/models.py +0 -226
  92. gradientai/resources/regions/__init__.py +0 -61
  93. gradientai/resources/regions/evaluation_runs/__init__.py +0 -33
  94. gradientai/resources/regions/evaluation_runs/results.py +0 -264
  95. gradientai/resources/regions/regions.py +0 -352
  96. gradientai/types/api_model.py +0 -32
  97. gradientai/types/inference/model_list_response.py +0 -15
  98. gradientai/types/model_list_params.py +0 -42
  99. gradientai/types/regions/__init__.py +0 -32
  100. gradientai/types/regions/evaluation_runs/__init__.py +0 -9
  101. gradientai/types/regions/evaluation_runs/result_retrieve_prompt_response.py +0 -12
  102. {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info}/WHEEL +0 -0
  103. {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info}/licenses/LICENSE +0 -0
  104. /gradientai/resources/{providers → model_providers}/anthropic/__init__.py +0 -0
  105. /gradientai/resources/{providers → model_providers}/anthropic/anthropic.py +0 -0
  106. /gradientai/resources/{providers → model_providers}/openai/__init__.py +0 -0
  107. /gradientai/resources/{providers → model_providers}/openai/openai.py +0 -0
  108. /gradientai/types/{regions → agents}/api_star_metric.py +0 -0
  109. /gradientai/types/{regions → agents}/api_star_metric_param.py +0 -0
  110. /gradientai/types/{regions → agents}/evaluation_dataset_create_file_upload_presigned_urls_params.py +0 -0
  111. /gradientai/types/{regions → agents}/evaluation_dataset_create_file_upload_presigned_urls_response.py +0 -0
  112. /gradientai/types/{regions → agents}/evaluation_dataset_create_params.py +0 -0
  113. /gradientai/types/{regions → agents}/evaluation_dataset_create_response.py +0 -0
  114. /gradientai/types/{regions → agents}/evaluation_test_case_create_params.py +0 -0
  115. /gradientai/types/{regions → agents}/evaluation_test_case_create_response.py +0 -0
  116. /gradientai/types/{regions → agents}/evaluation_test_case_list_evaluation_runs_params.py +0 -0
  117. /gradientai/types/{regions → agents}/evaluation_test_case_list_response.py +0 -0
  118. /gradientai/types/{regions → agents}/evaluation_test_case_retrieve_response.py +0 -0
  119. /gradientai/types/{regions → agents}/evaluation_test_case_update_params.py +0 -0
  120. /gradientai/types/{regions → agents}/evaluation_test_case_update_response.py +0 -0
  121. /gradientai/types/{indexing_job_create_params.py → knowledge_bases/indexing_job_create_params.py} +0 -0
  122. /gradientai/types/{indexing_job_list_params.py → knowledge_bases/indexing_job_list_params.py} +0 -0
  123. /gradientai/types/{providers → model_providers}/__init__.py +0 -0
  124. /gradientai/types/{providers → model_providers}/anthropic/__init__.py +0 -0
  125. /gradientai/types/{providers → model_providers}/anthropic/key_create_params.py +0 -0
  126. /gradientai/types/{providers → model_providers}/anthropic/key_create_response.py +0 -0
  127. /gradientai/types/{providers → model_providers}/anthropic/key_delete_response.py +0 -0
  128. /gradientai/types/{providers → model_providers}/anthropic/key_list_agents_params.py +0 -0
  129. /gradientai/types/{providers → model_providers}/anthropic/key_list_params.py +0 -0
  130. /gradientai/types/{providers → model_providers}/anthropic/key_retrieve_response.py +0 -0
  131. /gradientai/types/{providers → model_providers}/anthropic/key_update_params.py +0 -0
  132. /gradientai/types/{providers → model_providers}/anthropic/key_update_response.py +0 -0
  133. /gradientai/types/{providers → model_providers}/openai/__init__.py +0 -0
  134. /gradientai/types/{providers → model_providers}/openai/key_create_params.py +0 -0
  135. /gradientai/types/{providers → model_providers}/openai/key_create_response.py +0 -0
  136. /gradientai/types/{providers → model_providers}/openai/key_delete_response.py +0 -0
  137. /gradientai/types/{providers → model_providers}/openai/key_list_params.py +0 -0
  138. /gradientai/types/{providers → model_providers}/openai/key_retrieve_agents_params.py +0 -0
  139. /gradientai/types/{providers → model_providers}/openai/key_retrieve_response.py +0 -0
  140. /gradientai/types/{providers → model_providers}/openai/key_update_params.py +0 -0
  141. /gradientai/types/{providers → model_providers}/openai/key_update_response.py +0 -0
  142. /gradientai/types/{agents → shared}/api_links.py +0 -0
  143. /gradientai/types/{agents → shared}/api_meta.py +0 -0
@@ -6,6 +6,14 @@ from typing import List
6
6
 
7
7
  import httpx
8
8
 
9
+ from .routes import (
10
+ RoutesResource,
11
+ AsyncRoutesResource,
12
+ RoutesResourceWithRawResponse,
13
+ AsyncRoutesResourceWithRawResponse,
14
+ RoutesResourceWithStreamingResponse,
15
+ AsyncRoutesResourceWithStreamingResponse,
16
+ )
9
17
  from ...types import (
10
18
  APIRetrievalMethod,
11
19
  APIDeploymentVisibility,
@@ -48,15 +56,15 @@ from ..._response import (
48
56
  async_to_raw_response_wrapper,
49
57
  async_to_streamed_response_wrapper,
50
58
  )
51
- from .child_agents import (
52
- ChildAgentsResource,
53
- AsyncChildAgentsResource,
54
- ChildAgentsResourceWithRawResponse,
55
- AsyncChildAgentsResourceWithRawResponse,
56
- ChildAgentsResourceWithStreamingResponse,
57
- AsyncChildAgentsResourceWithStreamingResponse,
58
- )
59
59
  from ..._base_client import make_request_options
60
+ from .evaluation_runs import (
61
+ EvaluationRunsResource,
62
+ AsyncEvaluationRunsResource,
63
+ EvaluationRunsResourceWithRawResponse,
64
+ AsyncEvaluationRunsResourceWithRawResponse,
65
+ EvaluationRunsResourceWithStreamingResponse,
66
+ AsyncEvaluationRunsResourceWithStreamingResponse,
67
+ )
60
68
  from .knowledge_bases import (
61
69
  KnowledgeBasesResource,
62
70
  AsyncKnowledgeBasesResource,
@@ -65,6 +73,22 @@ from .knowledge_bases import (
65
73
  KnowledgeBasesResourceWithStreamingResponse,
66
74
  AsyncKnowledgeBasesResourceWithStreamingResponse,
67
75
  )
76
+ from .evaluation_datasets import (
77
+ EvaluationDatasetsResource,
78
+ AsyncEvaluationDatasetsResource,
79
+ EvaluationDatasetsResourceWithRawResponse,
80
+ AsyncEvaluationDatasetsResourceWithRawResponse,
81
+ EvaluationDatasetsResourceWithStreamingResponse,
82
+ AsyncEvaluationDatasetsResourceWithStreamingResponse,
83
+ )
84
+ from .evaluation_test_cases import (
85
+ EvaluationTestCasesResource,
86
+ AsyncEvaluationTestCasesResource,
87
+ EvaluationTestCasesResourceWithRawResponse,
88
+ AsyncEvaluationTestCasesResourceWithRawResponse,
89
+ EvaluationTestCasesResourceWithStreamingResponse,
90
+ AsyncEvaluationTestCasesResourceWithStreamingResponse,
91
+ )
68
92
  from ...types.agent_list_response import AgentListResponse
69
93
  from ...types.api_retrieval_method import APIRetrievalMethod
70
94
  from ...types.agent_create_response import AgentCreateResponse
@@ -73,6 +97,14 @@ from ...types.agent_update_response import AgentUpdateResponse
73
97
  from ...types.agent_retrieve_response import AgentRetrieveResponse
74
98
  from ...types.api_deployment_visibility import APIDeploymentVisibility
75
99
  from ...types.agent_update_status_response import AgentUpdateStatusResponse
100
+ from .evaluation_metrics.evaluation_metrics import (
101
+ EvaluationMetricsResource,
102
+ AsyncEvaluationMetricsResource,
103
+ EvaluationMetricsResourceWithRawResponse,
104
+ AsyncEvaluationMetricsResourceWithRawResponse,
105
+ EvaluationMetricsResourceWithStreamingResponse,
106
+ AsyncEvaluationMetricsResourceWithStreamingResponse,
107
+ )
76
108
 
77
109
  __all__ = ["AgentsResource", "AsyncAgentsResource"]
78
110
 
@@ -82,6 +114,22 @@ class AgentsResource(SyncAPIResource):
82
114
  def api_keys(self) -> APIKeysResource:
83
115
  return APIKeysResource(self._client)
84
116
 
117
+ @cached_property
118
+ def evaluation_metrics(self) -> EvaluationMetricsResource:
119
+ return EvaluationMetricsResource(self._client)
120
+
121
+ @cached_property
122
+ def evaluation_runs(self) -> EvaluationRunsResource:
123
+ return EvaluationRunsResource(self._client)
124
+
125
+ @cached_property
126
+ def evaluation_test_cases(self) -> EvaluationTestCasesResource:
127
+ return EvaluationTestCasesResource(self._client)
128
+
129
+ @cached_property
130
+ def evaluation_datasets(self) -> EvaluationDatasetsResource:
131
+ return EvaluationDatasetsResource(self._client)
132
+
85
133
  @cached_property
86
134
  def functions(self) -> FunctionsResource:
87
135
  return FunctionsResource(self._client)
@@ -95,8 +143,8 @@ class AgentsResource(SyncAPIResource):
95
143
  return KnowledgeBasesResource(self._client)
96
144
 
97
145
  @cached_property
98
- def child_agents(self) -> ChildAgentsResource:
99
- return ChildAgentsResource(self._client)
146
+ def routes(self) -> RoutesResource:
147
+ return RoutesResource(self._client)
100
148
 
101
149
  @cached_property
102
150
  def with_raw_response(self) -> AgentsResourceWithRawResponse:
@@ -450,6 +498,22 @@ class AsyncAgentsResource(AsyncAPIResource):
450
498
  def api_keys(self) -> AsyncAPIKeysResource:
451
499
  return AsyncAPIKeysResource(self._client)
452
500
 
501
+ @cached_property
502
+ def evaluation_metrics(self) -> AsyncEvaluationMetricsResource:
503
+ return AsyncEvaluationMetricsResource(self._client)
504
+
505
+ @cached_property
506
+ def evaluation_runs(self) -> AsyncEvaluationRunsResource:
507
+ return AsyncEvaluationRunsResource(self._client)
508
+
509
+ @cached_property
510
+ def evaluation_test_cases(self) -> AsyncEvaluationTestCasesResource:
511
+ return AsyncEvaluationTestCasesResource(self._client)
512
+
513
+ @cached_property
514
+ def evaluation_datasets(self) -> AsyncEvaluationDatasetsResource:
515
+ return AsyncEvaluationDatasetsResource(self._client)
516
+
453
517
  @cached_property
454
518
  def functions(self) -> AsyncFunctionsResource:
455
519
  return AsyncFunctionsResource(self._client)
@@ -463,8 +527,8 @@ class AsyncAgentsResource(AsyncAPIResource):
463
527
  return AsyncKnowledgeBasesResource(self._client)
464
528
 
465
529
  @cached_property
466
- def child_agents(self) -> AsyncChildAgentsResource:
467
- return AsyncChildAgentsResource(self._client)
530
+ def routes(self) -> AsyncRoutesResource:
531
+ return AsyncRoutesResource(self._client)
468
532
 
469
533
  @cached_property
470
534
  def with_raw_response(self) -> AsyncAgentsResourceWithRawResponse:
@@ -840,6 +904,22 @@ class AgentsResourceWithRawResponse:
840
904
  def api_keys(self) -> APIKeysResourceWithRawResponse:
841
905
  return APIKeysResourceWithRawResponse(self._agents.api_keys)
842
906
 
907
+ @cached_property
908
+ def evaluation_metrics(self) -> EvaluationMetricsResourceWithRawResponse:
909
+ return EvaluationMetricsResourceWithRawResponse(self._agents.evaluation_metrics)
910
+
911
+ @cached_property
912
+ def evaluation_runs(self) -> EvaluationRunsResourceWithRawResponse:
913
+ return EvaluationRunsResourceWithRawResponse(self._agents.evaluation_runs)
914
+
915
+ @cached_property
916
+ def evaluation_test_cases(self) -> EvaluationTestCasesResourceWithRawResponse:
917
+ return EvaluationTestCasesResourceWithRawResponse(self._agents.evaluation_test_cases)
918
+
919
+ @cached_property
920
+ def evaluation_datasets(self) -> EvaluationDatasetsResourceWithRawResponse:
921
+ return EvaluationDatasetsResourceWithRawResponse(self._agents.evaluation_datasets)
922
+
843
923
  @cached_property
844
924
  def functions(self) -> FunctionsResourceWithRawResponse:
845
925
  return FunctionsResourceWithRawResponse(self._agents.functions)
@@ -853,8 +933,8 @@ class AgentsResourceWithRawResponse:
853
933
  return KnowledgeBasesResourceWithRawResponse(self._agents.knowledge_bases)
854
934
 
855
935
  @cached_property
856
- def child_agents(self) -> ChildAgentsResourceWithRawResponse:
857
- return ChildAgentsResourceWithRawResponse(self._agents.child_agents)
936
+ def routes(self) -> RoutesResourceWithRawResponse:
937
+ return RoutesResourceWithRawResponse(self._agents.routes)
858
938
 
859
939
 
860
940
  class AsyncAgentsResourceWithRawResponse:
@@ -884,6 +964,22 @@ class AsyncAgentsResourceWithRawResponse:
884
964
  def api_keys(self) -> AsyncAPIKeysResourceWithRawResponse:
885
965
  return AsyncAPIKeysResourceWithRawResponse(self._agents.api_keys)
886
966
 
967
+ @cached_property
968
+ def evaluation_metrics(self) -> AsyncEvaluationMetricsResourceWithRawResponse:
969
+ return AsyncEvaluationMetricsResourceWithRawResponse(self._agents.evaluation_metrics)
970
+
971
+ @cached_property
972
+ def evaluation_runs(self) -> AsyncEvaluationRunsResourceWithRawResponse:
973
+ return AsyncEvaluationRunsResourceWithRawResponse(self._agents.evaluation_runs)
974
+
975
+ @cached_property
976
+ def evaluation_test_cases(self) -> AsyncEvaluationTestCasesResourceWithRawResponse:
977
+ return AsyncEvaluationTestCasesResourceWithRawResponse(self._agents.evaluation_test_cases)
978
+
979
+ @cached_property
980
+ def evaluation_datasets(self) -> AsyncEvaluationDatasetsResourceWithRawResponse:
981
+ return AsyncEvaluationDatasetsResourceWithRawResponse(self._agents.evaluation_datasets)
982
+
887
983
  @cached_property
888
984
  def functions(self) -> AsyncFunctionsResourceWithRawResponse:
889
985
  return AsyncFunctionsResourceWithRawResponse(self._agents.functions)
@@ -897,8 +993,8 @@ class AsyncAgentsResourceWithRawResponse:
897
993
  return AsyncKnowledgeBasesResourceWithRawResponse(self._agents.knowledge_bases)
898
994
 
899
995
  @cached_property
900
- def child_agents(self) -> AsyncChildAgentsResourceWithRawResponse:
901
- return AsyncChildAgentsResourceWithRawResponse(self._agents.child_agents)
996
+ def routes(self) -> AsyncRoutesResourceWithRawResponse:
997
+ return AsyncRoutesResourceWithRawResponse(self._agents.routes)
902
998
 
903
999
 
904
1000
  class AgentsResourceWithStreamingResponse:
@@ -928,6 +1024,22 @@ class AgentsResourceWithStreamingResponse:
928
1024
  def api_keys(self) -> APIKeysResourceWithStreamingResponse:
929
1025
  return APIKeysResourceWithStreamingResponse(self._agents.api_keys)
930
1026
 
1027
+ @cached_property
1028
+ def evaluation_metrics(self) -> EvaluationMetricsResourceWithStreamingResponse:
1029
+ return EvaluationMetricsResourceWithStreamingResponse(self._agents.evaluation_metrics)
1030
+
1031
+ @cached_property
1032
+ def evaluation_runs(self) -> EvaluationRunsResourceWithStreamingResponse:
1033
+ return EvaluationRunsResourceWithStreamingResponse(self._agents.evaluation_runs)
1034
+
1035
+ @cached_property
1036
+ def evaluation_test_cases(self) -> EvaluationTestCasesResourceWithStreamingResponse:
1037
+ return EvaluationTestCasesResourceWithStreamingResponse(self._agents.evaluation_test_cases)
1038
+
1039
+ @cached_property
1040
+ def evaluation_datasets(self) -> EvaluationDatasetsResourceWithStreamingResponse:
1041
+ return EvaluationDatasetsResourceWithStreamingResponse(self._agents.evaluation_datasets)
1042
+
931
1043
  @cached_property
932
1044
  def functions(self) -> FunctionsResourceWithStreamingResponse:
933
1045
  return FunctionsResourceWithStreamingResponse(self._agents.functions)
@@ -941,8 +1053,8 @@ class AgentsResourceWithStreamingResponse:
941
1053
  return KnowledgeBasesResourceWithStreamingResponse(self._agents.knowledge_bases)
942
1054
 
943
1055
  @cached_property
944
- def child_agents(self) -> ChildAgentsResourceWithStreamingResponse:
945
- return ChildAgentsResourceWithStreamingResponse(self._agents.child_agents)
1056
+ def routes(self) -> RoutesResourceWithStreamingResponse:
1057
+ return RoutesResourceWithStreamingResponse(self._agents.routes)
946
1058
 
947
1059
 
948
1060
  class AsyncAgentsResourceWithStreamingResponse:
@@ -972,6 +1084,22 @@ class AsyncAgentsResourceWithStreamingResponse:
972
1084
  def api_keys(self) -> AsyncAPIKeysResourceWithStreamingResponse:
973
1085
  return AsyncAPIKeysResourceWithStreamingResponse(self._agents.api_keys)
974
1086
 
1087
+ @cached_property
1088
+ def evaluation_metrics(self) -> AsyncEvaluationMetricsResourceWithStreamingResponse:
1089
+ return AsyncEvaluationMetricsResourceWithStreamingResponse(self._agents.evaluation_metrics)
1090
+
1091
+ @cached_property
1092
+ def evaluation_runs(self) -> AsyncEvaluationRunsResourceWithStreamingResponse:
1093
+ return AsyncEvaluationRunsResourceWithStreamingResponse(self._agents.evaluation_runs)
1094
+
1095
+ @cached_property
1096
+ def evaluation_test_cases(self) -> AsyncEvaluationTestCasesResourceWithStreamingResponse:
1097
+ return AsyncEvaluationTestCasesResourceWithStreamingResponse(self._agents.evaluation_test_cases)
1098
+
1099
+ @cached_property
1100
+ def evaluation_datasets(self) -> AsyncEvaluationDatasetsResourceWithStreamingResponse:
1101
+ return AsyncEvaluationDatasetsResourceWithStreamingResponse(self._agents.evaluation_datasets)
1102
+
975
1103
  @cached_property
976
1104
  def functions(self) -> AsyncFunctionsResourceWithStreamingResponse:
977
1105
  return AsyncFunctionsResourceWithStreamingResponse(self._agents.functions)
@@ -985,5 +1113,5 @@ class AsyncAgentsResourceWithStreamingResponse:
985
1113
  return AsyncKnowledgeBasesResourceWithStreamingResponse(self._agents.knowledge_bases)
986
1114
 
987
1115
  @cached_property
988
- def child_agents(self) -> AsyncChildAgentsResourceWithStreamingResponse:
989
- return AsyncChildAgentsResourceWithStreamingResponse(self._agents.child_agents)
1116
+ def routes(self) -> AsyncRoutesResourceWithStreamingResponse:
1117
+ return AsyncRoutesResourceWithStreamingResponse(self._agents.routes)
@@ -17,13 +17,13 @@ from ..._response import (
17
17
  async_to_streamed_response_wrapper,
18
18
  )
19
19
  from ..._base_client import make_request_options
20
- from ...types.regions import (
20
+ from ...types.agents import (
21
21
  evaluation_dataset_create_params,
22
22
  evaluation_dataset_create_file_upload_presigned_urls_params,
23
23
  )
24
- from ...types.regions.evaluation_dataset_create_response import EvaluationDatasetCreateResponse
24
+ from ...types.agents.evaluation_dataset_create_response import EvaluationDatasetCreateResponse
25
25
  from ...types.knowledge_bases.api_file_upload_data_source_param import APIFileUploadDataSourceParam
26
- from ...types.regions.evaluation_dataset_create_file_upload_presigned_urls_response import (
26
+ from ...types.agents.evaluation_dataset_create_file_upload_presigned_urls_response import (
27
27
  EvaluationDatasetCreateFileUploadPresignedURLsResponse,
28
28
  )
29
29
 
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .workspaces import (
4
+ WorkspacesResource,
5
+ AsyncWorkspacesResource,
6
+ WorkspacesResourceWithRawResponse,
7
+ AsyncWorkspacesResourceWithRawResponse,
8
+ WorkspacesResourceWithStreamingResponse,
9
+ AsyncWorkspacesResourceWithStreamingResponse,
10
+ )
11
+ from .evaluation_metrics import (
12
+ EvaluationMetricsResource,
13
+ AsyncEvaluationMetricsResource,
14
+ EvaluationMetricsResourceWithRawResponse,
15
+ AsyncEvaluationMetricsResourceWithRawResponse,
16
+ EvaluationMetricsResourceWithStreamingResponse,
17
+ AsyncEvaluationMetricsResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "WorkspacesResource",
22
+ "AsyncWorkspacesResource",
23
+ "WorkspacesResourceWithRawResponse",
24
+ "AsyncWorkspacesResourceWithRawResponse",
25
+ "WorkspacesResourceWithStreamingResponse",
26
+ "AsyncWorkspacesResourceWithStreamingResponse",
27
+ "EvaluationMetricsResource",
28
+ "AsyncEvaluationMetricsResource",
29
+ "EvaluationMetricsResourceWithRawResponse",
30
+ "AsyncEvaluationMetricsResourceWithRawResponse",
31
+ "EvaluationMetricsResourceWithStreamingResponse",
32
+ "AsyncEvaluationMetricsResourceWithStreamingResponse",
33
+ ]
@@ -0,0 +1,177 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
+ from ...._compat import cached_property
9
+ from ...._resource import SyncAPIResource, AsyncAPIResource
10
+ from ...._response import (
11
+ to_raw_response_wrapper,
12
+ to_streamed_response_wrapper,
13
+ async_to_raw_response_wrapper,
14
+ async_to_streamed_response_wrapper,
15
+ )
16
+ from ...._base_client import make_request_options
17
+ from .workspaces.workspaces import (
18
+ WorkspacesResource,
19
+ AsyncWorkspacesResource,
20
+ WorkspacesResourceWithRawResponse,
21
+ AsyncWorkspacesResourceWithRawResponse,
22
+ WorkspacesResourceWithStreamingResponse,
23
+ AsyncWorkspacesResourceWithStreamingResponse,
24
+ )
25
+ from ....types.agents.evaluation_metric_list_response import EvaluationMetricListResponse
26
+
27
+ __all__ = ["EvaluationMetricsResource", "AsyncEvaluationMetricsResource"]
28
+
29
+
30
+ class EvaluationMetricsResource(SyncAPIResource):
31
+ @cached_property
32
+ def workspaces(self) -> WorkspacesResource:
33
+ return WorkspacesResource(self._client)
34
+
35
+ @cached_property
36
+ def with_raw_response(self) -> EvaluationMetricsResourceWithRawResponse:
37
+ """
38
+ This property can be used as a prefix for any HTTP method call to return
39
+ the raw response object instead of the parsed content.
40
+
41
+ For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
42
+ """
43
+ return EvaluationMetricsResourceWithRawResponse(self)
44
+
45
+ @cached_property
46
+ def with_streaming_response(self) -> EvaluationMetricsResourceWithStreamingResponse:
47
+ """
48
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
49
+
50
+ For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
51
+ """
52
+ return EvaluationMetricsResourceWithStreamingResponse(self)
53
+
54
+ def list(
55
+ self,
56
+ *,
57
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
58
+ # The extra values given here take precedence over values defined on the client or passed to this method.
59
+ extra_headers: Headers | None = None,
60
+ extra_query: Query | None = None,
61
+ extra_body: Body | None = None,
62
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
63
+ ) -> EvaluationMetricListResponse:
64
+ """
65
+ To list all evaluation metrics, send a GET request to
66
+ `/v2/gen-ai/evaluation_metrics`.
67
+ """
68
+ return self._get(
69
+ "/v2/gen-ai/evaluation_metrics"
70
+ if self._client._base_url_overridden
71
+ else "https://api.digitalocean.com/v2/gen-ai/evaluation_metrics",
72
+ options=make_request_options(
73
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
74
+ ),
75
+ cast_to=EvaluationMetricListResponse,
76
+ )
77
+
78
+
79
+ class AsyncEvaluationMetricsResource(AsyncAPIResource):
80
+ @cached_property
81
+ def workspaces(self) -> AsyncWorkspacesResource:
82
+ return AsyncWorkspacesResource(self._client)
83
+
84
+ @cached_property
85
+ def with_raw_response(self) -> AsyncEvaluationMetricsResourceWithRawResponse:
86
+ """
87
+ This property can be used as a prefix for any HTTP method call to return
88
+ the raw response object instead of the parsed content.
89
+
90
+ For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
91
+ """
92
+ return AsyncEvaluationMetricsResourceWithRawResponse(self)
93
+
94
+ @cached_property
95
+ def with_streaming_response(self) -> AsyncEvaluationMetricsResourceWithStreamingResponse:
96
+ """
97
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
98
+
99
+ For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
100
+ """
101
+ return AsyncEvaluationMetricsResourceWithStreamingResponse(self)
102
+
103
+ async def list(
104
+ self,
105
+ *,
106
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
107
+ # The extra values given here take precedence over values defined on the client or passed to this method.
108
+ extra_headers: Headers | None = None,
109
+ extra_query: Query | None = None,
110
+ extra_body: Body | None = None,
111
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
112
+ ) -> EvaluationMetricListResponse:
113
+ """
114
+ To list all evaluation metrics, send a GET request to
115
+ `/v2/gen-ai/evaluation_metrics`.
116
+ """
117
+ return await self._get(
118
+ "/v2/gen-ai/evaluation_metrics"
119
+ if self._client._base_url_overridden
120
+ else "https://api.digitalocean.com/v2/gen-ai/evaluation_metrics",
121
+ options=make_request_options(
122
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
123
+ ),
124
+ cast_to=EvaluationMetricListResponse,
125
+ )
126
+
127
+
128
+ class EvaluationMetricsResourceWithRawResponse:
129
+ def __init__(self, evaluation_metrics: EvaluationMetricsResource) -> None:
130
+ self._evaluation_metrics = evaluation_metrics
131
+
132
+ self.list = to_raw_response_wrapper(
133
+ evaluation_metrics.list,
134
+ )
135
+
136
+ @cached_property
137
+ def workspaces(self) -> WorkspacesResourceWithRawResponse:
138
+ return WorkspacesResourceWithRawResponse(self._evaluation_metrics.workspaces)
139
+
140
+
141
+ class AsyncEvaluationMetricsResourceWithRawResponse:
142
+ def __init__(self, evaluation_metrics: AsyncEvaluationMetricsResource) -> None:
143
+ self._evaluation_metrics = evaluation_metrics
144
+
145
+ self.list = async_to_raw_response_wrapper(
146
+ evaluation_metrics.list,
147
+ )
148
+
149
+ @cached_property
150
+ def workspaces(self) -> AsyncWorkspacesResourceWithRawResponse:
151
+ return AsyncWorkspacesResourceWithRawResponse(self._evaluation_metrics.workspaces)
152
+
153
+
154
+ class EvaluationMetricsResourceWithStreamingResponse:
155
+ def __init__(self, evaluation_metrics: EvaluationMetricsResource) -> None:
156
+ self._evaluation_metrics = evaluation_metrics
157
+
158
+ self.list = to_streamed_response_wrapper(
159
+ evaluation_metrics.list,
160
+ )
161
+
162
+ @cached_property
163
+ def workspaces(self) -> WorkspacesResourceWithStreamingResponse:
164
+ return WorkspacesResourceWithStreamingResponse(self._evaluation_metrics.workspaces)
165
+
166
+
167
+ class AsyncEvaluationMetricsResourceWithStreamingResponse:
168
+ def __init__(self, evaluation_metrics: AsyncEvaluationMetricsResource) -> None:
169
+ self._evaluation_metrics = evaluation_metrics
170
+
171
+ self.list = async_to_streamed_response_wrapper(
172
+ evaluation_metrics.list,
173
+ )
174
+
175
+ @cached_property
176
+ def workspaces(self) -> AsyncWorkspacesResourceWithStreamingResponse:
177
+ return AsyncWorkspacesResourceWithStreamingResponse(self._evaluation_metrics.workspaces)
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .agents import (
4
+ AgentsResource,
5
+ AsyncAgentsResource,
6
+ AgentsResourceWithRawResponse,
7
+ AsyncAgentsResourceWithRawResponse,
8
+ AgentsResourceWithStreamingResponse,
9
+ AsyncAgentsResourceWithStreamingResponse,
10
+ )
11
+ from .workspaces import (
12
+ WorkspacesResource,
13
+ AsyncWorkspacesResource,
14
+ WorkspacesResourceWithRawResponse,
15
+ AsyncWorkspacesResourceWithRawResponse,
16
+ WorkspacesResourceWithStreamingResponse,
17
+ AsyncWorkspacesResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "AgentsResource",
22
+ "AsyncAgentsResource",
23
+ "AgentsResourceWithRawResponse",
24
+ "AsyncAgentsResourceWithRawResponse",
25
+ "AgentsResourceWithStreamingResponse",
26
+ "AsyncAgentsResourceWithStreamingResponse",
27
+ "WorkspacesResource",
28
+ "AsyncWorkspacesResource",
29
+ "WorkspacesResourceWithRawResponse",
30
+ "AsyncWorkspacesResourceWithRawResponse",
31
+ "WorkspacesResourceWithStreamingResponse",
32
+ "AsyncWorkspacesResourceWithStreamingResponse",
33
+ ]