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.
- {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
- c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info/RECORD +230 -0
- gradientai/_client.py +73 -71
- gradientai/_version.py +1 -1
- gradientai/resources/__init__.py +14 -28
- gradientai/resources/agents/__init__.py +69 -13
- gradientai/resources/agents/agents.py +148 -20
- gradientai/resources/{regions → agents}/evaluation_datasets.py +3 -3
- gradientai/resources/agents/evaluation_metrics/__init__.py +33 -0
- gradientai/resources/agents/evaluation_metrics/evaluation_metrics.py +177 -0
- gradientai/resources/agents/evaluation_metrics/workspaces/__init__.py +33 -0
- gradientai/resources/agents/evaluation_metrics/workspaces/agents.py +324 -0
- gradientai/resources/agents/evaluation_metrics/workspaces/workspaces.py +654 -0
- gradientai/resources/{regions/evaluation_runs → agents}/evaluation_runs.py +197 -47
- gradientai/resources/{regions → agents}/evaluation_test_cases.py +30 -9
- gradientai/resources/agents/{child_agents.py → routes.py} +64 -64
- gradientai/resources/chat/completions.py +20 -2
- gradientai/resources/inference/__init__.py +0 -14
- gradientai/resources/inference/inference.py +0 -32
- gradientai/resources/knowledge_bases/__init__.py +14 -0
- gradientai/resources/{indexing_jobs.py → knowledge_bases/indexing_jobs.py} +16 -12
- gradientai/resources/knowledge_bases/knowledge_bases.py +32 -0
- gradientai/resources/{providers → model_providers}/__init__.py +13 -13
- gradientai/resources/{providers → model_providers}/anthropic/keys.py +12 -7
- gradientai/resources/{providers/providers.py → model_providers/model_providers.py} +31 -31
- gradientai/resources/{providers → model_providers}/openai/keys.py +12 -7
- gradientai/resources/models.py +77 -105
- gradientai/resources/regions.py +195 -0
- gradientai/types/__init__.py +2 -17
- gradientai/types/agent_list_response.py +2 -2
- gradientai/types/agents/__init__.py +44 -8
- gradientai/types/{api_evaluation_metric.py → agents/api_evaluation_metric.py} +1 -1
- gradientai/types/{regions/evaluation_runs → agents}/api_evaluation_metric_result.py +1 -1
- gradientai/types/{regions/evaluation_runs/api_prompt.py → agents/api_evaluation_prompt.py} +3 -3
- gradientai/types/{regions/evaluation_runs → agents}/api_evaluation_run.py +13 -1
- gradientai/types/{regions → agents}/api_evaluation_test_case.py +1 -1
- gradientai/types/agents/api_key_list_response.py +2 -2
- gradientai/types/{region_list_evaluation_metrics_response.py → agents/evaluation_metric_list_response.py} +3 -3
- gradientai/types/agents/evaluation_metrics/__init__.py +14 -0
- gradientai/types/agents/evaluation_metrics/workspace_create_params.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspace_create_response.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspace_delete_response.py +11 -0
- gradientai/types/agents/evaluation_metrics/workspace_list_evaluation_test_cases_response.py +12 -0
- gradientai/types/agents/evaluation_metrics/workspace_list_response.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspace_retrieve_response.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspace_update_params.py +18 -0
- gradientai/types/agents/evaluation_metrics/workspace_update_response.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspaces/__init__.py +8 -0
- gradientai/types/agents/evaluation_metrics/workspaces/agent_list_params.py +26 -0
- gradientai/types/agents/evaluation_metrics/workspaces/agent_list_response.py +22 -0
- gradientai/types/agents/evaluation_metrics/workspaces/agent_move_params.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspaces/agent_move_response.py +16 -0
- gradientai/types/{regions → agents}/evaluation_run_create_params.py +3 -2
- gradientai/types/{regions → agents}/evaluation_run_create_response.py +2 -2
- gradientai/types/{regions/evaluation_runs/result_retrieve_response.py → agents/evaluation_run_list_results_response.py} +5 -5
- gradientai/types/{regions → agents}/evaluation_run_retrieve_response.py +1 -1
- gradientai/types/agents/evaluation_run_retrieve_results_response.py +12 -0
- gradientai/types/{regions → agents}/evaluation_test_case_list_evaluation_runs_response.py +1 -1
- gradientai/types/agents/evaluation_test_case_retrieve_params.py +12 -0
- gradientai/types/agents/{child_agent_add_params.py → route_add_params.py} +2 -2
- gradientai/types/agents/{child_agent_add_response.py → route_add_response.py} +2 -2
- gradientai/types/agents/{child_agent_delete_response.py → route_delete_response.py} +2 -2
- gradientai/types/agents/{child_agent_update_params.py → route_update_params.py} +2 -2
- gradientai/types/agents/{child_agent_update_response.py → route_update_response.py} +2 -2
- gradientai/types/agents/{child_agent_view_response.py → route_view_response.py} +2 -2
- gradientai/types/agents/version_list_response.py +2 -2
- gradientai/types/api_knowledge_base.py +1 -1
- gradientai/types/api_workspace.py +1 -1
- gradientai/types/inference/__init__.py +0 -2
- gradientai/types/inference/api_key_list_response.py +2 -2
- gradientai/types/knowledge_base_list_response.py +2 -2
- gradientai/types/knowledge_bases/__init__.py +12 -0
- gradientai/types/{indexing_job_retrieve_data_sources_response.py → knowledge_bases/api_indexed_data_source.py} +4 -8
- gradientai/types/{api_indexing_job.py → knowledge_bases/api_indexing_job.py} +13 -1
- gradientai/types/knowledge_bases/api_knowledge_base_data_source.py +4 -1
- gradientai/types/knowledge_bases/data_source_list_response.py +2 -2
- gradientai/types/{indexing_job_create_response.py → knowledge_bases/indexing_job_create_response.py} +1 -1
- gradientai/types/{indexing_job_list_response.py → knowledge_bases/indexing_job_list_response.py} +3 -3
- gradientai/types/knowledge_bases/indexing_job_retrieve_data_sources_response.py +12 -0
- gradientai/types/{indexing_job_retrieve_response.py → knowledge_bases/indexing_job_retrieve_response.py} +1 -1
- gradientai/types/{indexing_job_update_cancel_params.py → knowledge_bases/indexing_job_update_cancel_params.py} +1 -1
- gradientai/types/{indexing_job_update_cancel_response.py → knowledge_bases/indexing_job_update_cancel_response.py} +1 -1
- gradientai/types/{inference/model.py → model.py} +1 -1
- gradientai/types/model_list_response.py +5 -8
- gradientai/types/{providers → model_providers}/anthropic/key_list_agents_response.py +2 -2
- gradientai/types/{providers → model_providers}/anthropic/key_list_response.py +2 -2
- gradientai/types/{providers → model_providers}/openai/key_list_response.py +2 -2
- gradientai/types/{providers → model_providers}/openai/key_retrieve_agents_response.py +2 -2
- gradientai/types/shared/__init__.py +4 -0
- c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info/RECORD +0 -217
- gradientai/resources/inference/models.py +0 -226
- gradientai/resources/regions/__init__.py +0 -61
- gradientai/resources/regions/evaluation_runs/__init__.py +0 -33
- gradientai/resources/regions/evaluation_runs/results.py +0 -264
- gradientai/resources/regions/regions.py +0 -352
- gradientai/types/api_model.py +0 -32
- gradientai/types/inference/model_list_response.py +0 -15
- gradientai/types/model_list_params.py +0 -42
- gradientai/types/regions/__init__.py +0 -32
- gradientai/types/regions/evaluation_runs/__init__.py +0 -9
- gradientai/types/regions/evaluation_runs/result_retrieve_prompt_response.py +0 -12
- {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
- {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
- /gradientai/resources/{providers → model_providers}/anthropic/__init__.py +0 -0
- /gradientai/resources/{providers → model_providers}/anthropic/anthropic.py +0 -0
- /gradientai/resources/{providers → model_providers}/openai/__init__.py +0 -0
- /gradientai/resources/{providers → model_providers}/openai/openai.py +0 -0
- /gradientai/types/{regions → agents}/api_star_metric.py +0 -0
- /gradientai/types/{regions → agents}/api_star_metric_param.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_dataset_create_file_upload_presigned_urls_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_dataset_create_file_upload_presigned_urls_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_dataset_create_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_dataset_create_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_create_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_create_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_list_evaluation_runs_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_list_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_retrieve_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_update_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_update_response.py +0 -0
- /gradientai/types/{indexing_job_create_params.py → knowledge_bases/indexing_job_create_params.py} +0 -0
- /gradientai/types/{indexing_job_list_params.py → knowledge_bases/indexing_job_list_params.py} +0 -0
- /gradientai/types/{providers → model_providers}/__init__.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/__init__.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_create_params.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_create_response.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_delete_response.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_list_agents_params.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_list_params.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_retrieve_response.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_update_params.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_update_response.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/__init__.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_create_params.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_create_response.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_delete_response.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_list_params.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_retrieve_agents_params.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_retrieve_response.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_update_params.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_update_response.py +0 -0
- /gradientai/types/{agents → shared}/api_links.py +0 -0
- /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
|
99
|
-
return
|
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
|
467
|
-
return
|
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
|
857
|
-
return
|
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
|
901
|
-
return
|
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
|
945
|
-
return
|
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
|
989
|
-
return
|
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.
|
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.
|
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.
|
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
|
+
]
|