arize 8.0.1__tar.gz → 8.0.2__tar.gz
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.
- {arize-8.0.1 → arize-8.0.2}/PKG-INFO +1 -1
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/__init__.py +6 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/api/__init__.py +1 -0
- arize-8.0.2/src/arize/_generated/api_client/api/prompts_api.py +349 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/__init__.py +2 -0
- arize-8.0.2/src/arize/_generated/api_client/models/prompt.py +112 -0
- arize-8.0.2/src/arize/_generated/api_client/models/prompts_list200_response.py +106 -0
- arize-8.0.2/src/arize/_generated/api_client/test/test_prompt.py +66 -0
- arize-8.0.2/src/arize/_generated/api_client/test/test_prompts_api.py +38 -0
- arize-8.0.2/src/arize/_generated/api_client/test/test_prompts_list200_response.py +82 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client_README.md +3 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/version.py +1 -1
- {arize-8.0.1 → arize-8.0.2}/.gitignore +0 -0
- {arize-8.0.1 → arize-8.0.2}/LICENSE +0 -0
- {arize-8.0.1 → arize-8.0.2}/NOTICE +0 -0
- {arize-8.0.1 → arize-8.0.2}/README.md +0 -0
- {arize-8.0.1 → arize-8.0.2}/pyproject.toml +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_client_factory.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_exporter/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_exporter/client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_exporter/parsers/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_exporter/parsers/tracing_data_parser.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_exporter/validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_flight/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_flight/client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_flight/types.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/api/datasets_api.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/api/experiments_api.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/api/projects_api.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/api_client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/api_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/configuration.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/exceptions.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/dataset.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/dataset_example.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/dataset_example_update.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/dataset_version.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/datasets_create_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/datasets_examples_insert_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/datasets_examples_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/datasets_examples_update_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/datasets_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/experiment.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/experiment_run.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/experiment_run_create.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/experiments_create_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/experiments_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/experiments_runs_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/pagination_metadata.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/problem.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/project.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/projects_create_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/models/projects_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/rest.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_dataset.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_dataset_example.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_dataset_example_update.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_dataset_version.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_datasets_api.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_datasets_create_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_datasets_examples_insert_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_datasets_examples_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_datasets_examples_update_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_datasets_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_experiment.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_experiment_run.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_experiment_run_create.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_experiments_api.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_experiments_create_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_experiments_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_experiments_runs_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_pagination_metadata.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_problem.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_project.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_projects_api.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_projects_create_request.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/api_client/test/test_projects_list200_response.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/protocol/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/protocol/flight/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/protocol/flight/flight_pb2.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/protocol/rec/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_generated/protocol/rec/public_pb2.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/_lazy.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/config.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/constants/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/constants/config.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/constants/ml.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/constants/model_mapping.json +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/constants/openinference.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/constants/pyarrow.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/constants/spans.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/datasets/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/datasets/client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/datasets/errors.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/datasets/validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/auto_generator.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/base_generators.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/constants.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/cv_generators.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/errors.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/nlp_generators.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/tabular_generators.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/embeddings/usecases.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/auth.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/base.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/config.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/models.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/parameters.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/spaces.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/types.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/exceptions/values.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/evaluators/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/evaluators/base.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/evaluators/exceptions.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/evaluators/executors.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/evaluators/rate_limiters.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/evaluators/types.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/evaluators/utils.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/functions.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/tracing.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/experiments/types.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/logging.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/batch_validation/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/batch_validation/errors.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/batch_validation/validator.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/bounded_executor.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/casting.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/proto.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/stream_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/surrogate_explainer/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/surrogate_explainer/mimic.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/ml/types.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/pre_releases.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/projects/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/projects/client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/py.typed +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/regions.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/client.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/columns.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/conversion.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/annotations/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/annotations/annotations_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/annotations/dataframe_form_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/annotations/value_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/common/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/common/argument_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/common/dataframe_form_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/common/errors.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/common/value_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/evals/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/evals/dataframe_form_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/evals/evals_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/evals/value_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/metadata/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/metadata/argument_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/metadata/dataframe_form_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/metadata/value_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/spans/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/spans/dataframe_form_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/spans/spans_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/spans/validation/spans/value_validation.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/arrow.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/cache.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/dataframe.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/online_tasks/__init__.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/online_tasks/dataframe_preprocessor.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/openinference_conversion.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/proto.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/size.py +0 -0
- {arize-8.0.1 → arize-8.0.2}/src/arize/utils/types.py +0 -0
|
@@ -21,6 +21,7 @@ __all__ = [
|
|
|
21
21
|
"DatasetsApi",
|
|
22
22
|
"ExperimentsApi",
|
|
23
23
|
"ProjectsApi",
|
|
24
|
+
"PromptsApi",
|
|
24
25
|
"ApiResponse",
|
|
25
26
|
"ApiClient",
|
|
26
27
|
"Configuration",
|
|
@@ -50,12 +51,15 @@ __all__ = [
|
|
|
50
51
|
"Project",
|
|
51
52
|
"ProjectsCreateRequest",
|
|
52
53
|
"ProjectsList200Response",
|
|
54
|
+
"Prompt",
|
|
55
|
+
"PromptsList200Response",
|
|
53
56
|
]
|
|
54
57
|
|
|
55
58
|
# import apis into sdk package
|
|
56
59
|
from arize._generated.api_client.api.datasets_api import DatasetsApi as DatasetsApi
|
|
57
60
|
from arize._generated.api_client.api.experiments_api import ExperimentsApi as ExperimentsApi
|
|
58
61
|
from arize._generated.api_client.api.projects_api import ProjectsApi as ProjectsApi
|
|
62
|
+
from arize._generated.api_client.api.prompts_api import PromptsApi as PromptsApi
|
|
59
63
|
|
|
60
64
|
# import ApiClient
|
|
61
65
|
from arize._generated.api_client.api_response import ApiResponse as ApiResponse
|
|
@@ -89,4 +93,6 @@ from arize._generated.api_client.models.problem import Problem as Problem
|
|
|
89
93
|
from arize._generated.api_client.models.project import Project as Project
|
|
90
94
|
from arize._generated.api_client.models.projects_create_request import ProjectsCreateRequest as ProjectsCreateRequest
|
|
91
95
|
from arize._generated.api_client.models.projects_list200_response import ProjectsList200Response as ProjectsList200Response
|
|
96
|
+
from arize._generated.api_client.models.prompt import Prompt as Prompt
|
|
97
|
+
from arize._generated.api_client.models.prompts_list200_response import PromptsList200Response as PromptsList200Response
|
|
92
98
|
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
from arize._generated.api_client.api.datasets_api import DatasetsApi
|
|
5
5
|
from arize._generated.api_client.api.experiments_api import ExperimentsApi
|
|
6
6
|
from arize._generated.api_client.api.projects_api import ProjectsApi
|
|
7
|
+
from arize._generated.api_client.api.prompts_api import PromptsApi
|
|
7
8
|
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arize REST API
|
|
5
|
+
|
|
6
|
+
API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from arize._generated.api_client.models.prompts_list200_response import PromptsList200Response
|
|
23
|
+
|
|
24
|
+
from arize._generated.api_client.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from arize._generated.api_client.api_response import ApiResponse
|
|
26
|
+
from arize._generated.api_client.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class PromptsApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def prompts_list(
|
|
44
|
+
self,
|
|
45
|
+
space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
|
|
46
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
47
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> PromptsList200Response:
|
|
61
|
+
"""List prompts
|
|
62
|
+
|
|
63
|
+
List prompts the user has access to. The prompts are sorted by update date, with the most recently updated prompts coming first. <Warning>This endpoint is in alpha, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Warning>
|
|
64
|
+
|
|
65
|
+
:param space_id: Filter search results to a particular space ID
|
|
66
|
+
:type space_id: str
|
|
67
|
+
:param limit: Maximum items to return
|
|
68
|
+
:type limit: int
|
|
69
|
+
:param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
|
|
70
|
+
:type cursor: str
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._prompts_list_serialize(
|
|
94
|
+
space_id=space_id,
|
|
95
|
+
limit=limit,
|
|
96
|
+
cursor=cursor,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'200': "PromptsList200Response",
|
|
105
|
+
'400': "Problem",
|
|
106
|
+
'401': "Problem",
|
|
107
|
+
'403': "Problem",
|
|
108
|
+
'429': "Problem",
|
|
109
|
+
}
|
|
110
|
+
response_data = self.api_client.call_api(
|
|
111
|
+
*_param,
|
|
112
|
+
_request_timeout=_request_timeout
|
|
113
|
+
)
|
|
114
|
+
response_data.read()
|
|
115
|
+
return self.api_client.response_deserialize(
|
|
116
|
+
response_data=response_data,
|
|
117
|
+
response_types_map=_response_types_map,
|
|
118
|
+
).data
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@validate_call
|
|
122
|
+
def prompts_list_with_http_info(
|
|
123
|
+
self,
|
|
124
|
+
space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
|
|
125
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
126
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
|
|
127
|
+
_request_timeout: Union[
|
|
128
|
+
None,
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Tuple[
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
133
|
+
]
|
|
134
|
+
] = None,
|
|
135
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_content_type: Optional[StrictStr] = None,
|
|
137
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
138
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
139
|
+
) -> ApiResponse[PromptsList200Response]:
|
|
140
|
+
"""List prompts
|
|
141
|
+
|
|
142
|
+
List prompts the user has access to. The prompts are sorted by update date, with the most recently updated prompts coming first. <Warning>This endpoint is in alpha, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Warning>
|
|
143
|
+
|
|
144
|
+
:param space_id: Filter search results to a particular space ID
|
|
145
|
+
:type space_id: str
|
|
146
|
+
:param limit: Maximum items to return
|
|
147
|
+
:type limit: int
|
|
148
|
+
:param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
|
|
149
|
+
:type cursor: str
|
|
150
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
151
|
+
number provided, it will be total request
|
|
152
|
+
timeout. It can also be a pair (tuple) of
|
|
153
|
+
(connection, read) timeouts.
|
|
154
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
155
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
156
|
+
request; this effectively ignores the
|
|
157
|
+
authentication in the spec for a single request.
|
|
158
|
+
:type _request_auth: dict, optional
|
|
159
|
+
:param _content_type: force content-type for the request.
|
|
160
|
+
:type _content_type: str, Optional
|
|
161
|
+
:param _headers: set to override the headers for a single
|
|
162
|
+
request; this effectively ignores the headers
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _headers: dict, optional
|
|
165
|
+
:param _host_index: set to override the host_index for a single
|
|
166
|
+
request; this effectively ignores the host_index
|
|
167
|
+
in the spec for a single request.
|
|
168
|
+
:type _host_index: int, optional
|
|
169
|
+
:return: Returns the result object.
|
|
170
|
+
""" # noqa: E501
|
|
171
|
+
|
|
172
|
+
_param = self._prompts_list_serialize(
|
|
173
|
+
space_id=space_id,
|
|
174
|
+
limit=limit,
|
|
175
|
+
cursor=cursor,
|
|
176
|
+
_request_auth=_request_auth,
|
|
177
|
+
_content_type=_content_type,
|
|
178
|
+
_headers=_headers,
|
|
179
|
+
_host_index=_host_index
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
183
|
+
'200': "PromptsList200Response",
|
|
184
|
+
'400': "Problem",
|
|
185
|
+
'401': "Problem",
|
|
186
|
+
'403': "Problem",
|
|
187
|
+
'429': "Problem",
|
|
188
|
+
}
|
|
189
|
+
response_data = self.api_client.call_api(
|
|
190
|
+
*_param,
|
|
191
|
+
_request_timeout=_request_timeout
|
|
192
|
+
)
|
|
193
|
+
response_data.read()
|
|
194
|
+
return self.api_client.response_deserialize(
|
|
195
|
+
response_data=response_data,
|
|
196
|
+
response_types_map=_response_types_map,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
@validate_call
|
|
201
|
+
def prompts_list_without_preload_content(
|
|
202
|
+
self,
|
|
203
|
+
space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
|
|
204
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
205
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
|
|
206
|
+
_request_timeout: Union[
|
|
207
|
+
None,
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
209
|
+
Tuple[
|
|
210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
211
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
212
|
+
]
|
|
213
|
+
] = None,
|
|
214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
215
|
+
_content_type: Optional[StrictStr] = None,
|
|
216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
218
|
+
) -> RESTResponseType:
|
|
219
|
+
"""List prompts
|
|
220
|
+
|
|
221
|
+
List prompts the user has access to. The prompts are sorted by update date, with the most recently updated prompts coming first. <Warning>This endpoint is in alpha, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Warning>
|
|
222
|
+
|
|
223
|
+
:param space_id: Filter search results to a particular space ID
|
|
224
|
+
:type space_id: str
|
|
225
|
+
:param limit: Maximum items to return
|
|
226
|
+
:type limit: int
|
|
227
|
+
:param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
|
|
228
|
+
:type cursor: str
|
|
229
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
230
|
+
number provided, it will be total request
|
|
231
|
+
timeout. It can also be a pair (tuple) of
|
|
232
|
+
(connection, read) timeouts.
|
|
233
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
234
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
235
|
+
request; this effectively ignores the
|
|
236
|
+
authentication in the spec for a single request.
|
|
237
|
+
:type _request_auth: dict, optional
|
|
238
|
+
:param _content_type: force content-type for the request.
|
|
239
|
+
:type _content_type: str, Optional
|
|
240
|
+
:param _headers: set to override the headers for a single
|
|
241
|
+
request; this effectively ignores the headers
|
|
242
|
+
in the spec for a single request.
|
|
243
|
+
:type _headers: dict, optional
|
|
244
|
+
:param _host_index: set to override the host_index for a single
|
|
245
|
+
request; this effectively ignores the host_index
|
|
246
|
+
in the spec for a single request.
|
|
247
|
+
:type _host_index: int, optional
|
|
248
|
+
:return: Returns the result object.
|
|
249
|
+
""" # noqa: E501
|
|
250
|
+
|
|
251
|
+
_param = self._prompts_list_serialize(
|
|
252
|
+
space_id=space_id,
|
|
253
|
+
limit=limit,
|
|
254
|
+
cursor=cursor,
|
|
255
|
+
_request_auth=_request_auth,
|
|
256
|
+
_content_type=_content_type,
|
|
257
|
+
_headers=_headers,
|
|
258
|
+
_host_index=_host_index
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
262
|
+
'200': "PromptsList200Response",
|
|
263
|
+
'400': "Problem",
|
|
264
|
+
'401': "Problem",
|
|
265
|
+
'403': "Problem",
|
|
266
|
+
'429': "Problem",
|
|
267
|
+
}
|
|
268
|
+
response_data = self.api_client.call_api(
|
|
269
|
+
*_param,
|
|
270
|
+
_request_timeout=_request_timeout
|
|
271
|
+
)
|
|
272
|
+
return response_data.response
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def _prompts_list_serialize(
|
|
276
|
+
self,
|
|
277
|
+
space_id,
|
|
278
|
+
limit,
|
|
279
|
+
cursor,
|
|
280
|
+
_request_auth,
|
|
281
|
+
_content_type,
|
|
282
|
+
_headers,
|
|
283
|
+
_host_index,
|
|
284
|
+
) -> RequestSerialized:
|
|
285
|
+
|
|
286
|
+
_host = None
|
|
287
|
+
|
|
288
|
+
_collection_formats: Dict[str, str] = {
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
_path_params: Dict[str, str] = {}
|
|
292
|
+
_query_params: List[Tuple[str, str]] = []
|
|
293
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
294
|
+
_form_params: List[Tuple[str, str]] = []
|
|
295
|
+
_files: Dict[
|
|
296
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
297
|
+
] = {}
|
|
298
|
+
_body_params: Optional[bytes] = None
|
|
299
|
+
|
|
300
|
+
# process the path parameters
|
|
301
|
+
# process the query parameters
|
|
302
|
+
if space_id is not None:
|
|
303
|
+
|
|
304
|
+
_query_params.append(('space_id', space_id))
|
|
305
|
+
|
|
306
|
+
if limit is not None:
|
|
307
|
+
|
|
308
|
+
_query_params.append(('limit', limit))
|
|
309
|
+
|
|
310
|
+
if cursor is not None:
|
|
311
|
+
|
|
312
|
+
_query_params.append(('cursor', cursor))
|
|
313
|
+
|
|
314
|
+
# process the header parameters
|
|
315
|
+
# process the form parameters
|
|
316
|
+
# process the body parameter
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
# set the HTTP header `Accept`
|
|
320
|
+
if 'Accept' not in _header_params:
|
|
321
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
322
|
+
[
|
|
323
|
+
'application/json',
|
|
324
|
+
'application/problem+json'
|
|
325
|
+
]
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
# authentication setting
|
|
330
|
+
_auth_settings: List[str] = [
|
|
331
|
+
'bearerAuth'
|
|
332
|
+
]
|
|
333
|
+
|
|
334
|
+
return self.api_client.param_serialize(
|
|
335
|
+
method='GET',
|
|
336
|
+
resource_path='/v2/prompts',
|
|
337
|
+
path_params=_path_params,
|
|
338
|
+
query_params=_query_params,
|
|
339
|
+
header_params=_header_params,
|
|
340
|
+
body=_body_params,
|
|
341
|
+
post_params=_form_params,
|
|
342
|
+
files=_files,
|
|
343
|
+
auth_settings=_auth_settings,
|
|
344
|
+
collection_formats=_collection_formats,
|
|
345
|
+
_host=_host,
|
|
346
|
+
_request_auth=_request_auth
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
|
|
@@ -33,4 +33,6 @@ from arize._generated.api_client.models.problem import Problem
|
|
|
33
33
|
from arize._generated.api_client.models.project import Project
|
|
34
34
|
from arize._generated.api_client.models.projects_create_request import ProjectsCreateRequest
|
|
35
35
|
from arize._generated.api_client.models.projects_list200_response import ProjectsList200Response
|
|
36
|
+
from arize._generated.api_client.models.prompt import Prompt
|
|
37
|
+
from arize._generated.api_client.models.prompts_list200_response import PromptsList200Response
|
|
36
38
|
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arize REST API
|
|
5
|
+
|
|
6
|
+
API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class Prompt(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A prompt is a reusable template for LLM interactions. Prompts can be versioned and labeled to track changes over time. Use prompts to standardize how you interact with LLMs across your application.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
id: StrictStr = Field(description="The prompt ID")
|
|
31
|
+
name: StrictStr = Field(description="The prompt name")
|
|
32
|
+
description: Optional[StrictStr] = Field(default=None, description="The prompt description")
|
|
33
|
+
space_id: StrictStr = Field(description="The space ID the prompt belongs to")
|
|
34
|
+
created_at: datetime = Field(description="When the prompt was created")
|
|
35
|
+
updated_at: datetime = Field(description="When the prompt was last updated")
|
|
36
|
+
created_by_user_id: StrictStr = Field(description="The user ID of the user who created the prompt")
|
|
37
|
+
tags: Optional[List[StrictStr]] = Field(default=None, description="The tags associated with the prompt")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "name", "description", "space_id", "created_at", "updated_at", "created_by_user_id", "tags"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of Prompt from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# set to None if description (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.description is None and "description" in self.model_fields_set:
|
|
82
|
+
_dict['description'] = None
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of Prompt from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
# raise errors for additional fields in the input
|
|
96
|
+
for _key in obj.keys():
|
|
97
|
+
if _key not in cls.__properties:
|
|
98
|
+
raise ValueError("Error due to additional fields (not defined in Prompt) in the input: " + _key)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"id": obj.get("id"),
|
|
102
|
+
"name": obj.get("name"),
|
|
103
|
+
"description": obj.get("description"),
|
|
104
|
+
"space_id": obj.get("space_id"),
|
|
105
|
+
"created_at": obj.get("created_at"),
|
|
106
|
+
"updated_at": obj.get("updated_at"),
|
|
107
|
+
"created_by_user_id": obj.get("created_by_user_id"),
|
|
108
|
+
"tags": obj.get("tags")
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arize REST API
|
|
5
|
+
|
|
6
|
+
API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from arize._generated.api_client.models.pagination_metadata import PaginationMetadata
|
|
23
|
+
from arize._generated.api_client.models.prompt import Prompt
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PromptsList200Response(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PromptsList200Response
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
prompts: List[Prompt] = Field(description="A list of prompts")
|
|
32
|
+
pagination: PaginationMetadata
|
|
33
|
+
__properties: ClassVar[List[str]] = ["prompts", "pagination"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of PromptsList200Response from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in prompts (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.prompts:
|
|
77
|
+
for _item_prompts in self.prompts:
|
|
78
|
+
if _item_prompts:
|
|
79
|
+
_items.append(_item_prompts.to_dict())
|
|
80
|
+
_dict['prompts'] = _items
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of pagination
|
|
82
|
+
if self.pagination:
|
|
83
|
+
_dict['pagination'] = self.pagination.to_dict()
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of PromptsList200Response from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
# raise errors for additional fields in the input
|
|
96
|
+
for _key in obj.keys():
|
|
97
|
+
if _key not in cls.__properties:
|
|
98
|
+
raise ValueError("Error due to additional fields (not defined in PromptsList200Response) in the input: " + _key)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"prompts": [Prompt.from_dict(_item) for _item in obj["prompts"]] if obj.get("prompts") is not None else None,
|
|
102
|
+
"pagination": PaginationMetadata.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None
|
|
103
|
+
})
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arize REST API
|
|
5
|
+
|
|
6
|
+
API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from arize._generated.api_client.models.prompt import Prompt
|
|
18
|
+
|
|
19
|
+
class TestPrompt(unittest.TestCase):
|
|
20
|
+
"""Prompt unit test stubs"""
|
|
21
|
+
|
|
22
|
+
def setUp(self):
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
def tearDown(self):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
def make_instance(self, include_optional) -> Prompt:
|
|
29
|
+
"""Test Prompt
|
|
30
|
+
include_optional is a boolean, when False only required
|
|
31
|
+
params are included, when True both required and
|
|
32
|
+
optional params are included """
|
|
33
|
+
# uncomment below to create an instance of `Prompt`
|
|
34
|
+
"""
|
|
35
|
+
model = Prompt()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return Prompt(
|
|
38
|
+
id = '',
|
|
39
|
+
name = '',
|
|
40
|
+
description = '',
|
|
41
|
+
space_id = '',
|
|
42
|
+
created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
|
|
43
|
+
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
|
|
44
|
+
created_by_user_id = '',
|
|
45
|
+
tags = [
|
|
46
|
+
''
|
|
47
|
+
]
|
|
48
|
+
)
|
|
49
|
+
else:
|
|
50
|
+
return Prompt(
|
|
51
|
+
id = '',
|
|
52
|
+
name = '',
|
|
53
|
+
space_id = '',
|
|
54
|
+
created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
|
|
55
|
+
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
|
|
56
|
+
created_by_user_id = '',
|
|
57
|
+
)
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
def testPrompt(self):
|
|
61
|
+
"""Test Prompt"""
|
|
62
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
63
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
64
|
+
|
|
65
|
+
if __name__ == '__main__':
|
|
66
|
+
unittest.main()
|