mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
Regenerate: the AI surface says what it answers
288 of hanzoai/ai's 294 operations now declare a response, against 1 before. GET /v1/models, POST /v1/chat/completions, /v1/embeddings, /v1/messages — every address a client actually calls — used to reach this client untyped, because cloud's relay carried an operation's sentence and dropped the shapes it named. It carries both now. Fleet-wide the document goes from 69% to 81% of operations declaring what comes back, which is where the ~208 new models here come from.
This commit is contained in:
+208
-17
@@ -28,7 +28,6 @@ pkg/hanzoai/cloud/api/company_api.py
|
||||
pkg/hanzoai/cloud/api/compliance_api.py
|
||||
pkg/hanzoai/cloud/api/content_api.py
|
||||
pkg/hanzoai/cloud/api/crawl_api.py
|
||||
pkg/hanzoai/cloud/api/crm_api.py
|
||||
pkg/hanzoai/cloud/api/dataroom_api.py
|
||||
pkg/hanzoai/cloud/api/dataset_api.py
|
||||
pkg/hanzoai/cloud/api/deploy_api.py
|
||||
@@ -138,6 +137,7 @@ pkg/hanzoai/cloud/models/action_record.py
|
||||
pkg/hanzoai/cloud/models/actions_view.py
|
||||
pkg/hanzoai/cloud/models/activation_req.py
|
||||
pkg/hanzoai/cloud/models/activation_set.py
|
||||
pkg/hanzoai/cloud/models/activity.py
|
||||
pkg/hanzoai/cloud/models/activity_feed.py
|
||||
pkg/hanzoai/cloud/models/activity_out.py
|
||||
pkg/hanzoai/cloud/models/activity_point.py
|
||||
@@ -157,10 +157,53 @@ pkg/hanzoai/cloud/models/affiliate_standing.py
|
||||
pkg/hanzoai/cloud/models/agent_binding.py
|
||||
pkg/hanzoai/cloud/models/agent_detail.py
|
||||
pkg/hanzoai/cloud/models/agent_list.py
|
||||
pkg/hanzoai/cloud/models/agent_mcp_tools.py
|
||||
pkg/hanzoai/cloud/models/agent_run_view.py
|
||||
pkg/hanzoai/cloud/models/agent_view.py
|
||||
pkg/hanzoai/cloud/models/ai_ai_conn_response.py
|
||||
pkg/hanzoai/cloud/models/ai_anthropic_content_block.py
|
||||
pkg/hanzoai/cloud/models/ai_anthropic_response.py
|
||||
pkg/hanzoai/cloud/models/ai_anthropic_usage.py
|
||||
pkg/hanzoai/cloud/models/ai_cost_stats.py
|
||||
pkg/hanzoai/cloud/models/ai_history_day.py
|
||||
pkg/hanzoai/cloud/models/ai_history_retrain.py
|
||||
pkg/hanzoai/cloud/models/ai_history_totals.py
|
||||
pkg/hanzoai/cloud/models/ai_history_window.py
|
||||
pkg/hanzoai/cloud/models/ai_judge_benchmark.py
|
||||
pkg/hanzoai/cloud/models/ai_judge_panel_state.py
|
||||
pkg/hanzoai/cloud/models/ai_mcp_app.py
|
||||
pkg/hanzoai/cloud/models/ai_mcp_surface.py
|
||||
pkg/hanzoai/cloud/models/ai_model_access_info.py
|
||||
pkg/hanzoai/cloud/models/ai_model_info.py
|
||||
pkg/hanzoai/cloud/models/ai_model_list.py
|
||||
pkg/hanzoai/cloud/models/ai_model_pricing_info.py
|
||||
pkg/hanzoai/cloud/models/ai_model_providers.py
|
||||
pkg/hanzoai/cloud/models/ai_panel_judge.py
|
||||
pkg/hanzoai/cloud/models/ai_provider_usage.py
|
||||
pkg/hanzoai/cloud/models/ai_provider_usage_model_spend.py
|
||||
pkg/hanzoai/cloud/models/ai_provider_usage_series_point.py
|
||||
pkg/hanzoai/cloud/models/ai_provider_usage_totals.py
|
||||
pkg/hanzoai/cloud/models/ai_quality_stats.py
|
||||
pkg/hanzoai/cloud/models/ai_rank_usage.py
|
||||
pkg/hanzoai/cloud/models/ai_ranked_doc.py
|
||||
pkg/hanzoai/cloud/models/ai_ranked_text.py
|
||||
pkg/hanzoai/cloud/models/ai_ranking.py
|
||||
pkg/hanzoai/cloud/models/ai_response.py
|
||||
pkg/hanzoai/cloud/models/ai_responses_input_details.py
|
||||
pkg/hanzoai/cloud/models/ai_responses_output_details.py
|
||||
pkg/hanzoai/cloud/models/ai_responses_resource.py
|
||||
pkg/hanzoai/cloud/models/ai_responses_tool.py
|
||||
pkg/hanzoai/cloud/models/ai_responses_usage.py
|
||||
pkg/hanzoai/cloud/models/ai_retrain_meta.py
|
||||
pkg/hanzoai/cloud/models/ai_router_history.py
|
||||
pkg/hanzoai/cloud/models/ai_router_stats.py
|
||||
pkg/hanzoai/cloud/models/ai_routing_reward_result.py
|
||||
pkg/hanzoai/cloud/models/ai_stats_window.py
|
||||
pkg/hanzoai/cloud/models/ai_task_stats.py
|
||||
pkg/hanzoai/cloud/models/ai_throughput_stats.py
|
||||
pkg/hanzoai/cloud/models/ai_token_count.py
|
||||
pkg/hanzoai/cloud/models/ai_video_failure.py
|
||||
pkg/hanzoai/cloud/models/ai_video_status.py
|
||||
pkg/hanzoai/cloud/models/alert.py
|
||||
pkg/hanzoai/cloud/models/alert_patch.py
|
||||
pkg/hanzoai/cloud/models/alert_spec.py
|
||||
@@ -173,10 +216,13 @@ pkg/hanzoai/cloud/models/analyze_query.py
|
||||
pkg/hanzoai/cloud/models/answer.py
|
||||
pkg/hanzoai/cloud/models/api_key.py
|
||||
pkg/hanzoai/cloud/models/api_key_list.py
|
||||
pkg/hanzoai/cloud/models/app.py
|
||||
pkg/hanzoai/cloud/models/app_view.py
|
||||
pkg/hanzoai/cloud/models/appearance.py
|
||||
pkg/hanzoai/cloud/models/application.py
|
||||
pkg/hanzoai/cloud/models/application_list.py
|
||||
pkg/hanzoai/cloud/models/application_config_option.py
|
||||
pkg/hanzoai/cloud/models/application_event.py
|
||||
pkg/hanzoai/cloud/models/application_view.py
|
||||
pkg/hanzoai/cloud/models/applied_resource.py
|
||||
pkg/hanzoai/cloud/models/apply_request.py
|
||||
pkg/hanzoai/cloud/models/approve_pairing_in.py
|
||||
@@ -207,16 +253,19 @@ pkg/hanzoai/cloud/models/argo_sync_status.py
|
||||
pkg/hanzoai/cloud/models/argo_sync_windows.py
|
||||
pkg/hanzoai/cloud/models/argo_tree.py
|
||||
pkg/hanzoai/cloud/models/arm.py
|
||||
pkg/hanzoai/cloud/models/article.py
|
||||
pkg/hanzoai/cloud/models/ask_answer.py
|
||||
pkg/hanzoai/cloud/models/ask_post_in.py
|
||||
pkg/hanzoai/cloud/models/ask_request.py
|
||||
pkg/hanzoai/cloud/models/ask_response.py
|
||||
pkg/hanzoai/cloud/models/asset.py
|
||||
pkg/hanzoai/cloud/models/assignment.py
|
||||
pkg/hanzoai/cloud/models/attribute_request.py
|
||||
pkg/hanzoai/cloud/models/attribution.py
|
||||
pkg/hanzoai/cloud/models/audience.py
|
||||
pkg/hanzoai/cloud/models/audience_list.py
|
||||
pkg/hanzoai/cloud/models/audience_preview.py
|
||||
pkg/hanzoai/cloud/models/audit.py
|
||||
pkg/hanzoai/cloud/models/audit_list.py
|
||||
pkg/hanzoai/cloud/models/author_repo.py
|
||||
pkg/hanzoai/cloud/models/authored_plugin.py
|
||||
@@ -243,6 +292,7 @@ pkg/hanzoai/cloud/models/bind_agent_req.py
|
||||
pkg/hanzoai/cloud/models/binding_list.py
|
||||
pkg/hanzoai/cloud/models/blob.py
|
||||
pkg/hanzoai/cloud/models/blob_json.py
|
||||
pkg/hanzoai/cloud/models/block.py
|
||||
pkg/hanzoai/cloud/models/blog.py
|
||||
pkg/hanzoai/cloud/models/blueprint.py
|
||||
pkg/hanzoai/cloud/models/blueprint_counts.py
|
||||
@@ -306,6 +356,7 @@ pkg/hanzoai/cloud/models/campaign_results.py
|
||||
pkg/hanzoai/cloud/models/campaign_summary.py
|
||||
pkg/hanzoai/cloud/models/campaign_update.py
|
||||
pkg/hanzoai/cloud/models/campaign_write.py
|
||||
pkg/hanzoai/cloud/models/candidate.py
|
||||
pkg/hanzoai/cloud/models/cap_verdict.py
|
||||
pkg/hanzoai/cloud/models/capabilities.py
|
||||
pkg/hanzoai/cloud/models/capability.py
|
||||
@@ -386,6 +437,7 @@ pkg/hanzoai/cloud/models/channel_spec.py
|
||||
pkg/hanzoai/cloud/models/channel_view.py
|
||||
pkg/hanzoai/cloud/models/charge.py
|
||||
pkg/hanzoai/cloud/models/charged.py
|
||||
pkg/hanzoai/cloud/models/chat.py
|
||||
pkg/hanzoai/cloud/models/chat_channels.py
|
||||
pkg/hanzoai/cloud/models/chat_request.py
|
||||
pkg/hanzoai/cloud/models/chat_response.py
|
||||
@@ -408,6 +460,7 @@ pkg/hanzoai/cloud/models/cluster_attach.py
|
||||
pkg/hanzoai/cloud/models/cluster_detached.py
|
||||
pkg/hanzoai/cloud/models/cluster_detail_view.py
|
||||
pkg/hanzoai/cloud/models/cluster_list.py
|
||||
pkg/hanzoai/cloud/models/cluster_serving.py
|
||||
pkg/hanzoai/cloud/models/cluster_view.py
|
||||
pkg/hanzoai/cloud/models/code_file.py
|
||||
pkg/hanzoai/cloud/models/code_result.py
|
||||
@@ -422,15 +475,13 @@ pkg/hanzoai/cloud/models/collected.py
|
||||
pkg/hanzoai/cloud/models/commerce_overview.py
|
||||
pkg/hanzoai/cloud/models/commit_json.py
|
||||
pkg/hanzoai/cloud/models/commits_json.py
|
||||
pkg/hanzoai/cloud/models/company.py
|
||||
pkg/hanzoai/cloud/models/company_list.py
|
||||
pkg/hanzoai/cloud/models/company_req.py
|
||||
pkg/hanzoai/cloud/models/completion.py
|
||||
pkg/hanzoai/cloud/models/config.py
|
||||
pkg/hanzoai/cloud/models/conn_view.py
|
||||
pkg/hanzoai/cloud/models/connect_in.py
|
||||
pkg/hanzoai/cloud/models/connect_out.py
|
||||
pkg/hanzoai/cloud/models/connect_request.py
|
||||
pkg/hanzoai/cloud/models/connection.py
|
||||
pkg/hanzoai/cloud/models/connection_out.py
|
||||
pkg/hanzoai/cloud/models/connection_view.py
|
||||
pkg/hanzoai/cloud/models/connector_action.py
|
||||
@@ -447,10 +498,8 @@ pkg/hanzoai/cloud/models/console_settings_dex_config.py
|
||||
pkg/hanzoai/cloud/models/console_settings_google_analytics.py
|
||||
pkg/hanzoai/cloud/models/console_settings_help.py
|
||||
pkg/hanzoai/cloud/models/consumer.py
|
||||
pkg/hanzoai/cloud/models/contact.py
|
||||
pkg/hanzoai/cloud/models/contact_list.py
|
||||
pkg/hanzoai/cloud/models/contact_req.py
|
||||
pkg/hanzoai/cloud/models/contacts.py
|
||||
pkg/hanzoai/cloud/models/container_detail.py
|
||||
pkg/hanzoai/cloud/models/context_bundle.py
|
||||
pkg/hanzoai/cloud/models/context_in.py
|
||||
pkg/hanzoai/cloud/models/control_command_view.py
|
||||
@@ -461,6 +510,7 @@ pkg/hanzoai/cloud/models/control_result.py
|
||||
pkg/hanzoai/cloud/models/cookie_ack.py
|
||||
pkg/hanzoai/cloud/models/corpus_view.py
|
||||
pkg/hanzoai/cloud/models/cost_line.py
|
||||
pkg/hanzoai/cloud/models/count.py
|
||||
pkg/hanzoai/cloud/models/cover_row.py
|
||||
pkg/hanzoai/cloud/models/crawl_document.py
|
||||
pkg/hanzoai/cloud/models/crawl_request.py
|
||||
@@ -484,7 +534,6 @@ pkg/hanzoai/cloud/models/credit_balance.py
|
||||
pkg/hanzoai/cloud/models/credit_entry.py
|
||||
pkg/hanzoai/cloud/models/credit_grant.py
|
||||
pkg/hanzoai/cloud/models/credit_grants.py
|
||||
pkg/hanzoai/cloud/models/crm_summary.py
|
||||
pkg/hanzoai/cloud/models/crypto_asset.py
|
||||
pkg/hanzoai/cloud/models/crypto_deposit.py
|
||||
pkg/hanzoai/cloud/models/crypto_options.py
|
||||
@@ -538,6 +587,7 @@ pkg/hanzoai/cloud/models/deploy_logs.py
|
||||
pkg/hanzoai/cloud/models/deploy_record.py
|
||||
pkg/hanzoai/cloud/models/deploy_req.py
|
||||
pkg/hanzoai/cloud/models/deploy_request.py
|
||||
pkg/hanzoai/cloud/models/deployment_detail.py
|
||||
pkg/hanzoai/cloud/models/deployment_view.py
|
||||
pkg/hanzoai/cloud/models/destination_disconnected.py
|
||||
pkg/hanzoai/cloud/models/destination_field.py
|
||||
@@ -554,6 +604,7 @@ pkg/hanzoai/cloud/models/disconnect_out.py
|
||||
pkg/hanzoai/cloud/models/doc_field.py
|
||||
pkg/hanzoai/cloud/models/doc_perm.py
|
||||
pkg/hanzoai/cloud/models/doc_row.py
|
||||
pkg/hanzoai/cloud/models/doc_search_result.py
|
||||
pkg/hanzoai/cloud/models/doc_type.py
|
||||
pkg/hanzoai/cloud/models/doc_type_list.py
|
||||
pkg/hanzoai/cloud/models/document_list.py
|
||||
@@ -591,6 +642,8 @@ pkg/hanzoai/cloud/models/enrolment.py
|
||||
pkg/hanzoai/cloud/models/entitlements_view.py
|
||||
pkg/hanzoai/cloud/models/entry.py
|
||||
pkg/hanzoai/cloud/models/env_var_json.py
|
||||
pkg/hanzoai/cloud/models/env_variable.py
|
||||
pkg/hanzoai/cloud/models/envelope.py
|
||||
pkg/hanzoai/cloud/models/environment_board.py
|
||||
pkg/hanzoai/cloud/models/environment_row.py
|
||||
pkg/hanzoai/cloud/models/error_list.py
|
||||
@@ -627,6 +680,7 @@ pkg/hanzoai/cloud/models/event.py
|
||||
pkg/hanzoai/cloud/models/event_in.py
|
||||
pkg/hanzoai/cloud/models/event_list.py
|
||||
pkg/hanzoai/cloud/models/event_view.py
|
||||
pkg/hanzoai/cloud/models/example_question.py
|
||||
pkg/hanzoai/cloud/models/exception.py
|
||||
pkg/hanzoai/cloud/models/exec_request.py
|
||||
pkg/hanzoai/cloud/models/exec_result.py
|
||||
@@ -634,6 +688,7 @@ pkg/hanzoai/cloud/models/experiment_list.py
|
||||
pkg/hanzoai/cloud/models/extracted.py
|
||||
pkg/hanzoai/cloud/models/faq_list.py
|
||||
pkg/hanzoai/cloud/models/figure.py
|
||||
pkg/hanzoai/cloud/models/file.py
|
||||
pkg/hanzoai/cloud/models/file_content.py
|
||||
pkg/hanzoai/cloud/models/file_input.py
|
||||
pkg/hanzoai/cloud/models/file_json.py
|
||||
@@ -647,6 +702,7 @@ pkg/hanzoai/cloud/models/finance_ledger_entry.py
|
||||
pkg/hanzoai/cloud/models/financial_package.py
|
||||
pkg/hanzoai/cloud/models/finding_list.py
|
||||
pkg/hanzoai/cloud/models/finding_view.py
|
||||
pkg/hanzoai/cloud/models/finetune_job.py
|
||||
pkg/hanzoai/cloud/models/fleet_board.py
|
||||
pkg/hanzoai/cloud/models/fleet_metrics.py
|
||||
pkg/hanzoai/cloud/models/fleet_spec.py
|
||||
@@ -663,6 +719,7 @@ pkg/hanzoai/cloud/models/flow_update.py
|
||||
pkg/hanzoai/cloud/models/flow_version.py
|
||||
pkg/hanzoai/cloud/models/fn_list.py
|
||||
pkg/hanzoai/cloud/models/form.py
|
||||
pkg/hanzoai/cloud/models/form_item.py
|
||||
pkg/hanzoai/cloud/models/formation.py
|
||||
pkg/hanzoai/cloud/models/formation_view.py
|
||||
pkg/hanzoai/cloud/models/founder.py
|
||||
@@ -679,6 +736,44 @@ pkg/hanzoai/cloud/models/generate_input.py
|
||||
pkg/hanzoai/cloud/models/generate_request.py
|
||||
pkg/hanzoai/cloud/models/generate_result.py
|
||||
pkg/hanzoai/cloud/models/genesis.py
|
||||
pkg/hanzoai/cloud/models/get_ai_activities200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_articles200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_assets200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_chats200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_connections200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_connections_by_provider_authorize200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_connections_by_provider_usage200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_deployments200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_files200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_finetune_hf_datasets200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_finetune_hf_models200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_finetune_hf_repo200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_finetune_jobs200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_finetune_presets200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_forms200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_graphs200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_memory_facts200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_messages200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_nodes200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_providers200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_records200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_remote_connections200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_router_history200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_router_judge_panel200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_router_stats200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_routes200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_scales200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_scans200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_signin_sessions200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_stores200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_tasks200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_templates200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_traffic_globe200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_usages200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_vectors200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_videos200_response.py
|
||||
pkg/hanzoai/cloud/models/get_ai_workflows200_response.py
|
||||
pkg/hanzoai/cloud/models/get_models_providers200_response.py
|
||||
pkg/hanzoai/cloud/models/git_ops_app.py
|
||||
pkg/hanzoai/cloud/models/git_ops_deploy.py
|
||||
pkg/hanzoai/cloud/models/git_ops_operation.py
|
||||
@@ -715,6 +810,7 @@ pkg/hanzoai/cloud/models/gpu_alert_list.py
|
||||
pkg/hanzoai/cloud/models/gpu_job.py
|
||||
pkg/hanzoai/cloud/models/gpu_list.py
|
||||
pkg/hanzoai/cloud/models/gpu_view.py
|
||||
pkg/hanzoai/cloud/models/graph.py
|
||||
pkg/hanzoai/cloud/models/graph_assert_in.py
|
||||
pkg/hanzoai/cloud/models/graph_assert_out.py
|
||||
pkg/hanzoai/cloud/models/graph_edge.py
|
||||
@@ -746,6 +842,10 @@ pkg/hanzoai/cloud/models/help_category.py
|
||||
pkg/hanzoai/cloud/models/help_category_list.py
|
||||
pkg/hanzoai/cloud/models/help_ticket_filed.py
|
||||
pkg/hanzoai/cloud/models/help_ticket_intake.py
|
||||
pkg/hanzoai/cloud/models/hf_dataset.py
|
||||
pkg/hanzoai/cloud/models/hf_model.py
|
||||
pkg/hanzoai/cloud/models/hf_repo_info.py
|
||||
pkg/hanzoai/cloud/models/hf_sibling.py
|
||||
pkg/hanzoai/cloud/models/history_out.py
|
||||
pkg/hanzoai/cloud/models/hit.py
|
||||
pkg/hanzoai/cloud/models/holder.py
|
||||
@@ -873,6 +973,7 @@ pkg/hanzoai/cloud/models/indexers_out.py
|
||||
pkg/hanzoai/cloud/models/info_out.py
|
||||
pkg/hanzoai/cloud/models/ingest_req.py
|
||||
pkg/hanzoai/cloud/models/ingest_resp.py
|
||||
pkg/hanzoai/cloud/models/ingest_stats.py
|
||||
pkg/hanzoai/cloud/models/ingress_middlewares.py
|
||||
pkg/hanzoai/cloud/models/ingress_routes.py
|
||||
pkg/hanzoai/cloud/models/ingress_services.py
|
||||
@@ -925,8 +1026,10 @@ pkg/hanzoai/cloud/models/kv_write.py
|
||||
pkg/hanzoai/cloud/models/kyc_refresh_out.py
|
||||
pkg/hanzoai/cloud/models/kyc_session.py
|
||||
pkg/hanzoai/cloud/models/kyc_start_out.py
|
||||
pkg/hanzoai/cloud/models/label.py
|
||||
pkg/hanzoai/cloud/models/last_event_view.py
|
||||
pkg/hanzoai/cloud/models/latency_stat.py
|
||||
pkg/hanzoai/cloud/models/layout.py
|
||||
pkg/hanzoai/cloud/models/leader_row.py
|
||||
pkg/hanzoai/cloud/models/leaderboard.py
|
||||
pkg/hanzoai/cloud/models/leaderboard_row.py
|
||||
@@ -988,10 +1091,12 @@ pkg/hanzoai/cloud/models/mcp_response.py
|
||||
pkg/hanzoai/cloud/models/mcp_server.py
|
||||
pkg/hanzoai/cloud/models/mcp_server_list.py
|
||||
pkg/hanzoai/cloud/models/meet_health.py
|
||||
pkg/hanzoai/cloud/models/memory.py
|
||||
pkg/hanzoai/cloud/models/memory_entry.py
|
||||
pkg/hanzoai/cloud/models/memory_page.py
|
||||
pkg/hanzoai/cloud/models/mesh_service_list.py
|
||||
pkg/hanzoai/cloud/models/mesh_view.py
|
||||
pkg/hanzoai/cloud/models/message.py
|
||||
pkg/hanzoai/cloud/models/message_input.py
|
||||
pkg/hanzoai/cloud/models/message_list.py
|
||||
pkg/hanzoai/cloud/models/metric_body.py
|
||||
@@ -1011,11 +1116,15 @@ pkg/hanzoai/cloud/models/ml_resource.py
|
||||
pkg/hanzoai/cloud/models/ml_resource_list.py
|
||||
pkg/hanzoai/cloud/models/mode.py
|
||||
pkg/hanzoai/cloud/models/mode_in.py
|
||||
pkg/hanzoai/cloud/models/model_access.py
|
||||
pkg/hanzoai/cloud/models/model_field.py
|
||||
pkg/hanzoai/cloud/models/model_history.py
|
||||
pkg/hanzoai/cloud/models/model_route.py
|
||||
pkg/hanzoai/cloud/models/model_row.py
|
||||
pkg/hanzoai/cloud/models/model_search_result.py
|
||||
pkg/hanzoai/cloud/models/model_stat.py
|
||||
pkg/hanzoai/cloud/models/module_info.py
|
||||
pkg/hanzoai/cloud/models/model_tool_call.py
|
||||
pkg/hanzoai/cloud/models/module.py
|
||||
pkg/hanzoai/cloud/models/module_list.py
|
||||
pkg/hanzoai/cloud/models/module_state.py
|
||||
pkg/hanzoai/cloud/models/mutate_req.py
|
||||
@@ -1028,6 +1137,7 @@ pkg/hanzoai/cloud/models/new_issue.py
|
||||
pkg/hanzoai/cloud/models/news_item.py
|
||||
pkg/hanzoai/cloud/models/news_response.py
|
||||
pkg/hanzoai/cloud/models/next_in.py
|
||||
pkg/hanzoai/cloud/models/node.py
|
||||
pkg/hanzoai/cloud/models/node_list.py
|
||||
pkg/hanzoai/cloud/models/node_pool_view.py
|
||||
pkg/hanzoai/cloud/models/node_view.py
|
||||
@@ -1826,9 +1936,34 @@ pkg/hanzoai/cloud/models/onboard_req.py
|
||||
pkg/hanzoai/cloud/models/onboard_resp.py
|
||||
pkg/hanzoai/cloud/models/op.py
|
||||
pkg/hanzoai/cloud/models/open_req.py
|
||||
pkg/hanzoai/cloud/models/opp_list.py
|
||||
pkg/hanzoai/cloud/models/opp_req.py
|
||||
pkg/hanzoai/cloud/models/opportunity.py
|
||||
pkg/hanzoai/cloud/models/openai_audio_response.py
|
||||
pkg/hanzoai/cloud/models/openai_audio_response_segments_inner.py
|
||||
pkg/hanzoai/cloud/models/openai_audio_response_words_inner.py
|
||||
pkg/hanzoai/cloud/models/openai_chat_completion_choice.py
|
||||
pkg/hanzoai/cloud/models/openai_chat_completion_message.py
|
||||
pkg/hanzoai/cloud/models/openai_chat_completion_response.py
|
||||
pkg/hanzoai/cloud/models/openai_chat_message_image_url.py
|
||||
pkg/hanzoai/cloud/models/openai_chat_message_part.py
|
||||
pkg/hanzoai/cloud/models/openai_completion_tokens_details.py
|
||||
pkg/hanzoai/cloud/models/openai_content_filter_results.py
|
||||
pkg/hanzoai/cloud/models/openai_embedding.py
|
||||
pkg/hanzoai/cloud/models/openai_embedding_response.py
|
||||
pkg/hanzoai/cloud/models/openai_function_call.py
|
||||
pkg/hanzoai/cloud/models/openai_hate.py
|
||||
pkg/hanzoai/cloud/models/openai_image_response.py
|
||||
pkg/hanzoai/cloud/models/openai_image_response_data_inner.py
|
||||
pkg/hanzoai/cloud/models/openai_jail_break.py
|
||||
pkg/hanzoai/cloud/models/openai_log_prob.py
|
||||
pkg/hanzoai/cloud/models/openai_log_probs.py
|
||||
pkg/hanzoai/cloud/models/openai_profanity.py
|
||||
pkg/hanzoai/cloud/models/openai_prompt_filter_result.py
|
||||
pkg/hanzoai/cloud/models/openai_prompt_tokens_details.py
|
||||
pkg/hanzoai/cloud/models/openai_self_harm.py
|
||||
pkg/hanzoai/cloud/models/openai_sexual.py
|
||||
pkg/hanzoai/cloud/models/openai_tool_call.py
|
||||
pkg/hanzoai/cloud/models/openai_top_log_probs.py
|
||||
pkg/hanzoai/cloud/models/openai_usage.py
|
||||
pkg/hanzoai/cloud/models/openai_violence.py
|
||||
pkg/hanzoai/cloud/models/optin_view.py
|
||||
pkg/hanzoai/cloud/models/oracle_view.py
|
||||
pkg/hanzoai/cloud/models/oracles_out.py
|
||||
@@ -1854,7 +1989,7 @@ pkg/hanzoai/cloud/models/pairing.py
|
||||
pkg/hanzoai/cloud/models/pairing_approved.py
|
||||
pkg/hanzoai/cloud/models/pairing_queue.py
|
||||
pkg/hanzoai/cloud/models/pairing_view.py
|
||||
pkg/hanzoai/cloud/models/patch_application_in.py
|
||||
pkg/hanzoai/cloud/models/patch.py
|
||||
pkg/hanzoai/cloud/models/patch_flow_in.py
|
||||
pkg/hanzoai/cloud/models/patch_in.py
|
||||
pkg/hanzoai/cloud/models/patch_session_in.py
|
||||
@@ -1894,8 +2029,40 @@ pkg/hanzoai/cloud/models/pool_create.py
|
||||
pkg/hanzoai/cloud/models/pool_scale.py
|
||||
pkg/hanzoai/cloud/models/populated_flow.py
|
||||
pkg/hanzoai/cloud/models/position.py
|
||||
pkg/hanzoai/cloud/models/post_ai_articles200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_assets200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_chats200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_connections200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_deployments200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_feedback200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_files200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_finetune_cancel200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_finetune_deploy200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_forms200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_graphs200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_memory_delete200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_memory_remember200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_messages200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_nodes200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_providers200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_rag_embed200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_rag_ingest200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_records200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_remote_connections200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_routes200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_scales200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_scans200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_signin_sessions200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_stores200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_tasks200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_templates200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_tree_files200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_vectors200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_videos200_response.py
|
||||
pkg/hanzoai/cloud/models/post_ai_workflows200_response.py
|
||||
pkg/hanzoai/cloud/models/post_event_request.py
|
||||
pkg/hanzoai/cloud/models/post_list.py
|
||||
pkg/hanzoai/cloud/models/post_models_by_model_access200_response.py
|
||||
pkg/hanzoai/cloud/models/prefs_view.py
|
||||
pkg/hanzoai/cloud/models/preset.py
|
||||
pkg/hanzoai/cloud/models/preset_accepted.py
|
||||
@@ -1918,7 +2085,6 @@ pkg/hanzoai/cloud/models/product_event.py
|
||||
pkg/hanzoai/cloud/models/product_row.py
|
||||
pkg/hanzoai/cloud/models/profile_metrics.py
|
||||
pkg/hanzoai/cloud/models/profile_response.py
|
||||
pkg/hanzoai/cloud/models/program_application.py
|
||||
pkg/hanzoai/cloud/models/progress_view.py
|
||||
pkg/hanzoai/cloud/models/project_view.py
|
||||
pkg/hanzoai/cloud/models/projection_view.py
|
||||
@@ -1954,7 +2120,9 @@ pkg/hanzoai/cloud/models/prompt_list.py
|
||||
pkg/hanzoai/cloud/models/prompt_meta.py
|
||||
pkg/hanzoai/cloud/models/prompt_req.py
|
||||
pkg/hanzoai/cloud/models/prop_spec.py
|
||||
pkg/hanzoai/cloud/models/properties.py
|
||||
pkg/hanzoai/cloud/models/provenance.py
|
||||
pkg/hanzoai/cloud/models/provider.py
|
||||
pkg/hanzoai/cloud/models/provider_breakdown.py
|
||||
pkg/hanzoai/cloud/models/provider_info.py
|
||||
pkg/hanzoai/cloud/models/provider_row.py
|
||||
@@ -1986,6 +2154,7 @@ pkg/hanzoai/cloud/models/question.py
|
||||
pkg/hanzoai/cloud/models/questions_response.py
|
||||
pkg/hanzoai/cloud/models/quote.py
|
||||
pkg/hanzoai/cloud/models/quote_list.py
|
||||
pkg/hanzoai/cloud/models/rag_embed_result.py
|
||||
pkg/hanzoai/cloud/models/raise_in.py
|
||||
pkg/hanzoai/cloud/models/ran.py
|
||||
pkg/hanzoai/cloud/models/range.py
|
||||
@@ -2043,7 +2212,9 @@ pkg/hanzoai/cloud/models/registry_tag_list.py
|
||||
pkg/hanzoai/cloud/models/registry_token.py
|
||||
pkg/hanzoai/cloud/models/release_board.py
|
||||
pkg/hanzoai/cloud/models/release_row.py
|
||||
pkg/hanzoai/cloud/models/remark.py
|
||||
pkg/hanzoai/cloud/models/remittance.py
|
||||
pkg/hanzoai/cloud/models/remote_app.py
|
||||
pkg/hanzoai/cloud/models/renew_req.py
|
||||
pkg/hanzoai/cloud/models/renew_result.py
|
||||
pkg/hanzoai/cloud/models/replace_kit_in.py
|
||||
@@ -2059,6 +2230,8 @@ pkg/hanzoai/cloud/models/report_run_in.py
|
||||
pkg/hanzoai/cloud/models/request.py
|
||||
pkg/hanzoai/cloud/models/resolve_reference_in.py
|
||||
pkg/hanzoai/cloud/models/resolve_reference_out.py
|
||||
pkg/hanzoai/cloud/models/resource_metrics.py
|
||||
pkg/hanzoai/cloud/models/resource_requests.py
|
||||
pkg/hanzoai/cloud/models/resource_usage.py
|
||||
pkg/hanzoai/cloud/models/responsible.py
|
||||
pkg/hanzoai/cloud/models/restart_ref.py
|
||||
@@ -2172,6 +2345,7 @@ pkg/hanzoai/cloud/models/sandbox_list.py
|
||||
pkg/hanzoai/cloud/models/sbom_health.py
|
||||
pkg/hanzoai/cloud/models/sbom_ingest.py
|
||||
pkg/hanzoai/cloud/models/sbom_ingested.py
|
||||
pkg/hanzoai/cloud/models/scale.py
|
||||
pkg/hanzoai/cloud/models/scan.py
|
||||
pkg/hanzoai/cloud/models/scan_detail.py
|
||||
pkg/hanzoai/cloud/models/scan_draft.py
|
||||
@@ -2185,7 +2359,6 @@ pkg/hanzoai/cloud/models/score_config_view.py
|
||||
pkg/hanzoai/cloud/models/score_list.py
|
||||
pkg/hanzoai/cloud/models/score_req.py
|
||||
pkg/hanzoai/cloud/models/score_view.py
|
||||
pkg/hanzoai/cloud/models/screen_result.py
|
||||
pkg/hanzoai/cloud/models/search_in.py
|
||||
pkg/hanzoai/cloud/models/search_out.py
|
||||
pkg/hanzoai/cloud/models/search_results.py
|
||||
@@ -2219,6 +2392,10 @@ pkg/hanzoai/cloud/models/sequence_view.py
|
||||
pkg/hanzoai/cloud/models/sequences.py
|
||||
pkg/hanzoai/cloud/models/series_line.py
|
||||
pkg/hanzoai/cloud/models/series_point.py
|
||||
pkg/hanzoai/cloud/models/service.py
|
||||
pkg/hanzoai/cloud/models/service_detail.py
|
||||
pkg/hanzoai/cloud/models/service_port.py
|
||||
pkg/hanzoai/cloud/models/session.py
|
||||
pkg/hanzoai/cloud/models/session_detail.py
|
||||
pkg/hanzoai/cloud/models/session_ended.py
|
||||
pkg/hanzoai/cloud/models/session_list.py
|
||||
@@ -2265,7 +2442,6 @@ pkg/hanzoai/cloud/models/span_body.py
|
||||
pkg/hanzoai/cloud/models/spec.py
|
||||
pkg/hanzoai/cloud/models/spend.py
|
||||
pkg/hanzoai/cloud/models/spend_point.py
|
||||
pkg/hanzoai/cloud/models/stage_event.py
|
||||
pkg/hanzoai/cloud/models/starter_kit.py
|
||||
pkg/hanzoai/cloud/models/state.py
|
||||
pkg/hanzoai/cloud/models/state_graph.py
|
||||
@@ -2282,6 +2458,7 @@ pkg/hanzoai/cloud/models/step_settings.py
|
||||
pkg/hanzoai/cloud/models/step_view.py
|
||||
pkg/hanzoai/cloud/models/stop_in.py
|
||||
pkg/hanzoai/cloud/models/stopped.py
|
||||
pkg/hanzoai/cloud/models/store.py
|
||||
pkg/hanzoai/cloud/models/storefront_result.py
|
||||
pkg/hanzoai/cloud/models/strategy.py
|
||||
pkg/hanzoai/cloud/models/strategy_view.py
|
||||
@@ -2310,6 +2487,7 @@ pkg/hanzoai/cloud/models/summary_resp.py
|
||||
pkg/hanzoai/cloud/models/summary_view.py
|
||||
pkg/hanzoai/cloud/models/suppression.py
|
||||
pkg/hanzoai/cloud/models/suppression_list.py
|
||||
pkg/hanzoai/cloud/models/sweep.py
|
||||
pkg/hanzoai/cloud/models/symbol.py
|
||||
pkg/hanzoai/cloud/models/sync_list.py
|
||||
pkg/hanzoai/cloud/models/sync_queued.py
|
||||
@@ -2323,13 +2501,16 @@ pkg/hanzoai/cloud/models/target_req.py
|
||||
pkg/hanzoai/cloud/models/target_view.py
|
||||
pkg/hanzoai/cloud/models/tariff.py
|
||||
pkg/hanzoai/cloud/models/tariff_in.py
|
||||
pkg/hanzoai/cloud/models/task.py
|
||||
pkg/hanzoai/cloud/models/taxon.py
|
||||
pkg/hanzoai/cloud/models/taxon_in.py
|
||||
pkg/hanzoai/cloud/models/taxonomy.py
|
||||
pkg/hanzoai/cloud/models/team_room.py
|
||||
pkg/hanzoai/cloud/models/team_room_bind.py
|
||||
pkg/hanzoai/cloud/models/team_rooms.py
|
||||
pkg/hanzoai/cloud/models/template.py
|
||||
pkg/hanzoai/cloud/models/template_catalog.py
|
||||
pkg/hanzoai/cloud/models/template_config_option.py
|
||||
pkg/hanzoai/cloud/models/template_override.py
|
||||
pkg/hanzoai/cloud/models/template_reply.py
|
||||
pkg/hanzoai/cloud/models/template_view.py
|
||||
@@ -2353,7 +2534,12 @@ pkg/hanzoai/cloud/models/total_view.py
|
||||
pkg/hanzoai/cloud/models/trace_list.py
|
||||
pkg/hanzoai/cloud/models/trace_view.py
|
||||
pkg/hanzoai/cloud/models/traffic_caller.py
|
||||
pkg/hanzoai/cloud/models/traffic_country_count.py
|
||||
pkg/hanzoai/cloud/models/traffic_globe.py
|
||||
pkg/hanzoai/cloud/models/traffic_point.py
|
||||
pkg/hanzoai/cloud/models/traffic_totals.py
|
||||
pkg/hanzoai/cloud/models/traffic_view.py
|
||||
pkg/hanzoai/cloud/models/traffic_window.py
|
||||
pkg/hanzoai/cloud/models/trail_page.py
|
||||
pkg/hanzoai/cloud/models/transaction.py
|
||||
pkg/hanzoai/cloud/models/transactions.py
|
||||
@@ -2364,6 +2550,7 @@ pkg/hanzoai/cloud/models/transition_result.py
|
||||
pkg/hanzoai/cloud/models/treasury_report.py
|
||||
pkg/hanzoai/cloud/models/tree_entry.py
|
||||
pkg/hanzoai/cloud/models/tree_entry_json.py
|
||||
pkg/hanzoai/cloud/models/tree_file.py
|
||||
pkg/hanzoai/cloud/models/tree_json.py
|
||||
pkg/hanzoai/cloud/models/tree_node.py
|
||||
pkg/hanzoai/cloud/models/trial.py
|
||||
@@ -2417,6 +2604,8 @@ pkg/hanzoai/cloud/models/utm.py
|
||||
pkg/hanzoai/cloud/models/validator_claim.py
|
||||
pkg/hanzoai/cloud/models/validator_list.py
|
||||
pkg/hanzoai/cloud/models/variant.py
|
||||
pkg/hanzoai/cloud/models/vector.py
|
||||
pkg/hanzoai/cloud/models/vector_score.py
|
||||
pkg/hanzoai/cloud/models/vendor_row.py
|
||||
pkg/hanzoai/cloud/models/vendors_out.py
|
||||
pkg/hanzoai/cloud/models/venue.py
|
||||
@@ -2430,6 +2619,7 @@ pkg/hanzoai/cloud/models/version_message.py
|
||||
pkg/hanzoai/cloud/models/version_meta.py
|
||||
pkg/hanzoai/cloud/models/version_page.py
|
||||
pkg/hanzoai/cloud/models/version_view.py
|
||||
pkg/hanzoai/cloud/models/video.py
|
||||
pkg/hanzoai/cloud/models/voucher.py
|
||||
pkg/hanzoai/cloud/models/waiting.py
|
||||
pkg/hanzoai/cloud/models/wallet.py
|
||||
@@ -2447,6 +2637,7 @@ pkg/hanzoai/cloud/models/wire_fact.py
|
||||
pkg/hanzoai/cloud/models/wire_instructions.py
|
||||
pkg/hanzoai/cloud/models/worker_list.py
|
||||
pkg/hanzoai/cloud/models/worker_script_put.py
|
||||
pkg/hanzoai/cloud/models/workflow.py
|
||||
pkg/hanzoai/cloud/models/world_index.py
|
||||
pkg/hanzoai/cloud/models/world_wire.py
|
||||
pkg/hanzoai/cloud/models/write_in.py
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
ref=529be4ccb9a6cf1cf225477ea31b1d16260ecdb5
|
||||
sha256=48d08c06514c6093af98af3974feade95fa622d8897dcdc5a30a4156a483b43f
|
||||
ref=574d1f1d0dbbddab7a75ceb512394492ab072515
|
||||
sha256=8231e11ebac33889c5a850a2de2f36388d2f72585d9481970f7e9e9703e6c784
|
||||
repo=hanzo-inc/cloud
|
||||
path=openapi.yaml
|
||||
|
||||
+7
-7
@@ -16,19 +16,19 @@
|
||||
"fumadocs-mdx": "^14.2.3",
|
||||
"fumadocs-ui": "^16.2.6",
|
||||
"lucide-react": "^0.468.0",
|
||||
"next": "^16.1.1",
|
||||
"next": "16.3.3",
|
||||
"next-themes": "^0.4.6",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react": "19.2.8",
|
||||
"react-dom": "19.2.8",
|
||||
"shiki": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.1.0",
|
||||
"@types/node": "^22.0.0",
|
||||
"@types/react": "^19.0.0",
|
||||
"@types/react-dom": "^19.0.0",
|
||||
"@types/node": "26.4.0",
|
||||
"@types/react": "19.2.18",
|
||||
"@types/react-dom": "19.2.5",
|
||||
"postcss": "^8.5.0",
|
||||
"tailwindcss": "^4.1.0",
|
||||
"typescript": "^5.7.0"
|
||||
"typescript": "7.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
},
|
||||
{
|
||||
"command": "hanzo-mcp.test",
|
||||
"key": "ctrl+alt+t",
|
||||
"key": "ctrl+alt+t",
|
||||
"mac": "cmd+alt+t"
|
||||
},
|
||||
{
|
||||
@@ -100,19 +100,34 @@
|
||||
"description": "Enable session tracking to ~/.hanzo/sessions"
|
||||
},
|
||||
"hanzo-mcp.codebaseIndexing": {
|
||||
"type": "boolean",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable automatic codebase indexing"
|
||||
},
|
||||
"hanzo-mcp.workspaceDetection": {
|
||||
"type": "string",
|
||||
"enum": ["auto", "go.work", "package.json", "pyproject.toml", "Cargo.toml"],
|
||||
"enum": [
|
||||
"auto",
|
||||
"go.work",
|
||||
"package.json",
|
||||
"pyproject.toml",
|
||||
"Cargo.toml"
|
||||
],
|
||||
"default": "auto",
|
||||
"description": "Workspace detection method"
|
||||
},
|
||||
"hanzo-mcp.defaultLanguage": {
|
||||
"type": "string",
|
||||
"enum": ["auto", "go", "ts", "py", "rs", "cc", "sol", "schema"],
|
||||
"enum": [
|
||||
"auto",
|
||||
"go",
|
||||
"ts",
|
||||
"py",
|
||||
"rs",
|
||||
"cc",
|
||||
"sol",
|
||||
"schema"
|
||||
],
|
||||
"default": "auto",
|
||||
"description": "Default language for tools"
|
||||
},
|
||||
@@ -132,7 +147,7 @@
|
||||
},
|
||||
{
|
||||
"id": "hanzo-mcp-codebase",
|
||||
"name": "Codebase Intelligence",
|
||||
"name": "Codebase Intelligence",
|
||||
"when": "hanzo-mcp.codebaseIndexing"
|
||||
}
|
||||
]
|
||||
@@ -145,11 +160,11 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/vscode": "^1.74.0",
|
||||
"@types/node": "16.x",
|
||||
"typescript": "^4.9.4"
|
||||
"@types/node": "26.4.0",
|
||||
"typescript": "7.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-pty": "^0.10.1",
|
||||
"ws": "^8.14.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ Network tools for Hanzo AI MCP (HIP-0300).
|
||||
|
||||
## Tools
|
||||
|
||||
- `fetch` — the web, one door per verb:
|
||||
- `fetch` — the web, one entry point per verb:
|
||||
- `search` — query → [url, title, snippet]
|
||||
- `web_read` — url → clean markdown
|
||||
- `research` — question → cited answer + sources (search + read + synthesize)
|
||||
|
||||
@@ -73,7 +73,7 @@ def _research_mode(mode: str) -> str:
|
||||
"""The one pass this action opens.
|
||||
|
||||
``deep`` is the older name for the same research pass, so it normalizes.
|
||||
Anything else is a different door — plain web search is its own action — and
|
||||
Anything else names a different pass — plain web search is its own action — and
|
||||
is refused rather than silently downgraded.
|
||||
"""
|
||||
m = (mode or "research").strip().lower()
|
||||
@@ -140,7 +140,7 @@ Actions:
|
||||
- search: Web search — cloud Bing meta-search (api.hanzo.ai) with a local
|
||||
DuckDuckGo fallback (Query → [URL, title, snippet])
|
||||
- web_read: Fetch a URL → clean markdown (cloud Crawl4AI, local fallback)
|
||||
- research: Search + read + synthesize behind one door — the cloud answer
|
||||
- research: Search + read + synthesize behind one endpoint — the cloud answer
|
||||
engine (Query → {answer with citations, sources, follow_ups})
|
||||
- fetch: Retrieve URL content (URL → {text, mime, status})
|
||||
- download: Save page with assets (URL → Path)
|
||||
@@ -352,7 +352,7 @@ Effect: NONDETERMINISTIC_EFFECT (network I/O)
|
||||
"""Research a question end to end and return a cited answer.
|
||||
|
||||
Search finds pages and web_read reads one; research is the whole
|
||||
loop behind a single door — the cloud answer engine
|
||||
loop behind a single endpoint — the cloud answer engine
|
||||
(api.hanzo.ai /v1/ask) plans queries, searches, reads the best
|
||||
pages and writes an answer that cites them. Its progress frames are
|
||||
consumed here, so the caller gets the finished result without
|
||||
|
||||
@@ -16,7 +16,7 @@ import httpx
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Hanzo Cloud search endpoints (canonical front door: api.hanzo.ai)
|
||||
# Hanzo Cloud search endpoints (canonical address: api.hanzo.ai)
|
||||
CLOUD_API = os.environ.get("HANZO_CLOUD_API", "https://api.hanzo.ai")
|
||||
SEARCH_ENDPOINT = f"{CLOUD_API}/v1/search-docs"
|
||||
CHAT_ENDPOINT = f"{CLOUD_API}/v1/chat-docs"
|
||||
|
||||
+416
-34
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,6 @@ from hanzoai.cloud.api.company_api import CompanyApi
|
||||
from hanzoai.cloud.api.compliance_api import ComplianceApi
|
||||
from hanzoai.cloud.api.content_api import ContentApi
|
||||
from hanzoai.cloud.api.crawl_api import CrawlApi
|
||||
from hanzoai.cloud.api.crm_api import CrmApi
|
||||
from hanzoai.cloud.api.dataroom_api import DataroomApi
|
||||
from hanzoai.cloud.api.dataset_api import DatasetApi
|
||||
from hanzoai.cloud.api.deploy_api import DeployApi
|
||||
|
||||
+5250
-575
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -788,7 +788,7 @@ class PlanApi:
|
||||
@validate_call
|
||||
def get_plan_entitlements_by_id(
|
||||
self,
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names.")],
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position.")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -806,7 +806,7 @@ class PlanApi:
|
||||
|
||||
Returns what one plan GRANTS and not what it costs: the canonical namespaced entitlement block and the flat license-feature list derived from it. It is the entitlement half of ResolvePlan, over the same catalog and the same 404 for an id no catalog holds — the read a licensing or quota gate makes.
|
||||
|
||||
:param id: ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. (required)
|
||||
:param id: ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position. (required)
|
||||
:type id: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -855,7 +855,7 @@ class PlanApi:
|
||||
@validate_call
|
||||
def get_plan_entitlements_by_id_with_http_info(
|
||||
self,
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names.")],
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position.")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -873,7 +873,7 @@ class PlanApi:
|
||||
|
||||
Returns what one plan GRANTS and not what it costs: the canonical namespaced entitlement block and the flat license-feature list derived from it. It is the entitlement half of ResolvePlan, over the same catalog and the same 404 for an id no catalog holds — the read a licensing or quota gate makes.
|
||||
|
||||
:param id: ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. (required)
|
||||
:param id: ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position. (required)
|
||||
:type id: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -922,7 +922,7 @@ class PlanApi:
|
||||
@validate_call
|
||||
def get_plan_entitlements_by_id_without_preload_content(
|
||||
self,
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names.")],
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position.")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -940,7 +940,7 @@ class PlanApi:
|
||||
|
||||
Returns what one plan GRANTS and not what it costs: the canonical namespaced entitlement block and the flat license-feature list derived from it. It is the entitlement half of ResolvePlan, over the same catalog and the same 404 for an id no catalog holds — the read a licensing or quota gate makes.
|
||||
|
||||
:param id: ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. (required)
|
||||
:param id: ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position. (required)
|
||||
:type id: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2033,7 +2033,7 @@ class PlanApi:
|
||||
@validate_call
|
||||
def get_plan_resolve_by_id(
|
||||
self,
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names.")],
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position.")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -2051,7 +2051,7 @@ class PlanApi:
|
||||
|
||||
Resolves one plan to everything a consumer of the catalog needs at once: its canonical entitlement block, the flat license-feature list a signed license carries, its billing reference, and the catalog it came from. The id may be the plan's id or its slug, and it is resolved against the caller's catalog, so a reseller's override wins over the canonical record. An id no catalog holds answers 404.
|
||||
|
||||
:param id: ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. (required)
|
||||
:param id: ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position. (required)
|
||||
:type id: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2100,7 +2100,7 @@ class PlanApi:
|
||||
@validate_call
|
||||
def get_plan_resolve_by_id_with_http_info(
|
||||
self,
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names.")],
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position.")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -2118,7 +2118,7 @@ class PlanApi:
|
||||
|
||||
Resolves one plan to everything a consumer of the catalog needs at once: its canonical entitlement block, the flat license-feature list a signed license carries, its billing reference, and the catalog it came from. The id may be the plan's id or its slug, and it is resolved against the caller's catalog, so a reseller's override wins over the canonical record. An id no catalog holds answers 404.
|
||||
|
||||
:param id: ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. (required)
|
||||
:param id: ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position. (required)
|
||||
:type id: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2167,7 +2167,7 @@ class PlanApi:
|
||||
@validate_call
|
||||
def get_plan_resolve_by_id_without_preload_content(
|
||||
self,
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names.")],
|
||||
id: Annotated[StrictStr, Field(description="ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position.")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -2185,7 +2185,7 @@ class PlanApi:
|
||||
|
||||
Resolves one plan to everything a consumer of the catalog needs at once: its canonical entitlement block, the flat license-feature list a signed license carries, its billing reference, and the catalog it came from. The id may be the plan's id or its slug, and it is resolved against the caller's catalog, so a reseller's override wins over the canonical record. An id no catalog holds answers 404.
|
||||
|
||||
:param id: ID is the plan's catalog id or slug — \"pro\", \"team\", \"world-enterprise\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. (required)
|
||||
:param id: ID is the plan's catalog id or slug — \"dev\", \"max\", \"team\", \"rpc-growth\". Both are matched, so a slug resolves the plan it names. A withdrawn id still resolves for a renewal, which is why this takes an id rather than a ladder position. (required)
|
||||
:type id: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
|
||||
@@ -2825,269 +2825,6 @@ class TeamApi:
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_team_transactor_api_v1_statistics(
|
||||
self,
|
||||
token: Annotated[Optional[StrictStr], Field(description="Token is the workspace token minted by selectWorkspace.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> StatsOut:
|
||||
"""Statistics returns the transactor's live sessions for the workspace the caller's credential names — the endpoint the front's workspace switcher and server panel poll on the transactor base.
|
||||
|
||||
Statistics returns the transactor's live sessions for the workspace the caller's credential names — the endpoint the front's workspace switcher and server panel poll on the transactor base. `token` carries the same two lanes the socket's path segment does: a workspace UUID names the workspace and is authorized against the membership rows, an HS256 workspace token names it in its signed claims. activeSessions carries ONLY that one workspace, never another tenant's sessions. An unverifiable credential, or one the caller is no member under, is 401.
|
||||
|
||||
:param token: Token is the workspace token minted by selectWorkspace.
|
||||
:type token: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_team_transactor_api_v1_statistics_serialize(
|
||||
token=token,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "StatsOut",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
).data
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_team_transactor_api_v1_statistics_with_http_info(
|
||||
self,
|
||||
token: Annotated[Optional[StrictStr], Field(description="Token is the workspace token minted by selectWorkspace.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[StatsOut]:
|
||||
"""Statistics returns the transactor's live sessions for the workspace the caller's credential names — the endpoint the front's workspace switcher and server panel poll on the transactor base.
|
||||
|
||||
Statistics returns the transactor's live sessions for the workspace the caller's credential names — the endpoint the front's workspace switcher and server panel poll on the transactor base. `token` carries the same two lanes the socket's path segment does: a workspace UUID names the workspace and is authorized against the membership rows, an HS256 workspace token names it in its signed claims. activeSessions carries ONLY that one workspace, never another tenant's sessions. An unverifiable credential, or one the caller is no member under, is 401.
|
||||
|
||||
:param token: Token is the workspace token minted by selectWorkspace.
|
||||
:type token: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_team_transactor_api_v1_statistics_serialize(
|
||||
token=token,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "StatsOut",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
)
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_team_transactor_api_v1_statistics_without_preload_content(
|
||||
self,
|
||||
token: Annotated[Optional[StrictStr], Field(description="Token is the workspace token minted by selectWorkspace.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""Statistics returns the transactor's live sessions for the workspace the caller's credential names — the endpoint the front's workspace switcher and server panel poll on the transactor base.
|
||||
|
||||
Statistics returns the transactor's live sessions for the workspace the caller's credential names — the endpoint the front's workspace switcher and server panel poll on the transactor base. `token` carries the same two lanes the socket's path segment does: a workspace UUID names the workspace and is authorized against the membership rows, an HS256 workspace token names it in its signed claims. activeSessions carries ONLY that one workspace, never another tenant's sessions. An unverifiable credential, or one the caller is no member under, is 401.
|
||||
|
||||
:param token: Token is the workspace token minted by selectWorkspace.
|
||||
:type token: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_team_transactor_api_v1_statistics_serialize(
|
||||
token=token,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "StatsOut",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_team_transactor_api_v1_statistics_serialize(
|
||||
self,
|
||||
token,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
_host_index,
|
||||
) -> RequestSerialized:
|
||||
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
_query_params: List[Tuple[str, str]] = []
|
||||
_header_params: Dict[str, Optional[str]] = _headers or {}
|
||||
_form_params: List[Tuple[str, str]] = []
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
# process the query parameters
|
||||
if token is not None:
|
||||
|
||||
_query_params.append(('token', token))
|
||||
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
if 'Accept' not in _header_params:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'bearer'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='GET',
|
||||
resource_path='/v1/team/transactor/api/v1/statistics',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_team_transactor_by_token(
|
||||
self,
|
||||
|
||||
@@ -29,6 +29,7 @@ from hanzoai.cloud.models.action_record import ActionRecord
|
||||
from hanzoai.cloud.models.actions_view import ActionsView
|
||||
from hanzoai.cloud.models.activation_req import ActivationReq
|
||||
from hanzoai.cloud.models.activation_set import ActivationSet
|
||||
from hanzoai.cloud.models.activity import Activity
|
||||
from hanzoai.cloud.models.activity_feed import ActivityFeed
|
||||
from hanzoai.cloud.models.activity_out import ActivityOut
|
||||
from hanzoai.cloud.models.activity_point import ActivityPoint
|
||||
@@ -48,10 +49,53 @@ from hanzoai.cloud.models.affiliate_standing import AffiliateStanding
|
||||
from hanzoai.cloud.models.agent_binding import AgentBinding
|
||||
from hanzoai.cloud.models.agent_detail import AgentDetail
|
||||
from hanzoai.cloud.models.agent_list import AgentList
|
||||
from hanzoai.cloud.models.agent_mcp_tools import AgentMcpTools
|
||||
from hanzoai.cloud.models.agent_run_view import AgentRunView
|
||||
from hanzoai.cloud.models.agent_view import AgentView
|
||||
from hanzoai.cloud.models.ai_ai_conn_response import AiAiConnResponse
|
||||
from hanzoai.cloud.models.ai_anthropic_content_block import AiAnthropicContentBlock
|
||||
from hanzoai.cloud.models.ai_anthropic_response import AiAnthropicResponse
|
||||
from hanzoai.cloud.models.ai_anthropic_usage import AiAnthropicUsage
|
||||
from hanzoai.cloud.models.ai_cost_stats import AiCostStats
|
||||
from hanzoai.cloud.models.ai_history_day import AiHistoryDay
|
||||
from hanzoai.cloud.models.ai_history_retrain import AiHistoryRetrain
|
||||
from hanzoai.cloud.models.ai_history_totals import AiHistoryTotals
|
||||
from hanzoai.cloud.models.ai_history_window import AiHistoryWindow
|
||||
from hanzoai.cloud.models.ai_judge_benchmark import AiJudgeBenchmark
|
||||
from hanzoai.cloud.models.ai_judge_panel_state import AiJudgePanelState
|
||||
from hanzoai.cloud.models.ai_mcp_app import AiMCPApp
|
||||
from hanzoai.cloud.models.ai_mcp_surface import AiMCPSurface
|
||||
from hanzoai.cloud.models.ai_model_access_info import AiModelAccessInfo
|
||||
from hanzoai.cloud.models.ai_model_info import AiModelInfo
|
||||
from hanzoai.cloud.models.ai_model_list import AiModelList
|
||||
from hanzoai.cloud.models.ai_model_pricing_info import AiModelPricingInfo
|
||||
from hanzoai.cloud.models.ai_model_providers import AiModelProviders
|
||||
from hanzoai.cloud.models.ai_panel_judge import AiPanelJudge
|
||||
from hanzoai.cloud.models.ai_provider_usage import AiProviderUsage
|
||||
from hanzoai.cloud.models.ai_provider_usage_model_spend import AiProviderUsageModelSpend
|
||||
from hanzoai.cloud.models.ai_provider_usage_series_point import AiProviderUsageSeriesPoint
|
||||
from hanzoai.cloud.models.ai_provider_usage_totals import AiProviderUsageTotals
|
||||
from hanzoai.cloud.models.ai_quality_stats import AiQualityStats
|
||||
from hanzoai.cloud.models.ai_rank_usage import AiRankUsage
|
||||
from hanzoai.cloud.models.ai_ranked_doc import AiRankedDoc
|
||||
from hanzoai.cloud.models.ai_ranked_text import AiRankedText
|
||||
from hanzoai.cloud.models.ai_ranking import AiRanking
|
||||
from hanzoai.cloud.models.ai_response import AiResponse
|
||||
from hanzoai.cloud.models.ai_responses_input_details import AiResponsesInputDetails
|
||||
from hanzoai.cloud.models.ai_responses_output_details import AiResponsesOutputDetails
|
||||
from hanzoai.cloud.models.ai_responses_resource import AiResponsesResource
|
||||
from hanzoai.cloud.models.ai_responses_tool import AiResponsesTool
|
||||
from hanzoai.cloud.models.ai_responses_usage import AiResponsesUsage
|
||||
from hanzoai.cloud.models.ai_retrain_meta import AiRetrainMeta
|
||||
from hanzoai.cloud.models.ai_router_history import AiRouterHistory
|
||||
from hanzoai.cloud.models.ai_router_stats import AiRouterStats
|
||||
from hanzoai.cloud.models.ai_routing_reward_result import AiRoutingRewardResult
|
||||
from hanzoai.cloud.models.ai_stats_window import AiStatsWindow
|
||||
from hanzoai.cloud.models.ai_task_stats import AiTaskStats
|
||||
from hanzoai.cloud.models.ai_throughput_stats import AiThroughputStats
|
||||
from hanzoai.cloud.models.ai_token_count import AiTokenCount
|
||||
from hanzoai.cloud.models.ai_video_failure import AiVideoFailure
|
||||
from hanzoai.cloud.models.ai_video_status import AiVideoStatus
|
||||
from hanzoai.cloud.models.alert import Alert
|
||||
from hanzoai.cloud.models.alert_patch import AlertPatch
|
||||
from hanzoai.cloud.models.alert_spec import AlertSpec
|
||||
@@ -64,10 +108,13 @@ from hanzoai.cloud.models.analyze_query import AnalyzeQuery
|
||||
from hanzoai.cloud.models.answer import Answer
|
||||
from hanzoai.cloud.models.api_key import ApiKey
|
||||
from hanzoai.cloud.models.api_key_list import ApiKeyList
|
||||
from hanzoai.cloud.models.app import App
|
||||
from hanzoai.cloud.models.app_view import AppView
|
||||
from hanzoai.cloud.models.appearance import Appearance
|
||||
from hanzoai.cloud.models.application import Application
|
||||
from hanzoai.cloud.models.application_list import ApplicationList
|
||||
from hanzoai.cloud.models.application_config_option import ApplicationConfigOption
|
||||
from hanzoai.cloud.models.application_event import ApplicationEvent
|
||||
from hanzoai.cloud.models.application_view import ApplicationView
|
||||
from hanzoai.cloud.models.applied_resource import AppliedResource
|
||||
from hanzoai.cloud.models.apply_request import ApplyRequest
|
||||
from hanzoai.cloud.models.approve_pairing_in import ApprovePairingIn
|
||||
@@ -98,16 +145,19 @@ from hanzoai.cloud.models.argo_sync_status import ArgoSyncStatus
|
||||
from hanzoai.cloud.models.argo_sync_windows import ArgoSyncWindows
|
||||
from hanzoai.cloud.models.argo_tree import ArgoTree
|
||||
from hanzoai.cloud.models.arm import Arm
|
||||
from hanzoai.cloud.models.article import Article
|
||||
from hanzoai.cloud.models.ask_answer import AskAnswer
|
||||
from hanzoai.cloud.models.ask_post_in import AskPostIn
|
||||
from hanzoai.cloud.models.ask_request import AskRequest
|
||||
from hanzoai.cloud.models.ask_response import AskResponse
|
||||
from hanzoai.cloud.models.asset import Asset
|
||||
from hanzoai.cloud.models.assignment import Assignment
|
||||
from hanzoai.cloud.models.attribute_request import AttributeRequest
|
||||
from hanzoai.cloud.models.attribution import Attribution
|
||||
from hanzoai.cloud.models.audience import Audience
|
||||
from hanzoai.cloud.models.audience_list import AudienceList
|
||||
from hanzoai.cloud.models.audience_preview import AudiencePreview
|
||||
from hanzoai.cloud.models.audit import Audit
|
||||
from hanzoai.cloud.models.audit_list import AuditList
|
||||
from hanzoai.cloud.models.author_repo import AuthorRepo
|
||||
from hanzoai.cloud.models.authored_plugin import AuthoredPlugin
|
||||
@@ -134,6 +184,7 @@ from hanzoai.cloud.models.bind_agent_req import BindAgentReq
|
||||
from hanzoai.cloud.models.binding_list import BindingList
|
||||
from hanzoai.cloud.models.blob import Blob
|
||||
from hanzoai.cloud.models.blob_json import BlobJSON
|
||||
from hanzoai.cloud.models.block import Block
|
||||
from hanzoai.cloud.models.blog import Blog
|
||||
from hanzoai.cloud.models.blueprint import Blueprint
|
||||
from hanzoai.cloud.models.blueprint_counts import BlueprintCounts
|
||||
@@ -198,6 +249,7 @@ from hanzoai.cloud.models.campaign_results import CampaignResults
|
||||
from hanzoai.cloud.models.campaign_summary import CampaignSummary
|
||||
from hanzoai.cloud.models.campaign_update import CampaignUpdate
|
||||
from hanzoai.cloud.models.campaign_write import CampaignWrite
|
||||
from hanzoai.cloud.models.candidate import Candidate
|
||||
from hanzoai.cloud.models.cap_verdict import CapVerdict
|
||||
from hanzoai.cloud.models.capabilities import Capabilities
|
||||
from hanzoai.cloud.models.capability import Capability
|
||||
@@ -277,6 +329,7 @@ from hanzoai.cloud.models.channel_spec import ChannelSpec
|
||||
from hanzoai.cloud.models.channel_view import ChannelView
|
||||
from hanzoai.cloud.models.charge import Charge
|
||||
from hanzoai.cloud.models.charged import Charged
|
||||
from hanzoai.cloud.models.chat import Chat
|
||||
from hanzoai.cloud.models.chat_channels import ChatChannels
|
||||
from hanzoai.cloud.models.chat_request import ChatRequest
|
||||
from hanzoai.cloud.models.chat_response import ChatResponse
|
||||
@@ -299,6 +352,7 @@ from hanzoai.cloud.models.cluster_attach import ClusterAttach
|
||||
from hanzoai.cloud.models.cluster_detached import ClusterDetached
|
||||
from hanzoai.cloud.models.cluster_detail_view import ClusterDetailView
|
||||
from hanzoai.cloud.models.cluster_list import ClusterList
|
||||
from hanzoai.cloud.models.cluster_serving import ClusterServing
|
||||
from hanzoai.cloud.models.cluster_view import ClusterView
|
||||
from hanzoai.cloud.models.code_file import CodeFile
|
||||
from hanzoai.cloud.models.code_result import CodeResult
|
||||
@@ -313,15 +367,13 @@ from hanzoai.cloud.models.collected import Collected
|
||||
from hanzoai.cloud.models.commerce_overview import CommerceOverview
|
||||
from hanzoai.cloud.models.commit_json import CommitJSON
|
||||
from hanzoai.cloud.models.commits_json import CommitsJSON
|
||||
from hanzoai.cloud.models.company import Company
|
||||
from hanzoai.cloud.models.company_list import CompanyList
|
||||
from hanzoai.cloud.models.company_req import CompanyReq
|
||||
from hanzoai.cloud.models.completion import Completion
|
||||
from hanzoai.cloud.models.config import Config
|
||||
from hanzoai.cloud.models.conn_view import ConnView
|
||||
from hanzoai.cloud.models.connect_in import ConnectIn
|
||||
from hanzoai.cloud.models.connect_out import ConnectOut
|
||||
from hanzoai.cloud.models.connect_request import ConnectRequest
|
||||
from hanzoai.cloud.models.connection import Connection
|
||||
from hanzoai.cloud.models.connection_out import ConnectionOut
|
||||
from hanzoai.cloud.models.connection_view import ConnectionView
|
||||
from hanzoai.cloud.models.connector_action import ConnectorAction
|
||||
@@ -338,10 +390,8 @@ from hanzoai.cloud.models.console_settings_dex_config import ConsoleSettingsDexC
|
||||
from hanzoai.cloud.models.console_settings_google_analytics import ConsoleSettingsGoogleAnalytics
|
||||
from hanzoai.cloud.models.console_settings_help import ConsoleSettingsHelp
|
||||
from hanzoai.cloud.models.consumer import Consumer
|
||||
from hanzoai.cloud.models.contact import Contact
|
||||
from hanzoai.cloud.models.contact_list import ContactList
|
||||
from hanzoai.cloud.models.contact_req import ContactReq
|
||||
from hanzoai.cloud.models.contacts import Contacts
|
||||
from hanzoai.cloud.models.container_detail import ContainerDetail
|
||||
from hanzoai.cloud.models.context_bundle import ContextBundle
|
||||
from hanzoai.cloud.models.context_in import ContextIn
|
||||
from hanzoai.cloud.models.control_command_view import ControlCommandView
|
||||
@@ -352,6 +402,7 @@ from hanzoai.cloud.models.control_result import ControlResult
|
||||
from hanzoai.cloud.models.cookie_ack import CookieAck
|
||||
from hanzoai.cloud.models.corpus_view import CorpusView
|
||||
from hanzoai.cloud.models.cost_line import CostLine
|
||||
from hanzoai.cloud.models.count import Count
|
||||
from hanzoai.cloud.models.cover_row import CoverRow
|
||||
from hanzoai.cloud.models.crawl_document import CrawlDocument
|
||||
from hanzoai.cloud.models.crawl_request import CrawlRequest
|
||||
@@ -375,7 +426,6 @@ from hanzoai.cloud.models.credit_balance import CreditBalance
|
||||
from hanzoai.cloud.models.credit_entry import CreditEntry
|
||||
from hanzoai.cloud.models.credit_grant import CreditGrant
|
||||
from hanzoai.cloud.models.credit_grants import CreditGrants
|
||||
from hanzoai.cloud.models.crm_summary import CrmSummary
|
||||
from hanzoai.cloud.models.crypto_asset import CryptoAsset
|
||||
from hanzoai.cloud.models.crypto_deposit import CryptoDeposit
|
||||
from hanzoai.cloud.models.crypto_options import CryptoOptions
|
||||
@@ -429,6 +479,7 @@ from hanzoai.cloud.models.deploy_logs import DeployLogs
|
||||
from hanzoai.cloud.models.deploy_record import DeployRecord
|
||||
from hanzoai.cloud.models.deploy_req import DeployReq
|
||||
from hanzoai.cloud.models.deploy_request import DeployRequest
|
||||
from hanzoai.cloud.models.deployment_detail import DeploymentDetail
|
||||
from hanzoai.cloud.models.deployment_view import DeploymentView
|
||||
from hanzoai.cloud.models.destination_disconnected import DestinationDisconnected
|
||||
from hanzoai.cloud.models.destination_field import DestinationField
|
||||
@@ -445,6 +496,7 @@ from hanzoai.cloud.models.disconnect_out import DisconnectOut
|
||||
from hanzoai.cloud.models.doc_field import DocField
|
||||
from hanzoai.cloud.models.doc_perm import DocPerm
|
||||
from hanzoai.cloud.models.doc_row import DocRow
|
||||
from hanzoai.cloud.models.doc_search_result import DocSearchResult
|
||||
from hanzoai.cloud.models.doc_type import DocType
|
||||
from hanzoai.cloud.models.doc_type_list import DocTypeList
|
||||
from hanzoai.cloud.models.document_list import DocumentList
|
||||
@@ -482,6 +534,8 @@ from hanzoai.cloud.models.enrolment import Enrolment
|
||||
from hanzoai.cloud.models.entitlements_view import EntitlementsView
|
||||
from hanzoai.cloud.models.entry import Entry
|
||||
from hanzoai.cloud.models.env_var_json import EnvVarJSON
|
||||
from hanzoai.cloud.models.env_variable import EnvVariable
|
||||
from hanzoai.cloud.models.envelope import Envelope
|
||||
from hanzoai.cloud.models.environment_board import EnvironmentBoard
|
||||
from hanzoai.cloud.models.environment_row import EnvironmentRow
|
||||
from hanzoai.cloud.models.error_list import ErrorList
|
||||
@@ -518,6 +572,7 @@ from hanzoai.cloud.models.event import Event
|
||||
from hanzoai.cloud.models.event_in import EventIn
|
||||
from hanzoai.cloud.models.event_list import EventList
|
||||
from hanzoai.cloud.models.event_view import EventView
|
||||
from hanzoai.cloud.models.example_question import ExampleQuestion
|
||||
from hanzoai.cloud.models.exception import Exception
|
||||
from hanzoai.cloud.models.exec_request import ExecRequest
|
||||
from hanzoai.cloud.models.exec_result import ExecResult
|
||||
@@ -525,6 +580,7 @@ from hanzoai.cloud.models.experiment_list import ExperimentList
|
||||
from hanzoai.cloud.models.extracted import Extracted
|
||||
from hanzoai.cloud.models.faq_list import FaqList
|
||||
from hanzoai.cloud.models.figure import Figure
|
||||
from hanzoai.cloud.models.file import File
|
||||
from hanzoai.cloud.models.file_content import FileContent
|
||||
from hanzoai.cloud.models.file_input import FileInput
|
||||
from hanzoai.cloud.models.file_json import FileJSON
|
||||
@@ -538,6 +594,7 @@ from hanzoai.cloud.models.finance_ledger_entry import FinanceLedgerEntry
|
||||
from hanzoai.cloud.models.financial_package import FinancialPackage
|
||||
from hanzoai.cloud.models.finding_list import FindingList
|
||||
from hanzoai.cloud.models.finding_view import FindingView
|
||||
from hanzoai.cloud.models.finetune_job import FinetuneJob
|
||||
from hanzoai.cloud.models.fleet_board import FleetBoard
|
||||
from hanzoai.cloud.models.fleet_metrics import FleetMetrics
|
||||
from hanzoai.cloud.models.fleet_spec import FleetSpec
|
||||
@@ -554,6 +611,7 @@ from hanzoai.cloud.models.flow_update import FlowUpdate
|
||||
from hanzoai.cloud.models.flow_version import FlowVersion
|
||||
from hanzoai.cloud.models.fn_list import FnList
|
||||
from hanzoai.cloud.models.form import Form
|
||||
from hanzoai.cloud.models.form_item import FormItem
|
||||
from hanzoai.cloud.models.formation import Formation
|
||||
from hanzoai.cloud.models.formation_view import FormationView
|
||||
from hanzoai.cloud.models.founder import Founder
|
||||
@@ -572,6 +630,44 @@ from hanzoai.cloud.models.generate_input import GenerateInput
|
||||
from hanzoai.cloud.models.generate_request import GenerateRequest
|
||||
from hanzoai.cloud.models.generate_result import GenerateResult
|
||||
from hanzoai.cloud.models.genesis import Genesis
|
||||
from hanzoai.cloud.models.get_ai_activities200_response import GetAiActivities200Response
|
||||
from hanzoai.cloud.models.get_ai_articles200_response import GetAiArticles200Response
|
||||
from hanzoai.cloud.models.get_ai_assets200_response import GetAiAssets200Response
|
||||
from hanzoai.cloud.models.get_ai_chats200_response import GetAiChats200Response
|
||||
from hanzoai.cloud.models.get_ai_connections200_response import GetAiConnections200Response
|
||||
from hanzoai.cloud.models.get_ai_connections_by_provider_authorize200_response import GetAiConnectionsByProviderAuthorize200Response
|
||||
from hanzoai.cloud.models.get_ai_connections_by_provider_usage200_response import GetAiConnectionsByProviderUsage200Response
|
||||
from hanzoai.cloud.models.get_ai_deployments200_response import GetAiDeployments200Response
|
||||
from hanzoai.cloud.models.get_ai_files200_response import GetAiFiles200Response
|
||||
from hanzoai.cloud.models.get_ai_finetune_hf_datasets200_response import GetAiFinetuneHfDatasets200Response
|
||||
from hanzoai.cloud.models.get_ai_finetune_hf_models200_response import GetAiFinetuneHfModels200Response
|
||||
from hanzoai.cloud.models.get_ai_finetune_hf_repo200_response import GetAiFinetuneHfRepo200Response
|
||||
from hanzoai.cloud.models.get_ai_finetune_jobs200_response import GetAiFinetuneJobs200Response
|
||||
from hanzoai.cloud.models.get_ai_finetune_presets200_response import GetAiFinetunePresets200Response
|
||||
from hanzoai.cloud.models.get_ai_forms200_response import GetAiForms200Response
|
||||
from hanzoai.cloud.models.get_ai_graphs200_response import GetAiGraphs200Response
|
||||
from hanzoai.cloud.models.get_ai_memory_facts200_response import GetAiMemoryFacts200Response
|
||||
from hanzoai.cloud.models.get_ai_messages200_response import GetAiMessages200Response
|
||||
from hanzoai.cloud.models.get_ai_nodes200_response import GetAiNodes200Response
|
||||
from hanzoai.cloud.models.get_ai_providers200_response import GetAiProviders200Response
|
||||
from hanzoai.cloud.models.get_ai_records200_response import GetAiRecords200Response
|
||||
from hanzoai.cloud.models.get_ai_remote_connections200_response import GetAiRemoteConnections200Response
|
||||
from hanzoai.cloud.models.get_ai_router_history200_response import GetAiRouterHistory200Response
|
||||
from hanzoai.cloud.models.get_ai_router_judge_panel200_response import GetAiRouterJudgePanel200Response
|
||||
from hanzoai.cloud.models.get_ai_router_stats200_response import GetAiRouterStats200Response
|
||||
from hanzoai.cloud.models.get_ai_routes200_response import GetAiRoutes200Response
|
||||
from hanzoai.cloud.models.get_ai_scales200_response import GetAiScales200Response
|
||||
from hanzoai.cloud.models.get_ai_scans200_response import GetAiScans200Response
|
||||
from hanzoai.cloud.models.get_ai_signin_sessions200_response import GetAiSigninSessions200Response
|
||||
from hanzoai.cloud.models.get_ai_stores200_response import GetAiStores200Response
|
||||
from hanzoai.cloud.models.get_ai_tasks200_response import GetAiTasks200Response
|
||||
from hanzoai.cloud.models.get_ai_templates200_response import GetAiTemplates200Response
|
||||
from hanzoai.cloud.models.get_ai_traffic_globe200_response import GetAiTrafficGlobe200Response
|
||||
from hanzoai.cloud.models.get_ai_usages200_response import GetAiUsages200Response
|
||||
from hanzoai.cloud.models.get_ai_vectors200_response import GetAiVectors200Response
|
||||
from hanzoai.cloud.models.get_ai_videos200_response import GetAiVideos200Response
|
||||
from hanzoai.cloud.models.get_ai_workflows200_response import GetAiWorkflows200Response
|
||||
from hanzoai.cloud.models.get_models_providers200_response import GetModelsProviders200Response
|
||||
from hanzoai.cloud.models.git_ops_app import GitOpsApp
|
||||
from hanzoai.cloud.models.git_ops_deploy import GitOpsDeploy
|
||||
from hanzoai.cloud.models.git_ops_operation import GitOpsOperation
|
||||
@@ -606,6 +702,7 @@ from hanzoai.cloud.models.gpu_alert_list import GpuAlertList
|
||||
from hanzoai.cloud.models.gpu_job import GpuJob
|
||||
from hanzoai.cloud.models.gpu_list import GpuList
|
||||
from hanzoai.cloud.models.gpu_view import GpuView
|
||||
from hanzoai.cloud.models.graph import Graph
|
||||
from hanzoai.cloud.models.graph_assert_in import GraphAssertIn
|
||||
from hanzoai.cloud.models.graph_assert_out import GraphAssertOut
|
||||
from hanzoai.cloud.models.graph_edge import GraphEdge
|
||||
@@ -637,6 +734,10 @@ from hanzoai.cloud.models.help_category import HelpCategory
|
||||
from hanzoai.cloud.models.help_category_list import HelpCategoryList
|
||||
from hanzoai.cloud.models.help_ticket_filed import HelpTicketFiled
|
||||
from hanzoai.cloud.models.help_ticket_intake import HelpTicketIntake
|
||||
from hanzoai.cloud.models.hf_dataset import HfDataset
|
||||
from hanzoai.cloud.models.hf_model import HfModel
|
||||
from hanzoai.cloud.models.hf_repo_info import HfRepoInfo
|
||||
from hanzoai.cloud.models.hf_sibling import HfSibling
|
||||
from hanzoai.cloud.models.history_out import HistoryOut
|
||||
from hanzoai.cloud.models.hit import Hit
|
||||
from hanzoai.cloud.models.holder import Holder
|
||||
@@ -764,6 +865,7 @@ from hanzoai.cloud.models.indexers_out import IndexersOut
|
||||
from hanzoai.cloud.models.info_out import InfoOut
|
||||
from hanzoai.cloud.models.ingest_req import IngestReq
|
||||
from hanzoai.cloud.models.ingest_resp import IngestResp
|
||||
from hanzoai.cloud.models.ingest_stats import IngestStats
|
||||
from hanzoai.cloud.models.ingress_middlewares import IngressMiddlewares
|
||||
from hanzoai.cloud.models.ingress_routes import IngressRoutes
|
||||
from hanzoai.cloud.models.ingress_services import IngressServices
|
||||
@@ -818,8 +920,10 @@ from hanzoai.cloud.models.kyc_session import KycSession
|
||||
from hanzoai.cloud.models.kyc_start_out import KycStartOut
|
||||
from hanzoai.cloud.models.llm import LLM
|
||||
from hanzoai.cloud.models.llm_overview import LLMOverview
|
||||
from hanzoai.cloud.models.label import Label
|
||||
from hanzoai.cloud.models.last_event_view import LastEventView
|
||||
from hanzoai.cloud.models.latency_stat import LatencyStat
|
||||
from hanzoai.cloud.models.layout import Layout
|
||||
from hanzoai.cloud.models.leader_row import LeaderRow
|
||||
from hanzoai.cloud.models.leaderboard import Leaderboard
|
||||
from hanzoai.cloud.models.leaderboard_row import LeaderboardRow
|
||||
@@ -879,10 +983,12 @@ from hanzoai.cloud.models.mcp_catalog import McpCatalog
|
||||
from hanzoai.cloud.models.mcp_catalog_sync import McpCatalogSync
|
||||
from hanzoai.cloud.models.mcp_server_list import McpServerList
|
||||
from hanzoai.cloud.models.meet_health import MeetHealth
|
||||
from hanzoai.cloud.models.memory import Memory
|
||||
from hanzoai.cloud.models.memory_entry import MemoryEntry
|
||||
from hanzoai.cloud.models.memory_page import MemoryPage
|
||||
from hanzoai.cloud.models.mesh_service_list import MeshServiceList
|
||||
from hanzoai.cloud.models.mesh_view import MeshView
|
||||
from hanzoai.cloud.models.message import Message
|
||||
from hanzoai.cloud.models.message_input import MessageInput
|
||||
from hanzoai.cloud.models.message_list import MessageList
|
||||
from hanzoai.cloud.models.metric_body import MetricBody
|
||||
@@ -902,11 +1008,15 @@ from hanzoai.cloud.models.ml_resource import MlResource
|
||||
from hanzoai.cloud.models.ml_resource_list import MlResourceList
|
||||
from hanzoai.cloud.models.mode import Mode
|
||||
from hanzoai.cloud.models.mode_in import ModeIn
|
||||
from hanzoai.cloud.models.model_access import ModelAccess
|
||||
from hanzoai.cloud.models.model_field import ModelField
|
||||
from hanzoai.cloud.models.model_history import ModelHistory
|
||||
from hanzoai.cloud.models.model_route import ModelRoute
|
||||
from hanzoai.cloud.models.model_row import ModelRow
|
||||
from hanzoai.cloud.models.model_search_result import ModelSearchResult
|
||||
from hanzoai.cloud.models.model_stat import ModelStat
|
||||
from hanzoai.cloud.models.module_info import ModuleInfo
|
||||
from hanzoai.cloud.models.model_tool_call import ModelToolCall
|
||||
from hanzoai.cloud.models.module import Module
|
||||
from hanzoai.cloud.models.module_list import ModuleList
|
||||
from hanzoai.cloud.models.module_state import ModuleState
|
||||
from hanzoai.cloud.models.mutate_req import MutateReq
|
||||
@@ -919,6 +1029,7 @@ from hanzoai.cloud.models.new_issue import NewIssue
|
||||
from hanzoai.cloud.models.news_item import NewsItem
|
||||
from hanzoai.cloud.models.news_response import NewsResponse
|
||||
from hanzoai.cloud.models.next_in import NextIn
|
||||
from hanzoai.cloud.models.node import Node
|
||||
from hanzoai.cloud.models.node_list import NodeList
|
||||
from hanzoai.cloud.models.node_pool_view import NodePoolView
|
||||
from hanzoai.cloud.models.node_view import NodeView
|
||||
@@ -1717,9 +1828,34 @@ from hanzoai.cloud.models.onboard_req import OnboardReq
|
||||
from hanzoai.cloud.models.onboard_resp import OnboardResp
|
||||
from hanzoai.cloud.models.op import Op
|
||||
from hanzoai.cloud.models.open_req import OpenReq
|
||||
from hanzoai.cloud.models.opp_list import OppList
|
||||
from hanzoai.cloud.models.opp_req import OppReq
|
||||
from hanzoai.cloud.models.opportunity import Opportunity
|
||||
from hanzoai.cloud.models.openai_audio_response import OpenaiAudioResponse
|
||||
from hanzoai.cloud.models.openai_audio_response_segments_inner import OpenaiAudioResponseSegmentsInner
|
||||
from hanzoai.cloud.models.openai_audio_response_words_inner import OpenaiAudioResponseWordsInner
|
||||
from hanzoai.cloud.models.openai_chat_completion_choice import OpenaiChatCompletionChoice
|
||||
from hanzoai.cloud.models.openai_chat_completion_message import OpenaiChatCompletionMessage
|
||||
from hanzoai.cloud.models.openai_chat_completion_response import OpenaiChatCompletionResponse
|
||||
from hanzoai.cloud.models.openai_chat_message_image_url import OpenaiChatMessageImageURL
|
||||
from hanzoai.cloud.models.openai_chat_message_part import OpenaiChatMessagePart
|
||||
from hanzoai.cloud.models.openai_completion_tokens_details import OpenaiCompletionTokensDetails
|
||||
from hanzoai.cloud.models.openai_content_filter_results import OpenaiContentFilterResults
|
||||
from hanzoai.cloud.models.openai_embedding import OpenaiEmbedding
|
||||
from hanzoai.cloud.models.openai_embedding_response import OpenaiEmbeddingResponse
|
||||
from hanzoai.cloud.models.openai_function_call import OpenaiFunctionCall
|
||||
from hanzoai.cloud.models.openai_hate import OpenaiHate
|
||||
from hanzoai.cloud.models.openai_image_response import OpenaiImageResponse
|
||||
from hanzoai.cloud.models.openai_image_response_data_inner import OpenaiImageResponseDataInner
|
||||
from hanzoai.cloud.models.openai_jail_break import OpenaiJailBreak
|
||||
from hanzoai.cloud.models.openai_log_prob import OpenaiLogProb
|
||||
from hanzoai.cloud.models.openai_log_probs import OpenaiLogProbs
|
||||
from hanzoai.cloud.models.openai_profanity import OpenaiProfanity
|
||||
from hanzoai.cloud.models.openai_prompt_filter_result import OpenaiPromptFilterResult
|
||||
from hanzoai.cloud.models.openai_prompt_tokens_details import OpenaiPromptTokensDetails
|
||||
from hanzoai.cloud.models.openai_self_harm import OpenaiSelfHarm
|
||||
from hanzoai.cloud.models.openai_sexual import OpenaiSexual
|
||||
from hanzoai.cloud.models.openai_tool_call import OpenaiToolCall
|
||||
from hanzoai.cloud.models.openai_top_log_probs import OpenaiTopLogProbs
|
||||
from hanzoai.cloud.models.openai_usage import OpenaiUsage
|
||||
from hanzoai.cloud.models.openai_violence import OpenaiViolence
|
||||
from hanzoai.cloud.models.optin_view import OptinView
|
||||
from hanzoai.cloud.models.oracle_view import OracleView
|
||||
from hanzoai.cloud.models.oracles_out import OraclesOut
|
||||
@@ -1745,7 +1881,7 @@ from hanzoai.cloud.models.pairing import Pairing
|
||||
from hanzoai.cloud.models.pairing_approved import PairingApproved
|
||||
from hanzoai.cloud.models.pairing_queue import PairingQueue
|
||||
from hanzoai.cloud.models.pairing_view import PairingView
|
||||
from hanzoai.cloud.models.patch_application_in import PatchApplicationIn
|
||||
from hanzoai.cloud.models.patch import Patch
|
||||
from hanzoai.cloud.models.patch_flow_in import PatchFlowIn
|
||||
from hanzoai.cloud.models.patch_in import PatchIn
|
||||
from hanzoai.cloud.models.patch_session_in import PatchSessionIn
|
||||
@@ -1785,8 +1921,40 @@ from hanzoai.cloud.models.pool_create import PoolCreate
|
||||
from hanzoai.cloud.models.pool_scale import PoolScale
|
||||
from hanzoai.cloud.models.populated_flow import PopulatedFlow
|
||||
from hanzoai.cloud.models.position import Position
|
||||
from hanzoai.cloud.models.post_ai_articles200_response import PostAiArticles200Response
|
||||
from hanzoai.cloud.models.post_ai_assets200_response import PostAiAssets200Response
|
||||
from hanzoai.cloud.models.post_ai_chats200_response import PostAiChats200Response
|
||||
from hanzoai.cloud.models.post_ai_connections200_response import PostAiConnections200Response
|
||||
from hanzoai.cloud.models.post_ai_deployments200_response import PostAiDeployments200Response
|
||||
from hanzoai.cloud.models.post_ai_feedback200_response import PostAiFeedback200Response
|
||||
from hanzoai.cloud.models.post_ai_files200_response import PostAiFiles200Response
|
||||
from hanzoai.cloud.models.post_ai_finetune_cancel200_response import PostAiFinetuneCancel200Response
|
||||
from hanzoai.cloud.models.post_ai_finetune_deploy200_response import PostAiFinetuneDeploy200Response
|
||||
from hanzoai.cloud.models.post_ai_forms200_response import PostAiForms200Response
|
||||
from hanzoai.cloud.models.post_ai_graphs200_response import PostAiGraphs200Response
|
||||
from hanzoai.cloud.models.post_ai_memory_delete200_response import PostAiMemoryDelete200Response
|
||||
from hanzoai.cloud.models.post_ai_memory_remember200_response import PostAiMemoryRemember200Response
|
||||
from hanzoai.cloud.models.post_ai_messages200_response import PostAiMessages200Response
|
||||
from hanzoai.cloud.models.post_ai_nodes200_response import PostAiNodes200Response
|
||||
from hanzoai.cloud.models.post_ai_providers200_response import PostAiProviders200Response
|
||||
from hanzoai.cloud.models.post_ai_rag_embed200_response import PostAiRagEmbed200Response
|
||||
from hanzoai.cloud.models.post_ai_rag_ingest200_response import PostAiRagIngest200Response
|
||||
from hanzoai.cloud.models.post_ai_records200_response import PostAiRecords200Response
|
||||
from hanzoai.cloud.models.post_ai_remote_connections200_response import PostAiRemoteConnections200Response
|
||||
from hanzoai.cloud.models.post_ai_routes200_response import PostAiRoutes200Response
|
||||
from hanzoai.cloud.models.post_ai_scales200_response import PostAiScales200Response
|
||||
from hanzoai.cloud.models.post_ai_scans200_response import PostAiScans200Response
|
||||
from hanzoai.cloud.models.post_ai_signin_sessions200_response import PostAiSigninSessions200Response
|
||||
from hanzoai.cloud.models.post_ai_stores200_response import PostAiStores200Response
|
||||
from hanzoai.cloud.models.post_ai_tasks200_response import PostAiTasks200Response
|
||||
from hanzoai.cloud.models.post_ai_templates200_response import PostAiTemplates200Response
|
||||
from hanzoai.cloud.models.post_ai_tree_files200_response import PostAiTreeFiles200Response
|
||||
from hanzoai.cloud.models.post_ai_vectors200_response import PostAiVectors200Response
|
||||
from hanzoai.cloud.models.post_ai_videos200_response import PostAiVideos200Response
|
||||
from hanzoai.cloud.models.post_ai_workflows200_response import PostAiWorkflows200Response
|
||||
from hanzoai.cloud.models.post_event_request import PostEventRequest
|
||||
from hanzoai.cloud.models.post_list import PostList
|
||||
from hanzoai.cloud.models.post_models_by_model_access200_response import PostModelsByModelAccess200Response
|
||||
from hanzoai.cloud.models.prefs_view import PrefsView
|
||||
from hanzoai.cloud.models.preset import Preset
|
||||
from hanzoai.cloud.models.preset_accepted import PresetAccepted
|
||||
@@ -1809,7 +1977,6 @@ from hanzoai.cloud.models.product_event import ProductEvent
|
||||
from hanzoai.cloud.models.product_row import ProductRow
|
||||
from hanzoai.cloud.models.profile_metrics import ProfileMetrics
|
||||
from hanzoai.cloud.models.profile_response import ProfileResponse
|
||||
from hanzoai.cloud.models.program_application import ProgramApplication
|
||||
from hanzoai.cloud.models.progress_view import ProgressView
|
||||
from hanzoai.cloud.models.project_view import ProjectView
|
||||
from hanzoai.cloud.models.projection_view import ProjectionView
|
||||
@@ -1845,7 +2012,9 @@ from hanzoai.cloud.models.prompt_list import PromptList
|
||||
from hanzoai.cloud.models.prompt_meta import PromptMeta
|
||||
from hanzoai.cloud.models.prompt_req import PromptReq
|
||||
from hanzoai.cloud.models.prop_spec import PropSpec
|
||||
from hanzoai.cloud.models.properties import Properties
|
||||
from hanzoai.cloud.models.provenance import Provenance
|
||||
from hanzoai.cloud.models.provider import Provider
|
||||
from hanzoai.cloud.models.provider_breakdown import ProviderBreakdown
|
||||
from hanzoai.cloud.models.provider_info import ProviderInfo
|
||||
from hanzoai.cloud.models.provider_row import ProviderRow
|
||||
@@ -1877,6 +2046,7 @@ from hanzoai.cloud.models.question import Question
|
||||
from hanzoai.cloud.models.questions_response import QuestionsResponse
|
||||
from hanzoai.cloud.models.quote import Quote
|
||||
from hanzoai.cloud.models.quote_list import QuoteList
|
||||
from hanzoai.cloud.models.rag_embed_result import RagEmbedResult
|
||||
from hanzoai.cloud.models.raise_in import RaiseIn
|
||||
from hanzoai.cloud.models.ran import Ran
|
||||
from hanzoai.cloud.models.range import Range
|
||||
@@ -1934,7 +2104,9 @@ from hanzoai.cloud.models.registry_tag_list import RegistryTagList
|
||||
from hanzoai.cloud.models.registry_token import RegistryToken
|
||||
from hanzoai.cloud.models.release_board import ReleaseBoard
|
||||
from hanzoai.cloud.models.release_row import ReleaseRow
|
||||
from hanzoai.cloud.models.remark import Remark
|
||||
from hanzoai.cloud.models.remittance import Remittance
|
||||
from hanzoai.cloud.models.remote_app import RemoteApp
|
||||
from hanzoai.cloud.models.renew_req import RenewReq
|
||||
from hanzoai.cloud.models.renew_result import RenewResult
|
||||
from hanzoai.cloud.models.replace_kit_in import ReplaceKitIn
|
||||
@@ -1950,6 +2122,8 @@ from hanzoai.cloud.models.report_run_in import ReportRunIn
|
||||
from hanzoai.cloud.models.request import Request
|
||||
from hanzoai.cloud.models.resolve_reference_in import ResolveReferenceIn
|
||||
from hanzoai.cloud.models.resolve_reference_out import ResolveReferenceOut
|
||||
from hanzoai.cloud.models.resource_metrics import ResourceMetrics
|
||||
from hanzoai.cloud.models.resource_requests import ResourceRequests
|
||||
from hanzoai.cloud.models.resource_usage import ResourceUsage
|
||||
from hanzoai.cloud.models.responsible import Responsible
|
||||
from hanzoai.cloud.models.restart_ref import RestartRef
|
||||
@@ -2064,6 +2238,7 @@ from hanzoai.cloud.models.sandbox_list import SandboxList
|
||||
from hanzoai.cloud.models.sbom_health import SbomHealth
|
||||
from hanzoai.cloud.models.sbom_ingest import SbomIngest
|
||||
from hanzoai.cloud.models.sbom_ingested import SbomIngested
|
||||
from hanzoai.cloud.models.scale import Scale
|
||||
from hanzoai.cloud.models.scan import Scan
|
||||
from hanzoai.cloud.models.scan_detail import ScanDetail
|
||||
from hanzoai.cloud.models.scan_draft import ScanDraft
|
||||
@@ -2077,7 +2252,6 @@ from hanzoai.cloud.models.score_config_view import ScoreConfigView
|
||||
from hanzoai.cloud.models.score_list import ScoreList
|
||||
from hanzoai.cloud.models.score_req import ScoreReq
|
||||
from hanzoai.cloud.models.score_view import ScoreView
|
||||
from hanzoai.cloud.models.screen_result import ScreenResult
|
||||
from hanzoai.cloud.models.search_in import SearchIn
|
||||
from hanzoai.cloud.models.search_out import SearchOut
|
||||
from hanzoai.cloud.models.search_results import SearchResults
|
||||
@@ -2111,6 +2285,10 @@ from hanzoai.cloud.models.sequence_view import SequenceView
|
||||
from hanzoai.cloud.models.sequences import Sequences
|
||||
from hanzoai.cloud.models.series_line import SeriesLine
|
||||
from hanzoai.cloud.models.series_point import SeriesPoint
|
||||
from hanzoai.cloud.models.service import Service
|
||||
from hanzoai.cloud.models.service_detail import ServiceDetail
|
||||
from hanzoai.cloud.models.service_port import ServicePort
|
||||
from hanzoai.cloud.models.session import Session
|
||||
from hanzoai.cloud.models.session_detail import SessionDetail
|
||||
from hanzoai.cloud.models.session_ended import SessionEnded
|
||||
from hanzoai.cloud.models.session_list import SessionList
|
||||
@@ -2156,7 +2334,6 @@ from hanzoai.cloud.models.span_body import SpanBody
|
||||
from hanzoai.cloud.models.spec import Spec
|
||||
from hanzoai.cloud.models.spend import Spend
|
||||
from hanzoai.cloud.models.spend_point import SpendPoint
|
||||
from hanzoai.cloud.models.stage_event import StageEvent
|
||||
from hanzoai.cloud.models.starter_kit import StarterKit
|
||||
from hanzoai.cloud.models.state import State
|
||||
from hanzoai.cloud.models.state_graph import StateGraph
|
||||
@@ -2173,6 +2350,7 @@ from hanzoai.cloud.models.step_settings import StepSettings
|
||||
from hanzoai.cloud.models.step_view import StepView
|
||||
from hanzoai.cloud.models.stop_in import StopIn
|
||||
from hanzoai.cloud.models.stopped import Stopped
|
||||
from hanzoai.cloud.models.store import Store
|
||||
from hanzoai.cloud.models.storefront_result import StorefrontResult
|
||||
from hanzoai.cloud.models.strategy import Strategy
|
||||
from hanzoai.cloud.models.strategy_view import StrategyView
|
||||
@@ -2201,6 +2379,7 @@ from hanzoai.cloud.models.summary_resp import SummaryResp
|
||||
from hanzoai.cloud.models.summary_view import SummaryView
|
||||
from hanzoai.cloud.models.suppression import Suppression
|
||||
from hanzoai.cloud.models.suppression_list import SuppressionList
|
||||
from hanzoai.cloud.models.sweep import Sweep
|
||||
from hanzoai.cloud.models.symbol import Symbol
|
||||
from hanzoai.cloud.models.sync_list import SyncList
|
||||
from hanzoai.cloud.models.sync_queued import SyncQueued
|
||||
@@ -2215,13 +2394,16 @@ from hanzoai.cloud.models.target_req import TargetReq
|
||||
from hanzoai.cloud.models.target_view import TargetView
|
||||
from hanzoai.cloud.models.tariff import Tariff
|
||||
from hanzoai.cloud.models.tariff_in import TariffIn
|
||||
from hanzoai.cloud.models.task import Task
|
||||
from hanzoai.cloud.models.taxon import Taxon
|
||||
from hanzoai.cloud.models.taxon_in import TaxonIn
|
||||
from hanzoai.cloud.models.taxonomy import Taxonomy
|
||||
from hanzoai.cloud.models.team_room import TeamRoom
|
||||
from hanzoai.cloud.models.team_room_bind import TeamRoomBind
|
||||
from hanzoai.cloud.models.team_rooms import TeamRooms
|
||||
from hanzoai.cloud.models.template import Template
|
||||
from hanzoai.cloud.models.template_catalog import TemplateCatalog
|
||||
from hanzoai.cloud.models.template_config_option import TemplateConfigOption
|
||||
from hanzoai.cloud.models.template_override import TemplateOverride
|
||||
from hanzoai.cloud.models.template_reply import TemplateReply
|
||||
from hanzoai.cloud.models.template_view import TemplateView
|
||||
@@ -2244,7 +2426,12 @@ from hanzoai.cloud.models.total_view import TotalView
|
||||
from hanzoai.cloud.models.trace_list import TraceList
|
||||
from hanzoai.cloud.models.trace_view import TraceView
|
||||
from hanzoai.cloud.models.traffic_caller import TrafficCaller
|
||||
from hanzoai.cloud.models.traffic_country_count import TrafficCountryCount
|
||||
from hanzoai.cloud.models.traffic_globe import TrafficGlobe
|
||||
from hanzoai.cloud.models.traffic_point import TrafficPoint
|
||||
from hanzoai.cloud.models.traffic_totals import TrafficTotals
|
||||
from hanzoai.cloud.models.traffic_view import TrafficView
|
||||
from hanzoai.cloud.models.traffic_window import TrafficWindow
|
||||
from hanzoai.cloud.models.trail_page import TrailPage
|
||||
from hanzoai.cloud.models.transaction import Transaction
|
||||
from hanzoai.cloud.models.transactions import Transactions
|
||||
@@ -2255,6 +2442,7 @@ from hanzoai.cloud.models.transition_result import TransitionResult
|
||||
from hanzoai.cloud.models.treasury_report import TreasuryReport
|
||||
from hanzoai.cloud.models.tree_entry import TreeEntry
|
||||
from hanzoai.cloud.models.tree_entry_json import TreeEntryJSON
|
||||
from hanzoai.cloud.models.tree_file import TreeFile
|
||||
from hanzoai.cloud.models.tree_json import TreeJSON
|
||||
from hanzoai.cloud.models.tree_node import TreeNode
|
||||
from hanzoai.cloud.models.trial import Trial
|
||||
@@ -2308,6 +2496,8 @@ from hanzoai.cloud.models.user_optin_view import UserOptinView
|
||||
from hanzoai.cloud.models.validator_claim import ValidatorClaim
|
||||
from hanzoai.cloud.models.validator_list import ValidatorList
|
||||
from hanzoai.cloud.models.variant import Variant
|
||||
from hanzoai.cloud.models.vector import Vector
|
||||
from hanzoai.cloud.models.vector_score import VectorScore
|
||||
from hanzoai.cloud.models.vendor_row import VendorRow
|
||||
from hanzoai.cloud.models.vendors_out import VendorsOut
|
||||
from hanzoai.cloud.models.venue import Venue
|
||||
@@ -2321,6 +2511,7 @@ from hanzoai.cloud.models.version_message import VersionMessage
|
||||
from hanzoai.cloud.models.version_meta import VersionMeta
|
||||
from hanzoai.cloud.models.version_page import VersionPage
|
||||
from hanzoai.cloud.models.version_view import VersionView
|
||||
from hanzoai.cloud.models.video import Video
|
||||
from hanzoai.cloud.models.voucher import Voucher
|
||||
from hanzoai.cloud.models.waiting import Waiting
|
||||
from hanzoai.cloud.models.wallet import Wallet
|
||||
@@ -2338,6 +2529,7 @@ from hanzoai.cloud.models.wire_fact import WireFact
|
||||
from hanzoai.cloud.models.wire_instructions import WireInstructions
|
||||
from hanzoai.cloud.models.worker_list import WorkerList
|
||||
from hanzoai.cloud.models.worker_script_put import WorkerScriptPut
|
||||
from hanzoai.cloud.models.workflow import Workflow
|
||||
from hanzoai.cloud.models.world_index import WorldIndex
|
||||
from hanzoai.cloud.models.world_wire import WorldWire
|
||||
from hanzoai.cloud.models.write_in import WriteIn
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Activity(BaseModel):
|
||||
"""
|
||||
Activity
|
||||
""" # noqa: E501
|
||||
field_count: Optional[Dict[str, StrictInt]] = Field(default=None, alias="FieldCount")
|
||||
var_date: Optional[StrictStr] = Field(default=None, alias="date")
|
||||
__properties: ClassVar[List[str]] = ["FieldCount", "date"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Activity from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Activity from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"FieldCount": obj.get("FieldCount"),
|
||||
"date": obj.get("date")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AgentMcpTools(BaseModel):
|
||||
"""
|
||||
AgentMcpTools
|
||||
""" # noqa: E501
|
||||
is_enabled: Optional[StrictBool] = Field(default=None, alias="isEnabled")
|
||||
server_name: Optional[StrictStr] = Field(default=None, alias="serverName")
|
||||
tools: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["isEnabled", "serverName", "tools"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AgentMcpTools from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AgentMcpTools from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"isEnabled": obj.get("isEnabled"),
|
||||
"serverName": obj.get("serverName"),
|
||||
"tools": obj.get("tools")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiAiConnResponse(BaseModel):
|
||||
"""
|
||||
AiAiConnResponse
|
||||
""" # noqa: E501
|
||||
account_label: Optional[StrictStr] = None
|
||||
connected: Optional[StrictBool] = None
|
||||
provider: Optional[StrictStr] = None
|
||||
updated_at: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["account_label", "connected", "provider", "updated_at"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiAiConnResponse from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiAiConnResponse from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"account_label": obj.get("account_label"),
|
||||
"connected": obj.get("connected"),
|
||||
"provider": obj.get("provider"),
|
||||
"updated_at": obj.get("updated_at")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiAnthropicContentBlock(BaseModel):
|
||||
"""
|
||||
AiAnthropicContentBlock
|
||||
""" # noqa: E501
|
||||
text: Optional[StrictStr] = None
|
||||
type: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["text", "type"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiAnthropicContentBlock from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiAnthropicContentBlock from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"text": obj.get("text"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_anthropic_content_block import AiAnthropicContentBlock
|
||||
from hanzoai.cloud.models.ai_anthropic_usage import AiAnthropicUsage
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiAnthropicResponse(BaseModel):
|
||||
"""
|
||||
AiAnthropicResponse
|
||||
""" # noqa: E501
|
||||
content: Optional[List[AiAnthropicContentBlock]] = None
|
||||
id: Optional[StrictStr] = None
|
||||
model: Optional[StrictStr] = None
|
||||
role: Optional[StrictStr] = None
|
||||
stop_reason: Optional[StrictStr] = None
|
||||
type: Optional[StrictStr] = None
|
||||
usage: Optional[AiAnthropicUsage] = None
|
||||
__properties: ClassVar[List[str]] = ["content", "id", "model", "role", "stop_reason", "type", "usage"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiAnthropicResponse from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in content (list)
|
||||
_items = []
|
||||
if self.content:
|
||||
for _item_content in self.content:
|
||||
if _item_content:
|
||||
_items.append(_item_content.to_dict())
|
||||
_dict['content'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of usage
|
||||
if self.usage:
|
||||
_dict['usage'] = self.usage.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiAnthropicResponse from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"content": [AiAnthropicContentBlock.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None,
|
||||
"id": obj.get("id"),
|
||||
"model": obj.get("model"),
|
||||
"role": obj.get("role"),
|
||||
"stop_reason": obj.get("stop_reason"),
|
||||
"type": obj.get("type"),
|
||||
"usage": AiAnthropicUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiAnthropicUsage(BaseModel):
|
||||
"""
|
||||
AiAnthropicUsage
|
||||
""" # noqa: E501
|
||||
input_tokens: Optional[StrictInt] = None
|
||||
output_tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["input_tokens", "output_tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiAnthropicUsage from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiAnthropicUsage from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"input_tokens": obj.get("input_tokens"),
|
||||
"output_tokens": obj.get("output_tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiCostStats(BaseModel):
|
||||
"""
|
||||
AiCostStats
|
||||
""" # noqa: E501
|
||||
baseline_model: Optional[StrictStr] = None
|
||||
counterfactual_index: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
cumulative_saved_index: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
priced_events: Optional[StrictInt] = None
|
||||
routed_index: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
saved_pct: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
__properties: ClassVar[List[str]] = ["baseline_model", "counterfactual_index", "cumulative_saved_index", "priced_events", "routed_index", "saved_pct"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiCostStats from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiCostStats from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"baseline_model": obj.get("baseline_model"),
|
||||
"counterfactual_index": obj.get("counterfactual_index"),
|
||||
"cumulative_saved_index": obj.get("cumulative_saved_index"),
|
||||
"priced_events": obj.get("priced_events"),
|
||||
"routed_index": obj.get("routed_index"),
|
||||
"saved_pct": obj.get("saved_pct")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiHistoryDay(BaseModel):
|
||||
"""
|
||||
AiHistoryDay
|
||||
""" # noqa: E501
|
||||
by_task: Optional[Dict[str, StrictInt]] = None
|
||||
cost_saved_index: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
cumulative_cost_saved: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
var_date: Optional[StrictStr] = Field(default=None, alias="date")
|
||||
events: Optional[StrictInt] = None
|
||||
learned_share: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
reward_rate: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
rewarded_events: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["by_task", "cost_saved_index", "cumulative_cost_saved", "date", "events", "learned_share", "reward_rate", "rewarded_events"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiHistoryDay from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiHistoryDay from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"by_task": obj.get("by_task"),
|
||||
"cost_saved_index": obj.get("cost_saved_index"),
|
||||
"cumulative_cost_saved": obj.get("cumulative_cost_saved"),
|
||||
"date": obj.get("date"),
|
||||
"events": obj.get("events"),
|
||||
"learned_share": obj.get("learned_share"),
|
||||
"reward_rate": obj.get("reward_rate"),
|
||||
"rewarded_events": obj.get("rewarded_events")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiHistoryRetrain(BaseModel):
|
||||
"""
|
||||
AiHistoryRetrain
|
||||
""" # noqa: E501
|
||||
var_date: Optional[StrictStr] = Field(default=None, alias="date")
|
||||
events: Optional[StrictInt] = None
|
||||
gate_base: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
gate_metric: Optional[StrictStr] = None
|
||||
gate_pass: Optional[StrictBool] = None
|
||||
gate_value: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
holdout_accuracy: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
published: Optional[StrictBool] = None
|
||||
trained_time: Optional[StrictStr] = None
|
||||
version: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["date", "events", "gate_base", "gate_metric", "gate_pass", "gate_value", "holdout_accuracy", "published", "trained_time", "version"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiHistoryRetrain from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiHistoryRetrain from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"date": obj.get("date"),
|
||||
"events": obj.get("events"),
|
||||
"gate_base": obj.get("gate_base"),
|
||||
"gate_metric": obj.get("gate_metric"),
|
||||
"gate_pass": obj.get("gate_pass"),
|
||||
"gate_value": obj.get("gate_value"),
|
||||
"holdout_accuracy": obj.get("holdout_accuracy"),
|
||||
"published": obj.get("published"),
|
||||
"trained_time": obj.get("trained_time"),
|
||||
"version": obj.get("version")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiHistoryTotals(BaseModel):
|
||||
"""
|
||||
AiHistoryTotals
|
||||
""" # noqa: E501
|
||||
cumulative_cost_saved: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
days_active: Optional[StrictInt] = None
|
||||
events: Optional[StrictInt] = None
|
||||
reward_rate: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
__properties: ClassVar[List[str]] = ["cumulative_cost_saved", "days_active", "events", "reward_rate"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiHistoryTotals from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiHistoryTotals from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"cumulative_cost_saved": obj.get("cumulative_cost_saved"),
|
||||
"days_active": obj.get("days_active"),
|
||||
"events": obj.get("events"),
|
||||
"reward_rate": obj.get("reward_rate")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiHistoryWindow(BaseModel):
|
||||
"""
|
||||
AiHistoryWindow
|
||||
""" # noqa: E501
|
||||
days: Optional[StrictInt] = None
|
||||
since: Optional[StrictStr] = None
|
||||
until: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["days", "since", "until"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiHistoryWindow from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiHistoryWindow from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"days": obj.get("days"),
|
||||
"since": obj.get("since"),
|
||||
"until": obj.get("until")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiJudgeBenchmark(BaseModel):
|
||||
"""
|
||||
AiJudgeBenchmark
|
||||
""" # noqa: E501
|
||||
mfjp: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
naive_mean: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="naiveMean")
|
||||
single_adversary: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="singleAdversary")
|
||||
single_noisy: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="singleNoisy")
|
||||
__properties: ClassVar[List[str]] = ["mfjp", "naiveMean", "singleAdversary", "singleNoisy"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiJudgeBenchmark from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiJudgeBenchmark from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"mfjp": obj.get("mfjp"),
|
||||
"naiveMean": obj.get("naiveMean"),
|
||||
"singleAdversary": obj.get("singleAdversary"),
|
||||
"singleNoisy": obj.get("singleNoisy")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from hanzoai.cloud.models.ai_judge_benchmark import AiJudgeBenchmark
|
||||
from hanzoai.cloud.models.ai_panel_judge import AiPanelJudge
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiJudgePanelState(BaseModel):
|
||||
"""
|
||||
AiJudgePanelState
|
||||
""" # noqa: E501
|
||||
available: Optional[StrictBool] = None
|
||||
benchmark: Optional[AiJudgeBenchmark] = None
|
||||
enabled: Optional[StrictBool] = None
|
||||
judges: Optional[List[AiPanelJudge]] = None
|
||||
models: Optional[List[StrictStr]] = None
|
||||
sample_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="sampleRate")
|
||||
__properties: ClassVar[List[str]] = ["available", "benchmark", "enabled", "judges", "models", "sampleRate"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiJudgePanelState from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of benchmark
|
||||
if self.benchmark:
|
||||
_dict['benchmark'] = self.benchmark.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in judges (list)
|
||||
_items = []
|
||||
if self.judges:
|
||||
for _item_judges in self.judges:
|
||||
if _item_judges:
|
||||
_items.append(_item_judges.to_dict())
|
||||
_dict['judges'] = _items
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiJudgePanelState from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"available": obj.get("available"),
|
||||
"benchmark": AiJudgeBenchmark.from_dict(obj["benchmark"]) if obj.get("benchmark") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"judges": [AiPanelJudge.from_dict(_item) for _item in obj["judges"]] if obj.get("judges") is not None else None,
|
||||
"models": obj.get("models"),
|
||||
"sampleRate": obj.get("sampleRate")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
+7
-9
@@ -22,13 +22,12 @@ from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ModuleInfo(BaseModel):
|
||||
class AiModelAccessInfo(BaseModel):
|
||||
"""
|
||||
ModuleInfo
|
||||
AiModelAccessInfo
|
||||
""" # noqa: E501
|
||||
doctypes: Optional[List[StrictStr]] = None
|
||||
module: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["doctypes", "module"]
|
||||
state: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["state"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@@ -48,7 +47,7 @@ class ModuleInfo(BaseModel):
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of ModuleInfo from a JSON string"""
|
||||
"""Create an instance of AiModelAccessInfo from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
@@ -73,7 +72,7 @@ class ModuleInfo(BaseModel):
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ModuleInfo from a dict"""
|
||||
"""Create an instance of AiModelAccessInfo from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -81,8 +80,7 @@ class ModuleInfo(BaseModel):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"doctypes": obj.get("doctypes"),
|
||||
"module": obj.get("module")
|
||||
"state": obj.get("state")
|
||||
})
|
||||
return _obj
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_model_access_info import AiModelAccessInfo
|
||||
from hanzoai.cloud.models.ai_model_pricing_info import AiModelPricingInfo
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiModelInfo(BaseModel):
|
||||
"""
|
||||
AiModelInfo
|
||||
""" # noqa: E501
|
||||
access: Optional[AiModelAccessInfo] = None
|
||||
context_window: Optional[StrictInt] = None
|
||||
created: Optional[StrictInt] = None
|
||||
id: Optional[StrictStr] = None
|
||||
max_output_tokens: Optional[StrictInt] = None
|
||||
object: Optional[StrictStr] = None
|
||||
outputs: Optional[List[StrictStr]] = None
|
||||
owned_by: Optional[StrictStr] = None
|
||||
premium: Optional[StrictBool] = None
|
||||
pricing: Optional[AiModelPricingInfo] = None
|
||||
provider: Optional[StrictStr] = None
|
||||
supports_tools: Optional[StrictBool] = None
|
||||
supports_vision: Optional[StrictBool] = None
|
||||
__properties: ClassVar[List[str]] = ["access", "context_window", "created", "id", "max_output_tokens", "object", "outputs", "owned_by", "premium", "pricing", "provider", "supports_tools", "supports_vision"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiModelInfo from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of access
|
||||
if self.access:
|
||||
_dict['access'] = self.access.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of pricing
|
||||
if self.pricing:
|
||||
_dict['pricing'] = self.pricing.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiModelInfo from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"access": AiModelAccessInfo.from_dict(obj["access"]) if obj.get("access") is not None else None,
|
||||
"context_window": obj.get("context_window"),
|
||||
"created": obj.get("created"),
|
||||
"id": obj.get("id"),
|
||||
"max_output_tokens": obj.get("max_output_tokens"),
|
||||
"object": obj.get("object"),
|
||||
"outputs": obj.get("outputs"),
|
||||
"owned_by": obj.get("owned_by"),
|
||||
"premium": obj.get("premium"),
|
||||
"pricing": AiModelPricingInfo.from_dict(obj["pricing"]) if obj.get("pricing") is not None else None,
|
||||
"provider": obj.get("provider"),
|
||||
"supports_tools": obj.get("supports_tools"),
|
||||
"supports_vision": obj.get("supports_vision")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_model_info import AiModelInfo
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiModelList(BaseModel):
|
||||
"""
|
||||
AiModelList
|
||||
""" # noqa: E501
|
||||
data: Optional[List[AiModelInfo]] = None
|
||||
models: Optional[List[AiModelInfo]] = None
|
||||
object: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["data", "models", "object"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiModelList from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in models (list)
|
||||
_items = []
|
||||
if self.models:
|
||||
for _item_models in self.models:
|
||||
if _item_models:
|
||||
_items.append(_item_models.to_dict())
|
||||
_dict['models'] = _items
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiModelList from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [AiModelInfo.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"models": [AiModelInfo.from_dict(_item) for _item in obj["models"]] if obj.get("models") is not None else None,
|
||||
"object": obj.get("object")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiModelPricingInfo(BaseModel):
|
||||
"""
|
||||
AiModelPricingInfo
|
||||
""" # noqa: E501
|
||||
input: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
output: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
__properties: ClassVar[List[str]] = ["input", "output"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiModelPricingInfo from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiModelPricingInfo from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"input": obj.get("input"),
|
||||
"output": obj.get("output")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiModelProviders(BaseModel):
|
||||
"""
|
||||
AiModelProviders
|
||||
""" # noqa: E501
|
||||
providers: Optional[List[StrictStr]] = None
|
||||
__properties: ClassVar[List[str]] = ["providers"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiModelProviders from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiModelProviders from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"providers": obj.get("providers")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiPanelJudge(BaseModel):
|
||||
"""
|
||||
AiPanelJudge
|
||||
""" # noqa: E501
|
||||
mean: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
model: Optional[StrictStr] = None
|
||||
n: Optional[StrictInt] = None
|
||||
weight: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
__properties: ClassVar[List[str]] = ["mean", "model", "n", "weight"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiPanelJudge from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiPanelJudge from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"mean": obj.get("mean"),
|
||||
"model": obj.get("model"),
|
||||
"n": obj.get("n"),
|
||||
"weight": obj.get("weight")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_provider_usage_model_spend import AiProviderUsageModelSpend
|
||||
from hanzoai.cloud.models.ai_provider_usage_series_point import AiProviderUsageSeriesPoint
|
||||
from hanzoai.cloud.models.ai_provider_usage_totals import AiProviderUsageTotals
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiProviderUsage(BaseModel):
|
||||
"""
|
||||
AiProviderUsage
|
||||
""" # noqa: E501
|
||||
available: Optional[StrictBool] = None
|
||||
by_model: Optional[List[AiProviderUsageModelSpend]] = Field(default=None, alias="byModel")
|
||||
connected: Optional[StrictBool] = None
|
||||
currency: Optional[StrictStr] = None
|
||||
end: Optional[StrictStr] = None
|
||||
interval: Optional[StrictStr] = None
|
||||
note: Optional[StrictStr] = None
|
||||
provider: Optional[StrictStr] = None
|
||||
series: Optional[List[AiProviderUsageSeriesPoint]] = None
|
||||
start: Optional[StrictStr] = None
|
||||
totals: Optional[AiProviderUsageTotals] = None
|
||||
__properties: ClassVar[List[str]] = ["available", "byModel", "connected", "currency", "end", "interval", "note", "provider", "series", "start", "totals"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiProviderUsage from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in by_model (list)
|
||||
_items = []
|
||||
if self.by_model:
|
||||
for _item_by_model in self.by_model:
|
||||
if _item_by_model:
|
||||
_items.append(_item_by_model.to_dict())
|
||||
_dict['byModel'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in series (list)
|
||||
_items = []
|
||||
if self.series:
|
||||
for _item_series in self.series:
|
||||
if _item_series:
|
||||
_items.append(_item_series.to_dict())
|
||||
_dict['series'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of totals
|
||||
if self.totals:
|
||||
_dict['totals'] = self.totals.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiProviderUsage from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"available": obj.get("available"),
|
||||
"byModel": [AiProviderUsageModelSpend.from_dict(_item) for _item in obj["byModel"]] if obj.get("byModel") is not None else None,
|
||||
"connected": obj.get("connected"),
|
||||
"currency": obj.get("currency"),
|
||||
"end": obj.get("end"),
|
||||
"interval": obj.get("interval"),
|
||||
"note": obj.get("note"),
|
||||
"provider": obj.get("provider"),
|
||||
"series": [AiProviderUsageSeriesPoint.from_dict(_item) for _item in obj["series"]] if obj.get("series") is not None else None,
|
||||
"start": obj.get("start"),
|
||||
"totals": AiProviderUsageTotals.from_dict(obj["totals"]) if obj.get("totals") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiProviderUsageModelSpend(BaseModel):
|
||||
"""
|
||||
AiProviderUsageModelSpend
|
||||
""" # noqa: E501
|
||||
model: Optional[StrictStr] = None
|
||||
requests: Optional[StrictInt] = None
|
||||
spend_cents: Optional[StrictInt] = Field(default=None, alias="spendCents")
|
||||
tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["model", "requests", "spendCents", "tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiProviderUsageModelSpend from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiProviderUsageModelSpend from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"model": obj.get("model"),
|
||||
"requests": obj.get("requests"),
|
||||
"spendCents": obj.get("spendCents"),
|
||||
"tokens": obj.get("tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiProviderUsageSeriesPoint(BaseModel):
|
||||
"""
|
||||
AiProviderUsageSeriesPoint
|
||||
""" # noqa: E501
|
||||
requests: Optional[StrictInt] = None
|
||||
spend_cents: Optional[StrictInt] = Field(default=None, alias="spendCents")
|
||||
t: Optional[StrictStr] = None
|
||||
tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["requests", "spendCents", "t", "tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiProviderUsageSeriesPoint from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiProviderUsageSeriesPoint from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"requests": obj.get("requests"),
|
||||
"spendCents": obj.get("spendCents"),
|
||||
"t": obj.get("t"),
|
||||
"tokens": obj.get("tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiProviderUsageTotals(BaseModel):
|
||||
"""
|
||||
AiProviderUsageTotals
|
||||
""" # noqa: E501
|
||||
input_tokens: Optional[StrictInt] = Field(default=None, alias="inputTokens")
|
||||
output_tokens: Optional[StrictInt] = Field(default=None, alias="outputTokens")
|
||||
requests: Optional[StrictInt] = None
|
||||
spend_cents: Optional[StrictInt] = Field(default=None, alias="spendCents")
|
||||
tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["inputTokens", "outputTokens", "requests", "spendCents", "tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiProviderUsageTotals from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiProviderUsageTotals from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"inputTokens": obj.get("inputTokens"),
|
||||
"outputTokens": obj.get("outputTokens"),
|
||||
"requests": obj.get("requests"),
|
||||
"spendCents": obj.get("spendCents"),
|
||||
"tokens": obj.get("tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiQualityStats(BaseModel):
|
||||
"""
|
||||
AiQualityStats
|
||||
""" # noqa: E501
|
||||
avg_confidence: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
learned_share: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
reward_rate: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
rewarded_events: Optional[StrictInt] = None
|
||||
shadow_agreement: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
__properties: ClassVar[List[str]] = ["avg_confidence", "learned_share", "reward_rate", "rewarded_events", "shadow_agreement"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiQualityStats from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiQualityStats from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"avg_confidence": obj.get("avg_confidence"),
|
||||
"learned_share": obj.get("learned_share"),
|
||||
"reward_rate": obj.get("reward_rate"),
|
||||
"rewarded_events": obj.get("rewarded_events"),
|
||||
"shadow_agreement": obj.get("shadow_agreement")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiRankUsage(BaseModel):
|
||||
"""
|
||||
AiRankUsage
|
||||
""" # noqa: E501
|
||||
total_tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["total_tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiRankUsage from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiRankUsage from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"total_tokens": obj.get("total_tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from hanzoai.cloud.models.ai_ranked_text import AiRankedText
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiRankedDoc(BaseModel):
|
||||
"""
|
||||
AiRankedDoc
|
||||
""" # noqa: E501
|
||||
document: Optional[AiRankedText] = None
|
||||
index: Optional[StrictInt] = None
|
||||
relevance_score: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
__properties: ClassVar[List[str]] = ["document", "index", "relevance_score"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiRankedDoc from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of document
|
||||
if self.document:
|
||||
_dict['document'] = self.document.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiRankedDoc from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"document": AiRankedText.from_dict(obj["document"]) if obj.get("document") is not None else None,
|
||||
"index": obj.get("index"),
|
||||
"relevance_score": obj.get("relevance_score")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiRankedText(BaseModel):
|
||||
"""
|
||||
AiRankedText
|
||||
""" # noqa: E501
|
||||
text: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["text"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiRankedText from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiRankedText from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"text": obj.get("text")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_rank_usage import AiRankUsage
|
||||
from hanzoai.cloud.models.ai_ranked_doc import AiRankedDoc
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiRanking(BaseModel):
|
||||
"""
|
||||
AiRanking
|
||||
""" # noqa: E501
|
||||
model: Optional[StrictStr] = None
|
||||
object: Optional[StrictStr] = None
|
||||
results: Optional[List[AiRankedDoc]] = None
|
||||
usage: Optional[AiRankUsage] = None
|
||||
__properties: ClassVar[List[str]] = ["model", "object", "results", "usage"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiRanking from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
||||
_items = []
|
||||
if self.results:
|
||||
for _item_results in self.results:
|
||||
if _item_results:
|
||||
_items.append(_item_results.to_dict())
|
||||
_dict['results'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of usage
|
||||
if self.usage:
|
||||
_dict['usage'] = self.usage.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiRanking from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"model": obj.get("model"),
|
||||
"object": obj.get("object"),
|
||||
"results": [AiRankedDoc.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None,
|
||||
"usage": AiRankUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiResponse(BaseModel):
|
||||
"""
|
||||
AiResponse
|
||||
""" # noqa: E501
|
||||
code: Optional[StrictStr] = None
|
||||
data: Optional[Any] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: Optional[StrictStr] = None
|
||||
status: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["code", "data", "data2", "msg", "status"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiResponse from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# set to None if data (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data is None and "data" in self.model_fields_set:
|
||||
_dict['data'] = None
|
||||
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiResponse from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"code": obj.get("code"),
|
||||
"data": obj.get("data"),
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiResponsesInputDetails(BaseModel):
|
||||
"""
|
||||
AiResponsesInputDetails
|
||||
""" # noqa: E501
|
||||
cached_tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["cached_tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesInputDetails from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesInputDetails from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"cached_tokens": obj.get("cached_tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiResponsesOutputDetails(BaseModel):
|
||||
"""
|
||||
AiResponsesOutputDetails
|
||||
""" # noqa: E501
|
||||
reasoning_tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["reasoning_tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesOutputDetails from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesOutputDetails from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"reasoning_tokens": obj.get("reasoning_tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from hanzoai.cloud.models.ai_responses_tool import AiResponsesTool
|
||||
from hanzoai.cloud.models.ai_responses_usage import AiResponsesUsage
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiResponsesResource(BaseModel):
|
||||
"""
|
||||
AiResponsesResource
|
||||
""" # noqa: E501
|
||||
created_at: Optional[StrictInt] = None
|
||||
error: Optional[Any] = None
|
||||
id: Optional[StrictStr] = None
|
||||
incomplete_details: Optional[Any] = None
|
||||
instructions: Optional[StrictStr] = None
|
||||
max_output_tokens: Optional[StrictInt] = None
|
||||
metadata: Optional[Dict[str, StrictStr]] = None
|
||||
model: Optional[StrictStr] = None
|
||||
object: Optional[StrictStr] = None
|
||||
output: Optional[List[Any]] = None
|
||||
parallel_tool_calls: Optional[StrictBool] = None
|
||||
previous_response_id: Optional[Any] = None
|
||||
reasoning: Optional[Any] = None
|
||||
status: Optional[StrictStr] = None
|
||||
store: Optional[StrictBool] = None
|
||||
temperature: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
text: Optional[Any] = None
|
||||
tool_choice: Optional[Any] = None
|
||||
tools: Optional[List[AiResponsesTool]] = None
|
||||
top_p: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
usage: Optional[AiResponsesUsage] = None
|
||||
__properties: ClassVar[List[str]] = ["created_at", "error", "id", "incomplete_details", "instructions", "max_output_tokens", "metadata", "model", "object", "output", "parallel_tool_calls", "previous_response_id", "reasoning", "status", "store", "temperature", "text", "tool_choice", "tools", "top_p", "usage"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesResource from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in tools (list)
|
||||
_items = []
|
||||
if self.tools:
|
||||
for _item_tools in self.tools:
|
||||
if _item_tools:
|
||||
_items.append(_item_tools.to_dict())
|
||||
_dict['tools'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of usage
|
||||
if self.usage:
|
||||
_dict['usage'] = self.usage.to_dict()
|
||||
# set to None if error (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.error is None and "error" in self.model_fields_set:
|
||||
_dict['error'] = None
|
||||
|
||||
# set to None if incomplete_details (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.incomplete_details is None and "incomplete_details" in self.model_fields_set:
|
||||
_dict['incomplete_details'] = None
|
||||
|
||||
# set to None if previous_response_id (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.previous_response_id is None and "previous_response_id" in self.model_fields_set:
|
||||
_dict['previous_response_id'] = None
|
||||
|
||||
# set to None if reasoning (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.reasoning is None and "reasoning" in self.model_fields_set:
|
||||
_dict['reasoning'] = None
|
||||
|
||||
# set to None if text (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.text is None and "text" in self.model_fields_set:
|
||||
_dict['text'] = None
|
||||
|
||||
# set to None if tool_choice (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.tool_choice is None and "tool_choice" in self.model_fields_set:
|
||||
_dict['tool_choice'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesResource from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"created_at": obj.get("created_at"),
|
||||
"error": obj.get("error"),
|
||||
"id": obj.get("id"),
|
||||
"incomplete_details": obj.get("incomplete_details"),
|
||||
"instructions": obj.get("instructions"),
|
||||
"max_output_tokens": obj.get("max_output_tokens"),
|
||||
"metadata": obj.get("metadata"),
|
||||
"model": obj.get("model"),
|
||||
"object": obj.get("object"),
|
||||
"output": obj.get("output"),
|
||||
"parallel_tool_calls": obj.get("parallel_tool_calls"),
|
||||
"previous_response_id": obj.get("previous_response_id"),
|
||||
"reasoning": obj.get("reasoning"),
|
||||
"status": obj.get("status"),
|
||||
"store": obj.get("store"),
|
||||
"temperature": obj.get("temperature"),
|
||||
"text": obj.get("text"),
|
||||
"tool_choice": obj.get("tool_choice"),
|
||||
"tools": [AiResponsesTool.from_dict(_item) for _item in obj["tools"]] if obj.get("tools") is not None else None,
|
||||
"top_p": obj.get("top_p"),
|
||||
"usage": AiResponsesUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictBool, StrictBytes, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiResponsesTool(BaseModel):
|
||||
"""
|
||||
AiResponsesTool
|
||||
""" # noqa: E501
|
||||
description: Optional[StrictStr] = None
|
||||
format: Optional[Union[StrictBytes, StrictStr]] = None
|
||||
name: Optional[StrictStr] = None
|
||||
parameters: Optional[Union[StrictBytes, StrictStr]] = None
|
||||
strict: Optional[StrictBool] = None
|
||||
type: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["description", "format", "name", "parameters", "strict", "type"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesTool from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesTool from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"description": obj.get("description"),
|
||||
"format": obj.get("format"),
|
||||
"name": obj.get("name"),
|
||||
"parameters": obj.get("parameters"),
|
||||
"strict": obj.get("strict"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_responses_input_details import AiResponsesInputDetails
|
||||
from hanzoai.cloud.models.ai_responses_output_details import AiResponsesOutputDetails
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiResponsesUsage(BaseModel):
|
||||
"""
|
||||
AiResponsesUsage
|
||||
""" # noqa: E501
|
||||
input_tokens: Optional[StrictInt] = None
|
||||
input_tokens_details: Optional[AiResponsesInputDetails] = None
|
||||
output_tokens: Optional[StrictInt] = None
|
||||
output_tokens_details: Optional[AiResponsesOutputDetails] = None
|
||||
total_tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["input_tokens", "input_tokens_details", "output_tokens", "output_tokens_details", "total_tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesUsage from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of input_tokens_details
|
||||
if self.input_tokens_details:
|
||||
_dict['input_tokens_details'] = self.input_tokens_details.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of output_tokens_details
|
||||
if self.output_tokens_details:
|
||||
_dict['output_tokens_details'] = self.output_tokens_details.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiResponsesUsage from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"input_tokens": obj.get("input_tokens"),
|
||||
"input_tokens_details": AiResponsesInputDetails.from_dict(obj["input_tokens_details"]) if obj.get("input_tokens_details") is not None else None,
|
||||
"output_tokens": obj.get("output_tokens"),
|
||||
"output_tokens_details": AiResponsesOutputDetails.from_dict(obj["output_tokens_details"]) if obj.get("output_tokens_details") is not None else None,
|
||||
"total_tokens": obj.get("total_tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiRetrainMeta(BaseModel):
|
||||
"""
|
||||
AiRetrainMeta
|
||||
""" # noqa: E501
|
||||
events: Optional[StrictInt] = None
|
||||
gate_base: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
gate_kind: Optional[StrictStr] = None
|
||||
gate_metric: Optional[StrictStr] = None
|
||||
gate_passed: Optional[StrictBool] = None
|
||||
gate_value: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
note: Optional[StrictStr] = None
|
||||
published: Optional[StrictBool] = None
|
||||
trained_time: Optional[StrictStr] = None
|
||||
version: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["events", "gate_base", "gate_kind", "gate_metric", "gate_passed", "gate_value", "note", "published", "trained_time", "version"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiRetrainMeta from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiRetrainMeta from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"events": obj.get("events"),
|
||||
"gate_base": obj.get("gate_base"),
|
||||
"gate_kind": obj.get("gate_kind"),
|
||||
"gate_metric": obj.get("gate_metric"),
|
||||
"gate_passed": obj.get("gate_passed"),
|
||||
"gate_value": obj.get("gate_value"),
|
||||
"note": obj.get("note"),
|
||||
"published": obj.get("published"),
|
||||
"trained_time": obj.get("trained_time"),
|
||||
"version": obj.get("version")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_history_day import AiHistoryDay
|
||||
from hanzoai.cloud.models.ai_history_retrain import AiHistoryRetrain
|
||||
from hanzoai.cloud.models.ai_history_totals import AiHistoryTotals
|
||||
from hanzoai.cloud.models.ai_history_window import AiHistoryWindow
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiRouterHistory(BaseModel):
|
||||
"""
|
||||
AiRouterHistory
|
||||
""" # noqa: E501
|
||||
daily: Optional[List[AiHistoryDay]] = None
|
||||
retrains: Optional[List[AiHistoryRetrain]] = None
|
||||
scope: Optional[StrictStr] = None
|
||||
totals: Optional[AiHistoryTotals] = None
|
||||
window: Optional[AiHistoryWindow] = None
|
||||
__properties: ClassVar[List[str]] = ["daily", "retrains", "scope", "totals", "window"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiRouterHistory from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in daily (list)
|
||||
_items = []
|
||||
if self.daily:
|
||||
for _item_daily in self.daily:
|
||||
if _item_daily:
|
||||
_items.append(_item_daily.to_dict())
|
||||
_dict['daily'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in retrains (list)
|
||||
_items = []
|
||||
if self.retrains:
|
||||
for _item_retrains in self.retrains:
|
||||
if _item_retrains:
|
||||
_items.append(_item_retrains.to_dict())
|
||||
_dict['retrains'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of totals
|
||||
if self.totals:
|
||||
_dict['totals'] = self.totals.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of window
|
||||
if self.window:
|
||||
_dict['window'] = self.window.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiRouterHistory from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"daily": [AiHistoryDay.from_dict(_item) for _item in obj["daily"]] if obj.get("daily") is not None else None,
|
||||
"retrains": [AiHistoryRetrain.from_dict(_item) for _item in obj["retrains"]] if obj.get("retrains") is not None else None,
|
||||
"scope": obj.get("scope"),
|
||||
"totals": AiHistoryTotals.from_dict(obj["totals"]) if obj.get("totals") is not None else None,
|
||||
"window": AiHistoryWindow.from_dict(obj["window"]) if obj.get("window") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_cost_stats import AiCostStats
|
||||
from hanzoai.cloud.models.ai_quality_stats import AiQualityStats
|
||||
from hanzoai.cloud.models.ai_retrain_meta import AiRetrainMeta
|
||||
from hanzoai.cloud.models.ai_stats_window import AiStatsWindow
|
||||
from hanzoai.cloud.models.ai_task_stats import AiTaskStats
|
||||
from hanzoai.cloud.models.ai_throughput_stats import AiThroughputStats
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiRouterStats(BaseModel):
|
||||
"""
|
||||
AiRouterStats
|
||||
""" # noqa: E501
|
||||
by_model: Optional[Dict[str, StrictInt]] = None
|
||||
by_source: Optional[Dict[str, StrictInt]] = None
|
||||
by_task: Optional[Dict[str, AiTaskStats]] = None
|
||||
cost: Optional[AiCostStats] = None
|
||||
org: Optional[StrictStr] = None
|
||||
quality: Optional[AiQualityStats] = None
|
||||
retrain: Optional[AiRetrainMeta] = None
|
||||
scope: Optional[StrictStr] = None
|
||||
throughput: Optional[AiThroughputStats] = None
|
||||
window: Optional[AiStatsWindow] = None
|
||||
__properties: ClassVar[List[str]] = ["by_model", "by_source", "by_task", "cost", "org", "quality", "retrain", "scope", "throughput", "window"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiRouterStats from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each value in by_task (dict)
|
||||
_field_dict = {}
|
||||
if self.by_task:
|
||||
for _key_by_task in self.by_task:
|
||||
if self.by_task[_key_by_task]:
|
||||
_field_dict[_key_by_task] = self.by_task[_key_by_task].to_dict()
|
||||
_dict['by_task'] = _field_dict
|
||||
# override the default output from pydantic by calling `to_dict()` of cost
|
||||
if self.cost:
|
||||
_dict['cost'] = self.cost.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of quality
|
||||
if self.quality:
|
||||
_dict['quality'] = self.quality.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of retrain
|
||||
if self.retrain:
|
||||
_dict['retrain'] = self.retrain.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of throughput
|
||||
if self.throughput:
|
||||
_dict['throughput'] = self.throughput.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of window
|
||||
if self.window:
|
||||
_dict['window'] = self.window.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiRouterStats from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"by_model": obj.get("by_model"),
|
||||
"by_source": obj.get("by_source"),
|
||||
"by_task": dict(
|
||||
(_k, AiTaskStats.from_dict(_v))
|
||||
for _k, _v in obj["by_task"].items()
|
||||
)
|
||||
if obj.get("by_task") is not None
|
||||
else None,
|
||||
"cost": AiCostStats.from_dict(obj["cost"]) if obj.get("cost") is not None else None,
|
||||
"org": obj.get("org"),
|
||||
"quality": AiQualityStats.from_dict(obj["quality"]) if obj.get("quality") is not None else None,
|
||||
"retrain": AiRetrainMeta.from_dict(obj["retrain"]) if obj.get("retrain") is not None else None,
|
||||
"scope": obj.get("scope"),
|
||||
"throughput": AiThroughputStats.from_dict(obj["throughput"]) if obj.get("throughput") is not None else None,
|
||||
"window": AiStatsWindow.from_dict(obj["window"]) if obj.get("window") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiRoutingRewardResult(BaseModel):
|
||||
"""
|
||||
AiRoutingRewardResult
|
||||
""" # noqa: E501
|
||||
recorded: Optional[StrictBool] = None
|
||||
request_id: Optional[StrictStr] = None
|
||||
reward: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
__properties: ClassVar[List[str]] = ["recorded", "request_id", "reward"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiRoutingRewardResult from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiRoutingRewardResult from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"recorded": obj.get("recorded"),
|
||||
"request_id": obj.get("request_id"),
|
||||
"reward": obj.get("reward")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiStatsWindow(BaseModel):
|
||||
"""
|
||||
AiStatsWindow
|
||||
""" # noqa: E501
|
||||
events: Optional[StrictInt] = None
|
||||
since: Optional[StrictStr] = None
|
||||
until: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["events", "since", "until"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiStatsWindow from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiStatsWindow from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"events": obj.get("events"),
|
||||
"since": obj.get("since"),
|
||||
"until": obj.get("until")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiTaskStats(BaseModel):
|
||||
"""
|
||||
AiTaskStats
|
||||
""" # noqa: E501
|
||||
events: Optional[StrictInt] = None
|
||||
models: Optional[Dict[str, StrictInt]] = None
|
||||
__properties: ClassVar[List[str]] = ["events", "models"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiTaskStats from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiTaskStats from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"events": obj.get("events"),
|
||||
"models": obj.get("models")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiThroughputStats(BaseModel):
|
||||
"""
|
||||
AiThroughputStats
|
||||
""" # noqa: E501
|
||||
per_hour: Optional[List[StrictInt]] = None
|
||||
total_window: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["per_hour", "total_window"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiThroughputStats from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiThroughputStats from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"per_hour": obj.get("per_hour"),
|
||||
"total_window": obj.get("total_window")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiTokenCount(BaseModel):
|
||||
"""
|
||||
AiTokenCount
|
||||
""" # noqa: E501
|
||||
input_tokens: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["input_tokens"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiTokenCount from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiTokenCount from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"input_tokens": obj.get("input_tokens")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiVideoFailure(BaseModel):
|
||||
"""
|
||||
AiVideoFailure
|
||||
""" # noqa: E501
|
||||
message: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["message"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiVideoFailure from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiVideoFailure from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"message": obj.get("message")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_video_failure import AiVideoFailure
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AiVideoStatus(BaseModel):
|
||||
"""
|
||||
AiVideoStatus
|
||||
""" # noqa: E501
|
||||
created_at: Optional[StrictInt] = None
|
||||
error: Optional[AiVideoFailure] = None
|
||||
id: Optional[StrictStr] = None
|
||||
model: Optional[StrictStr] = None
|
||||
object: Optional[StrictStr] = None
|
||||
progress: Optional[StrictInt] = None
|
||||
status: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["created_at", "error", "id", "model", "object", "progress", "status"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of AiVideoStatus from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of error
|
||||
if self.error:
|
||||
_dict['error'] = self.error.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AiVideoStatus from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"created_at": obj.get("created_at"),
|
||||
"error": AiVideoFailure.from_dict(obj["error"]) if obj.get("error") is not None else None,
|
||||
"id": obj.get("id"),
|
||||
"model": obj.get("model"),
|
||||
"object": obj.get("object"),
|
||||
"progress": obj.get("progress"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.application_config_option import ApplicationConfigOption
|
||||
from hanzoai.cloud.models.application_view import ApplicationView
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class App(BaseModel):
|
||||
"""
|
||||
App
|
||||
""" # noqa: E501
|
||||
basic_config_options: Optional[List[ApplicationConfigOption]] = Field(default=None, alias="basicConfigOptions")
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
description: Optional[StrictStr] = None
|
||||
details: Optional[ApplicationView] = None
|
||||
display_name: Optional[StrictStr] = Field(default=None, alias="displayName")
|
||||
manifest: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
namespace: Optional[StrictStr] = None
|
||||
owner: Optional[StrictStr] = None
|
||||
parameters: Optional[StrictStr] = None
|
||||
status: Optional[StrictStr] = None
|
||||
template: Optional[StrictStr] = None
|
||||
updated_time: Optional[StrictStr] = Field(default=None, alias="updatedTime")
|
||||
url: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["basicConfigOptions", "createdTime", "description", "details", "displayName", "manifest", "name", "namespace", "owner", "parameters", "status", "template", "updatedTime", "url"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of App from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in basic_config_options (list)
|
||||
_items = []
|
||||
if self.basic_config_options:
|
||||
for _item_basic_config_options in self.basic_config_options:
|
||||
if _item_basic_config_options:
|
||||
_items.append(_item_basic_config_options.to_dict())
|
||||
_dict['basicConfigOptions'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of details
|
||||
if self.details:
|
||||
_dict['details'] = self.details.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of App from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"basicConfigOptions": [ApplicationConfigOption.from_dict(_item) for _item in obj["basicConfigOptions"]] if obj.get("basicConfigOptions") is not None else None,
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"description": obj.get("description"),
|
||||
"details": ApplicationView.from_dict(obj["details"]) if obj.get("details") is not None else None,
|
||||
"displayName": obj.get("displayName"),
|
||||
"manifest": obj.get("manifest"),
|
||||
"name": obj.get("name"),
|
||||
"namespace": obj.get("namespace"),
|
||||
"owner": obj.get("owner"),
|
||||
"parameters": obj.get("parameters"),
|
||||
"status": obj.get("status"),
|
||||
"template": obj.get("template"),
|
||||
"updatedTime": obj.get("updatedTime"),
|
||||
"url": obj.get("url")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ApplicationConfigOption(BaseModel):
|
||||
"""
|
||||
ApplicationConfigOption
|
||||
""" # noqa: E501
|
||||
parameter: Optional[StrictStr] = None
|
||||
setting: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["parameter", "setting"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of ApplicationConfigOption from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ApplicationConfigOption from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"parameter": obj.get("parameter"),
|
||||
"setting": obj.get("setting")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ApplicationEvent(BaseModel):
|
||||
"""
|
||||
ApplicationEvent
|
||||
""" # noqa: E501
|
||||
count: Optional[StrictInt] = None
|
||||
first_time: Optional[StrictStr] = Field(default=None, alias="firstTime")
|
||||
involved_object: Optional[StrictStr] = Field(default=None, alias="involvedObject")
|
||||
last_time: Optional[StrictStr] = Field(default=None, alias="lastTime")
|
||||
message: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
reason: Optional[StrictStr] = None
|
||||
source: Optional[StrictStr] = None
|
||||
type: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["count", "firstTime", "involvedObject", "lastTime", "message", "name", "reason", "source", "type"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of ApplicationEvent from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ApplicationEvent from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"count": obj.get("count"),
|
||||
"firstTime": obj.get("firstTime"),
|
||||
"involvedObject": obj.get("involvedObject"),
|
||||
"lastTime": obj.get("lastTime"),
|
||||
"message": obj.get("message"),
|
||||
"name": obj.get("name"),
|
||||
"reason": obj.get("reason"),
|
||||
"source": obj.get("source"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.application_event import ApplicationEvent
|
||||
from hanzoai.cloud.models.deployment_detail import DeploymentDetail
|
||||
from hanzoai.cloud.models.env_variable import EnvVariable
|
||||
from hanzoai.cloud.models.resource_metrics import ResourceMetrics
|
||||
from hanzoai.cloud.models.service_detail import ServiceDetail
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ApplicationView(BaseModel):
|
||||
"""
|
||||
ApplicationView
|
||||
""" # noqa: E501
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
credentials: Optional[List[EnvVariable]] = None
|
||||
deployments: Optional[List[DeploymentDetail]] = None
|
||||
events: Optional[List[ApplicationEvent]] = None
|
||||
metrics: Optional[ResourceMetrics] = None
|
||||
namespace: Optional[StrictStr] = None
|
||||
services: Optional[List[ServiceDetail]] = None
|
||||
status: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["createdTime", "credentials", "deployments", "events", "metrics", "namespace", "services", "status"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of ApplicationView from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in credentials (list)
|
||||
_items = []
|
||||
if self.credentials:
|
||||
for _item_credentials in self.credentials:
|
||||
if _item_credentials:
|
||||
_items.append(_item_credentials.to_dict())
|
||||
_dict['credentials'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in deployments (list)
|
||||
_items = []
|
||||
if self.deployments:
|
||||
for _item_deployments in self.deployments:
|
||||
if _item_deployments:
|
||||
_items.append(_item_deployments.to_dict())
|
||||
_dict['deployments'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in events (list)
|
||||
_items = []
|
||||
if self.events:
|
||||
for _item_events in self.events:
|
||||
if _item_events:
|
||||
_items.append(_item_events.to_dict())
|
||||
_dict['events'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of metrics
|
||||
if self.metrics:
|
||||
_dict['metrics'] = self.metrics.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in services (list)
|
||||
_items = []
|
||||
if self.services:
|
||||
for _item_services in self.services:
|
||||
if _item_services:
|
||||
_items.append(_item_services.to_dict())
|
||||
_dict['services'] = _items
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ApplicationView from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"credentials": [EnvVariable.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None,
|
||||
"deployments": [DeploymentDetail.from_dict(_item) for _item in obj["deployments"]] if obj.get("deployments") is not None else None,
|
||||
"events": [ApplicationEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None,
|
||||
"metrics": ResourceMetrics.from_dict(obj["metrics"]) if obj.get("metrics") is not None else None,
|
||||
"namespace": obj.get("namespace"),
|
||||
"services": [ServiceDetail.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None,
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.block import Block
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Article(BaseModel):
|
||||
"""
|
||||
Article
|
||||
""" # noqa: E501
|
||||
content: Optional[List[Block]] = None
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
display_name: Optional[StrictStr] = Field(default=None, alias="displayName")
|
||||
glossary: Optional[List[StrictStr]] = None
|
||||
name: Optional[StrictStr] = None
|
||||
owner: Optional[StrictStr] = None
|
||||
text: Optional[StrictStr] = None
|
||||
type: Optional[StrictStr] = None
|
||||
workflow: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["content", "createdTime", "displayName", "glossary", "name", "owner", "text", "type", "workflow"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Article from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in content (list)
|
||||
_items = []
|
||||
if self.content:
|
||||
for _item_content in self.content:
|
||||
if _item_content:
|
||||
_items.append(_item_content.to_dict())
|
||||
_dict['content'] = _items
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Article from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"content": [Block.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None,
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"displayName": obj.get("displayName"),
|
||||
"glossary": obj.get("glossary"),
|
||||
"name": obj.get("name"),
|
||||
"owner": obj.get("owner"),
|
||||
"text": obj.get("text"),
|
||||
"type": obj.get("type"),
|
||||
"workflow": obj.get("workflow")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Asset(BaseModel):
|
||||
"""
|
||||
Asset
|
||||
""" # noqa: E501
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
display_name: Optional[StrictStr] = Field(default=None, alias="displayName")
|
||||
id: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
owner: Optional[StrictStr] = None
|
||||
password: Optional[StrictStr] = None
|
||||
properties: Optional[StrictStr] = None
|
||||
provider: Optional[StrictStr] = None
|
||||
region: Optional[StrictStr] = None
|
||||
state: Optional[StrictStr] = None
|
||||
tag: Optional[StrictStr] = None
|
||||
type: Optional[StrictStr] = None
|
||||
updated_time: Optional[StrictStr] = Field(default=None, alias="updatedTime")
|
||||
username: Optional[StrictStr] = None
|
||||
zone: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["createdTime", "displayName", "id", "name", "owner", "password", "properties", "provider", "region", "state", "tag", "type", "updatedTime", "username", "zone"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Asset from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Asset from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"displayName": obj.get("displayName"),
|
||||
"id": obj.get("id"),
|
||||
"name": obj.get("name"),
|
||||
"owner": obj.get("owner"),
|
||||
"password": obj.get("password"),
|
||||
"properties": obj.get("properties"),
|
||||
"provider": obj.get("provider"),
|
||||
"region": obj.get("region"),
|
||||
"state": obj.get("state"),
|
||||
"tag": obj.get("tag"),
|
||||
"type": obj.get("type"),
|
||||
"updatedTime": obj.get("updatedTime"),
|
||||
"username": obj.get("username"),
|
||||
"zone": obj.get("zone")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Audit(BaseModel):
|
||||
"""
|
||||
Audit
|
||||
""" # noqa: E501
|
||||
action: Optional[StrictStr] = None
|
||||
block: Optional[StrictStr] = None
|
||||
block2: Optional[StrictStr] = None
|
||||
block_hash: Optional[StrictStr] = Field(default=None, alias="blockHash")
|
||||
block_hash2: Optional[StrictStr] = Field(default=None, alias="blockHash2")
|
||||
city: Optional[StrictStr] = None
|
||||
client_ip: Optional[StrictStr] = Field(default=None, alias="clientIp")
|
||||
count: Optional[StrictInt] = None
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
error_text: Optional[StrictStr] = Field(default=None, alias="errorText")
|
||||
id: Optional[StrictInt] = None
|
||||
is_triggered: Optional[StrictBool] = Field(default=None, alias="isTriggered")
|
||||
language: Optional[StrictStr] = None
|
||||
method: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
need_commit: Optional[StrictBool] = Field(default=None, alias="needCommit")
|
||||
object: Optional[StrictStr] = None
|
||||
organization: Optional[StrictStr] = None
|
||||
owner: Optional[StrictStr] = None
|
||||
provider: Optional[StrictStr] = None
|
||||
provider2: Optional[StrictStr] = None
|
||||
query: Optional[StrictStr] = None
|
||||
region: Optional[StrictStr] = None
|
||||
request_uri: Optional[StrictStr] = Field(default=None, alias="requestUri")
|
||||
response: Optional[StrictStr] = None
|
||||
section: Optional[StrictStr] = None
|
||||
transaction: Optional[StrictStr] = None
|
||||
transaction2: Optional[StrictStr] = None
|
||||
unit: Optional[StrictStr] = None
|
||||
user: Optional[StrictStr] = None
|
||||
user_agent: Optional[StrictStr] = Field(default=None, alias="userAgent")
|
||||
__properties: ClassVar[List[str]] = ["action", "block", "block2", "blockHash", "blockHash2", "city", "clientIp", "count", "createdTime", "errorText", "id", "isTriggered", "language", "method", "name", "needCommit", "object", "organization", "owner", "provider", "provider2", "query", "region", "requestUri", "response", "section", "transaction", "transaction2", "unit", "user", "userAgent"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Audit from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Audit from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"action": obj.get("action"),
|
||||
"block": obj.get("block"),
|
||||
"block2": obj.get("block2"),
|
||||
"blockHash": obj.get("blockHash"),
|
||||
"blockHash2": obj.get("blockHash2"),
|
||||
"city": obj.get("city"),
|
||||
"clientIp": obj.get("clientIp"),
|
||||
"count": obj.get("count"),
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"errorText": obj.get("errorText"),
|
||||
"id": obj.get("id"),
|
||||
"isTriggered": obj.get("isTriggered"),
|
||||
"language": obj.get("language"),
|
||||
"method": obj.get("method"),
|
||||
"name": obj.get("name"),
|
||||
"needCommit": obj.get("needCommit"),
|
||||
"object": obj.get("object"),
|
||||
"organization": obj.get("organization"),
|
||||
"owner": obj.get("owner"),
|
||||
"provider": obj.get("provider"),
|
||||
"provider2": obj.get("provider2"),
|
||||
"query": obj.get("query"),
|
||||
"region": obj.get("region"),
|
||||
"requestUri": obj.get("requestUri"),
|
||||
"response": obj.get("response"),
|
||||
"section": obj.get("section"),
|
||||
"transaction": obj.get("transaction"),
|
||||
"transaction2": obj.get("transaction2"),
|
||||
"unit": obj.get("unit"),
|
||||
"user": obj.get("user"),
|
||||
"userAgent": obj.get("userAgent")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Block(BaseModel):
|
||||
"""
|
||||
Block
|
||||
""" # noqa: E501
|
||||
prompt: Optional[StrictStr] = None
|
||||
state: Optional[StrictStr] = None
|
||||
text: Optional[StrictStr] = None
|
||||
text_en: Optional[StrictStr] = Field(default=None, alias="textEn")
|
||||
type: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["prompt", "state", "text", "textEn", "type"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Block from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Block from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"prompt": obj.get("prompt"),
|
||||
"state": obj.get("state"),
|
||||
"text": obj.get("text"),
|
||||
"textEn": obj.get("textEn"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Candidate(BaseModel):
|
||||
"""
|
||||
Candidate
|
||||
""" # noqa: E501
|
||||
is_hit: Optional[StrictBool] = Field(default=None, alias="isHit")
|
||||
text: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["isHit", "text"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Candidate from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Candidate from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"isHit": obj.get("isHit"),
|
||||
"text": obj.get("text")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Chat(BaseModel):
|
||||
"""
|
||||
Chat
|
||||
""" # noqa: E501
|
||||
category: Optional[StrictStr] = None
|
||||
client_ip: Optional[StrictStr] = Field(default=None, alias="clientIp")
|
||||
client_ip_desc: Optional[StrictStr] = Field(default=None, alias="clientIpDesc")
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
currency: Optional[StrictStr] = None
|
||||
display_name: Optional[StrictStr] = Field(default=None, alias="displayName")
|
||||
is_deleted: Optional[StrictBool] = Field(default=None, alias="isDeleted")
|
||||
is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden")
|
||||
message_count: Optional[StrictInt] = Field(default=None, alias="messageCount")
|
||||
model_provider: Optional[StrictStr] = Field(default=None, alias="modelProvider")
|
||||
name: Optional[StrictStr] = None
|
||||
need_title: Optional[StrictBool] = Field(default=None, alias="needTitle")
|
||||
organization: Optional[StrictStr] = None
|
||||
owner: Optional[StrictStr] = None
|
||||
price: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
store: Optional[StrictStr] = None
|
||||
token_count: Optional[StrictInt] = Field(default=None, alias="tokenCount")
|
||||
type: Optional[StrictStr] = None
|
||||
updated_time: Optional[StrictStr] = Field(default=None, alias="updatedTime")
|
||||
user: Optional[StrictStr] = None
|
||||
user1: Optional[StrictStr] = None
|
||||
user2: Optional[StrictStr] = None
|
||||
user_agent: Optional[StrictStr] = Field(default=None, alias="userAgent")
|
||||
user_agent_desc: Optional[StrictStr] = Field(default=None, alias="userAgentDesc")
|
||||
users: Optional[List[StrictStr]] = None
|
||||
__properties: ClassVar[List[str]] = ["category", "clientIp", "clientIpDesc", "createdTime", "currency", "displayName", "isDeleted", "isHidden", "messageCount", "modelProvider", "name", "needTitle", "organization", "owner", "price", "store", "tokenCount", "type", "updatedTime", "user", "user1", "user2", "userAgent", "userAgentDesc", "users"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Chat from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Chat from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"category": obj.get("category"),
|
||||
"clientIp": obj.get("clientIp"),
|
||||
"clientIpDesc": obj.get("clientIpDesc"),
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"currency": obj.get("currency"),
|
||||
"displayName": obj.get("displayName"),
|
||||
"isDeleted": obj.get("isDeleted"),
|
||||
"isHidden": obj.get("isHidden"),
|
||||
"messageCount": obj.get("messageCount"),
|
||||
"modelProvider": obj.get("modelProvider"),
|
||||
"name": obj.get("name"),
|
||||
"needTitle": obj.get("needTitle"),
|
||||
"organization": obj.get("organization"),
|
||||
"owner": obj.get("owner"),
|
||||
"price": obj.get("price"),
|
||||
"store": obj.get("store"),
|
||||
"tokenCount": obj.get("tokenCount"),
|
||||
"type": obj.get("type"),
|
||||
"updatedTime": obj.get("updatedTime"),
|
||||
"user": obj.get("user"),
|
||||
"user1": obj.get("user1"),
|
||||
"user2": obj.get("user2"),
|
||||
"userAgent": obj.get("userAgent"),
|
||||
"userAgentDesc": obj.get("userAgentDesc"),
|
||||
"users": obj.get("users")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ClusterServing(BaseModel):
|
||||
"""
|
||||
ClusterServing
|
||||
""" # noqa: E501
|
||||
model_id: Optional[StrictStr] = Field(default=None, alias="modelId")
|
||||
namespace: Optional[StrictStr] = None
|
||||
provider: Optional[StrictStr] = None
|
||||
service: Optional[StrictStr] = None
|
||||
url: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["modelId", "namespace", "provider", "service", "url"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of ClusterServing from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ClusterServing from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"modelId": obj.get("modelId"),
|
||||
"namespace": obj.get("namespace"),
|
||||
"provider": obj.get("provider"),
|
||||
"service": obj.get("service"),
|
||||
"url": obj.get("url")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Company(BaseModel):
|
||||
"""
|
||||
Company
|
||||
""" # noqa: E501
|
||||
arr: Optional[StrictInt] = Field(default=None, description="ARR is annual recurring revenue in minor units (cents) of Currency.")
|
||||
city: Optional[StrictStr] = Field(default=None, description="City is the head-office city.")
|
||||
country: Optional[StrictStr] = Field(default=None, description="Country is the head-office country.")
|
||||
created_at: Optional[StrictInt] = Field(default=None, description="CreatedAt is the unix second the company was created. Server-owned.", alias="createdAt")
|
||||
currency: Optional[StrictStr] = Field(default=None, description="Currency is the ISO code ARR is denominated in; a write that names none stores USD.")
|
||||
domain_name: Optional[StrictStr] = Field(default=None, description="DomainName is the company's primary domain, e.g. \"acme.com\".", alias="domainName")
|
||||
employees: Optional[StrictInt] = Field(default=None, description="Employees is the headcount.")
|
||||
id: Optional[StrictStr] = Field(default=None, description="ID is the server-minted company id (\"comp_\" + 128 random bits).")
|
||||
ideal_customer_profile: Optional[StrictBool] = Field(default=None, description="ICP marks the company as an ideal-customer-profile fit.", alias="idealCustomerProfile")
|
||||
linkedin_link: Optional[StrictStr] = Field(default=None, description="Linkedin is the company's LinkedIn URL.", alias="linkedinLink")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name is the company name.")
|
||||
updated_at: Optional[StrictInt] = Field(default=None, description="UpdatedAt is the unix second of the last write. Server-owned.", alias="updatedAt")
|
||||
x_link: Optional[StrictStr] = Field(default=None, description="XLink is the company's X (Twitter) URL.", alias="xLink")
|
||||
__properties: ClassVar[List[str]] = ["arr", "city", "country", "createdAt", "currency", "domainName", "employees", "id", "idealCustomerProfile", "linkedinLink", "name", "updatedAt", "xLink"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Company from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Company from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"arr": obj.get("arr"),
|
||||
"city": obj.get("city"),
|
||||
"country": obj.get("country"),
|
||||
"createdAt": obj.get("createdAt"),
|
||||
"currency": obj.get("currency"),
|
||||
"domainName": obj.get("domainName"),
|
||||
"employees": obj.get("employees"),
|
||||
"id": obj.get("id"),
|
||||
"idealCustomerProfile": obj.get("idealCustomerProfile"),
|
||||
"linkedinLink": obj.get("linkedinLink"),
|
||||
"name": obj.get("name"),
|
||||
"updatedAt": obj.get("updatedAt"),
|
||||
"xLink": obj.get("xLink")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Connection(BaseModel):
|
||||
"""
|
||||
Connection
|
||||
""" # noqa: E501
|
||||
client_ip: Optional[StrictStr] = Field(default=None, alias="clientIp")
|
||||
client_ip_desc: Optional[StrictStr] = Field(default=None, alias="clientIpDesc")
|
||||
code: Optional[StrictInt] = None
|
||||
command_count: Optional[StrictInt] = Field(default=None, alias="commandCount")
|
||||
connection_id: Optional[StrictStr] = Field(default=None, alias="connectionId")
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
creator: Optional[StrictStr] = None
|
||||
end_time: Optional[StrictStr] = Field(default=None, alias="endTime")
|
||||
height: Optional[StrictInt] = None
|
||||
message: Optional[StrictStr] = None
|
||||
mode: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
node: Optional[StrictStr] = None
|
||||
operations: Optional[List[StrictStr]] = None
|
||||
owner: Optional[StrictStr] = None
|
||||
protocol: Optional[StrictStr] = None
|
||||
recording: Optional[StrictStr] = None
|
||||
reviewed: Optional[StrictBool] = None
|
||||
start_time: Optional[StrictStr] = Field(default=None, alias="startTime")
|
||||
status: Optional[StrictStr] = None
|
||||
user_agent: Optional[StrictStr] = Field(default=None, alias="userAgent")
|
||||
user_agent_desc: Optional[StrictStr] = Field(default=None, alias="userAgentDesc")
|
||||
width: Optional[StrictInt] = None
|
||||
__properties: ClassVar[List[str]] = ["clientIp", "clientIpDesc", "code", "commandCount", "connectionId", "createdTime", "creator", "endTime", "height", "message", "mode", "name", "node", "operations", "owner", "protocol", "recording", "reviewed", "startTime", "status", "userAgent", "userAgentDesc", "width"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Connection from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Connection from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"clientIp": obj.get("clientIp"),
|
||||
"clientIpDesc": obj.get("clientIpDesc"),
|
||||
"code": obj.get("code"),
|
||||
"commandCount": obj.get("commandCount"),
|
||||
"connectionId": obj.get("connectionId"),
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"creator": obj.get("creator"),
|
||||
"endTime": obj.get("endTime"),
|
||||
"height": obj.get("height"),
|
||||
"message": obj.get("message"),
|
||||
"mode": obj.get("mode"),
|
||||
"name": obj.get("name"),
|
||||
"node": obj.get("node"),
|
||||
"operations": obj.get("operations"),
|
||||
"owner": obj.get("owner"),
|
||||
"protocol": obj.get("protocol"),
|
||||
"recording": obj.get("recording"),
|
||||
"reviewed": obj.get("reviewed"),
|
||||
"startTime": obj.get("startTime"),
|
||||
"status": obj.get("status"),
|
||||
"userAgent": obj.get("userAgent"),
|
||||
"userAgentDesc": obj.get("userAgentDesc"),
|
||||
"width": obj.get("width")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Contact(BaseModel):
|
||||
"""
|
||||
Contact
|
||||
""" # noqa: E501
|
||||
city: Optional[StrictStr] = Field(default=None, description="City is where the person is based.")
|
||||
company_id: Optional[StrictStr] = Field(default=None, description="CompanyID links the contact to one of the org's companies; empty when the contact stands alone, and cleared when its company is deleted. A write naming a company the org does not own is refused with 422.", alias="companyId")
|
||||
created_at: Optional[StrictInt] = Field(default=None, description="CreatedAt is the unix second the contact was created. Server-owned.", alias="createdAt")
|
||||
email: Optional[StrictStr] = Field(default=None, description="Email is the person's email address.")
|
||||
first_name: Optional[StrictStr] = Field(default=None, description="FirstName is the person's given name.", alias="firstName")
|
||||
id: Optional[StrictStr] = Field(default=None, description="ID is the server-minted contact id (\"cont_\" + 128 random bits).")
|
||||
job_title: Optional[StrictStr] = Field(default=None, description="JobTitle is the person's role at their company.", alias="jobTitle")
|
||||
last_name: Optional[StrictStr] = Field(default=None, description="LastName is the person's family name.", alias="lastName")
|
||||
linkedin_link: Optional[StrictStr] = Field(default=None, description="Linkedin is the person's LinkedIn URL.", alias="linkedinLink")
|
||||
phone: Optional[StrictStr] = Field(default=None, description="Phone is the person's phone number.")
|
||||
updated_at: Optional[StrictInt] = Field(default=None, description="UpdatedAt is the unix second of the last write. Server-owned.", alias="updatedAt")
|
||||
x_link: Optional[StrictStr] = Field(default=None, description="XLink is the person's X (Twitter) URL.", alias="xLink")
|
||||
__properties: ClassVar[List[str]] = ["city", "companyId", "createdAt", "email", "firstName", "id", "jobTitle", "lastName", "linkedinLink", "phone", "updatedAt", "xLink"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Contact from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Contact from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"city": obj.get("city"),
|
||||
"companyId": obj.get("companyId"),
|
||||
"createdAt": obj.get("createdAt"),
|
||||
"email": obj.get("email"),
|
||||
"firstName": obj.get("firstName"),
|
||||
"id": obj.get("id"),
|
||||
"jobTitle": obj.get("jobTitle"),
|
||||
"lastName": obj.get("lastName"),
|
||||
"linkedinLink": obj.get("linkedinLink"),
|
||||
"phone": obj.get("phone"),
|
||||
"updatedAt": obj.get("updatedAt"),
|
||||
"xLink": obj.get("xLink")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
+16
-16
@@ -17,18 +17,20 @@ import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.company import Company
|
||||
from hanzoai.cloud.models.resource_requests import ResourceRequests
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class CompanyList(BaseModel):
|
||||
class ContainerDetail(BaseModel):
|
||||
"""
|
||||
CompanyList
|
||||
ContainerDetail
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Company]] = Field(default=None, description="Data is the page of companies, most recently updated first.")
|
||||
__properties: ClassVar[List[str]] = ["data"]
|
||||
image: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
resources: Optional[ResourceRequests] = None
|
||||
__properties: ClassVar[List[str]] = ["image", "name", "resources"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@@ -48,7 +50,7 @@ class CompanyList(BaseModel):
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of CompanyList from a JSON string"""
|
||||
"""Create an instance of ContainerDetail from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
@@ -69,18 +71,14 @@ class CompanyList(BaseModel):
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of resources
|
||||
if self.resources:
|
||||
_dict['resources'] = self.resources.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of CompanyList from a dict"""
|
||||
"""Create an instance of ContainerDetail from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
@@ -88,7 +86,9 @@ class CompanyList(BaseModel):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Company.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
|
||||
"image": obj.get("image"),
|
||||
"name": obj.get("name"),
|
||||
"resources": ResourceRequests.from_dict(obj["resources"]) if obj.get("resources") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Count(BaseModel):
|
||||
"""
|
||||
Count
|
||||
""" # noqa: E501
|
||||
chat_count: Optional[StrictInt] = Field(default=None, alias="chatCount")
|
||||
currency: Optional[StrictStr] = None
|
||||
var_date: Optional[StrictStr] = Field(default=None, alias="date")
|
||||
message_count: Optional[StrictInt] = Field(default=None, alias="messageCount")
|
||||
price: Optional[Union[StrictFloat, StrictInt]] = None
|
||||
token_count: Optional[StrictInt] = Field(default=None, alias="tokenCount")
|
||||
user_count: Optional[StrictInt] = Field(default=None, alias="userCount")
|
||||
__properties: ClassVar[List[str]] = ["chatCount", "currency", "date", "messageCount", "price", "tokenCount", "userCount"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Count from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Count from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"chatCount": obj.get("chatCount"),
|
||||
"currency": obj.get("currency"),
|
||||
"date": obj.get("date"),
|
||||
"messageCount": obj.get("messageCount"),
|
||||
"price": obj.get("price"),
|
||||
"tokenCount": obj.get("tokenCount"),
|
||||
"userCount": obj.get("userCount")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.container_detail import ContainerDetail
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DeploymentDetail(BaseModel):
|
||||
"""
|
||||
DeploymentDetail
|
||||
""" # noqa: E501
|
||||
containers: Optional[List[ContainerDetail]] = None
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
name: Optional[StrictStr] = None
|
||||
ready_replicas: Optional[StrictInt] = Field(default=None, alias="readyReplicas")
|
||||
replicas: Optional[StrictInt] = None
|
||||
status: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["containers", "createdTime", "name", "readyReplicas", "replicas", "status"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DeploymentDetail from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in containers (list)
|
||||
_items = []
|
||||
if self.containers:
|
||||
for _item_containers in self.containers:
|
||||
if _item_containers:
|
||||
_items.append(_item_containers.to_dict())
|
||||
_dict['containers'] = _items
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DeploymentDetail from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"containers": [ContainerDetail.from_dict(_item) for _item in obj["containers"]] if obj.get("containers") is not None else None,
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"name": obj.get("name"),
|
||||
"readyReplicas": obj.get("readyReplicas"),
|
||||
"replicas": obj.get("replicas"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DocSearchResult(BaseModel):
|
||||
"""
|
||||
DocSearchResult
|
||||
""" # noqa: E501
|
||||
breadcrumbs: Optional[List[StrictStr]] = None
|
||||
content: Optional[StrictStr] = None
|
||||
file_id: Optional[StrictStr] = None
|
||||
id: Optional[StrictStr] = None
|
||||
title: Optional[StrictStr] = None
|
||||
type: Optional[StrictStr] = None
|
||||
url: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["breadcrumbs", "content", "file_id", "id", "title", "type", "url"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DocSearchResult from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DocSearchResult from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"breadcrumbs": obj.get("breadcrumbs"),
|
||||
"content": obj.get("content"),
|
||||
"file_id": obj.get("file_id"),
|
||||
"id": obj.get("id"),
|
||||
"title": obj.get("title"),
|
||||
"type": obj.get("type"),
|
||||
"url": obj.get("url")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class EnvVariable(BaseModel):
|
||||
"""
|
||||
EnvVariable
|
||||
""" # noqa: E501
|
||||
name: Optional[StrictStr] = None
|
||||
value: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["name", "value"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of EnvVariable from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of EnvVariable from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"name": obj.get("name"),
|
||||
"value": obj.get("value")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class Envelope(BaseModel):
|
||||
"""
|
||||
The resource surface's response. `status` is the verdict, not the HTTP code: a handled failure is still 200.
|
||||
""" # noqa: E501
|
||||
data: Optional[Any] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of Envelope from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# set to None if data (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data is None and "data" in self.model_fields_set:
|
||||
_dict['data'] = None
|
||||
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of Envelope from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": obj.get("data"),
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ExampleQuestion(BaseModel):
|
||||
"""
|
||||
ExampleQuestion
|
||||
""" # noqa: E501
|
||||
image: Optional[StrictStr] = None
|
||||
text: Optional[StrictStr] = None
|
||||
title: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["image", "text", "title"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of ExampleQuestion from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ExampleQuestion from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"image": obj.get("image"),
|
||||
"text": obj.get("text"),
|
||||
"title": obj.get("title")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class File(BaseModel):
|
||||
"""
|
||||
File
|
||||
""" # noqa: E501
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
error_text: Optional[StrictStr] = Field(default=None, alias="errorText")
|
||||
filename: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
owner: Optional[StrictStr] = None
|
||||
size: Optional[StrictInt] = None
|
||||
status: Optional[StrictStr] = None
|
||||
storage_provider: Optional[StrictStr] = Field(default=None, alias="storageProvider")
|
||||
store: Optional[StrictStr] = None
|
||||
token_count: Optional[StrictInt] = Field(default=None, alias="tokenCount")
|
||||
url: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["createdTime", "errorText", "filename", "name", "owner", "size", "status", "storageProvider", "store", "tokenCount", "url"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of File from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of File from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"errorText": obj.get("errorText"),
|
||||
"filename": obj.get("filename"),
|
||||
"name": obj.get("name"),
|
||||
"owner": obj.get("owner"),
|
||||
"size": obj.get("size"),
|
||||
"status": obj.get("status"),
|
||||
"storageProvider": obj.get("storageProvider"),
|
||||
"store": obj.get("store"),
|
||||
"tokenCount": obj.get("tokenCount"),
|
||||
"url": obj.get("url")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class FinetuneJob(BaseModel):
|
||||
"""
|
||||
FinetuneJob
|
||||
""" # noqa: E501
|
||||
base_model: Optional[StrictStr] = Field(default=None, alias="baseModel")
|
||||
cost_cents: Optional[StrictInt] = Field(default=None, alias="costCents")
|
||||
cr_name: Optional[StrictStr] = Field(default=None, alias="crName")
|
||||
created_by: Optional[StrictStr] = Field(default=None, alias="createdBy")
|
||||
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
|
||||
dataset: Optional[StrictStr] = None
|
||||
deploy_url: Optional[StrictStr] = Field(default=None, alias="deployUrl")
|
||||
deployed_model: Optional[StrictStr] = Field(default=None, alias="deployedModel")
|
||||
display_name: Optional[StrictStr] = Field(default=None, alias="displayName")
|
||||
error: Optional[StrictStr] = None
|
||||
finished_time: Optional[StrictStr] = Field(default=None, alias="finishedTime")
|
||||
gpu_count: Optional[StrictInt] = Field(default=None, alias="gpuCount")
|
||||
gpu_seconds: Optional[StrictInt] = Field(default=None, alias="gpuSeconds")
|
||||
gpu_type: Optional[StrictStr] = Field(default=None, alias="gpuType")
|
||||
hyperparams: Optional[StrictStr] = None
|
||||
message: Optional[StrictStr] = None
|
||||
metered: Optional[StrictBool] = None
|
||||
method: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
namespace: Optional[StrictStr] = None
|
||||
num_nodes: Optional[StrictInt] = Field(default=None, alias="numNodes")
|
||||
output_uri: Optional[StrictStr] = Field(default=None, alias="outputUri")
|
||||
owner: Optional[StrictStr] = None
|
||||
preset: Optional[StrictStr] = None
|
||||
progress: Optional[StrictInt] = None
|
||||
runtime: Optional[StrictStr] = None
|
||||
started_time: Optional[StrictStr] = Field(default=None, alias="startedTime")
|
||||
status: Optional[StrictStr] = None
|
||||
task: Optional[StrictStr] = None
|
||||
updated_time: Optional[StrictStr] = Field(default=None, alias="updatedTime")
|
||||
__properties: ClassVar[List[str]] = ["baseModel", "costCents", "crName", "createdBy", "createdTime", "dataset", "deployUrl", "deployedModel", "displayName", "error", "finishedTime", "gpuCount", "gpuSeconds", "gpuType", "hyperparams", "message", "metered", "method", "name", "namespace", "numNodes", "outputUri", "owner", "preset", "progress", "runtime", "startedTime", "status", "task", "updatedTime"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of FinetuneJob from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of FinetuneJob from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"baseModel": obj.get("baseModel"),
|
||||
"costCents": obj.get("costCents"),
|
||||
"crName": obj.get("crName"),
|
||||
"createdBy": obj.get("createdBy"),
|
||||
"createdTime": obj.get("createdTime"),
|
||||
"dataset": obj.get("dataset"),
|
||||
"deployUrl": obj.get("deployUrl"),
|
||||
"deployedModel": obj.get("deployedModel"),
|
||||
"displayName": obj.get("displayName"),
|
||||
"error": obj.get("error"),
|
||||
"finishedTime": obj.get("finishedTime"),
|
||||
"gpuCount": obj.get("gpuCount"),
|
||||
"gpuSeconds": obj.get("gpuSeconds"),
|
||||
"gpuType": obj.get("gpuType"),
|
||||
"hyperparams": obj.get("hyperparams"),
|
||||
"message": obj.get("message"),
|
||||
"metered": obj.get("metered"),
|
||||
"method": obj.get("method"),
|
||||
"name": obj.get("name"),
|
||||
"namespace": obj.get("namespace"),
|
||||
"numNodes": obj.get("numNodes"),
|
||||
"outputUri": obj.get("outputUri"),
|
||||
"owner": obj.get("owner"),
|
||||
"preset": obj.get("preset"),
|
||||
"progress": obj.get("progress"),
|
||||
"runtime": obj.get("runtime"),
|
||||
"startedTime": obj.get("startedTime"),
|
||||
"status": obj.get("status"),
|
||||
"task": obj.get("task"),
|
||||
"updatedTime": obj.get("updatedTime")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class FormItem(BaseModel):
|
||||
"""
|
||||
FormItem
|
||||
""" # noqa: E501
|
||||
label: Optional[StrictStr] = None
|
||||
name: Optional[StrictStr] = None
|
||||
type: Optional[StrictStr] = None
|
||||
visible: Optional[StrictBool] = None
|
||||
width: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["label", "name", "type", "visible", "width"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of FormItem from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of FormItem from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"label": obj.get("label"),
|
||||
"name": obj.get("name"),
|
||||
"type": obj.get("type"),
|
||||
"visible": obj.get("visible"),
|
||||
"width": obj.get("width")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.activity import Activity
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiActivities200Response(BaseModel):
|
||||
"""
|
||||
GetAiActivities200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Activity]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiActivities200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiActivities200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Activity.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.article import Article
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiArticles200Response(BaseModel):
|
||||
"""
|
||||
GetAiArticles200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Article]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiArticles200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiArticles200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Article.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.asset import Asset
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiAssets200Response(BaseModel):
|
||||
"""
|
||||
GetAiAssets200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Asset]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiAssets200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiAssets200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Asset.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.chat import Chat
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiChats200Response(BaseModel):
|
||||
"""
|
||||
GetAiChats200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Chat]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiChats200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiChats200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Chat.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_ai_conn_response import AiAiConnResponse
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiConnections200Response(BaseModel):
|
||||
"""
|
||||
GetAiConnections200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[AiAiConnResponse]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiConnections200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiConnections200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [AiAiConnResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiConnectionsByProviderAuthorize200Response(BaseModel):
|
||||
"""
|
||||
GetAiConnectionsByProviderAuthorize200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[Dict[str, StrictStr]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiConnectionsByProviderAuthorize200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiConnectionsByProviderAuthorize200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": obj.get("data"),
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.ai_provider_usage import AiProviderUsage
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiConnectionsByProviderUsage200Response(BaseModel):
|
||||
"""
|
||||
GetAiConnectionsByProviderUsage200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[AiProviderUsage] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiConnectionsByProviderUsage200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of data
|
||||
if self.data:
|
||||
_dict['data'] = self.data.to_dict()
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiConnectionsByProviderUsage200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": AiProviderUsage.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.app import App
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiDeployments200Response(BaseModel):
|
||||
"""
|
||||
GetAiDeployments200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[App]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiDeployments200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiDeployments200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [App.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.file import File
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiFiles200Response(BaseModel):
|
||||
"""
|
||||
GetAiFiles200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[File]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFiles200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFiles200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [File.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.hf_dataset import HfDataset
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiFinetuneHfDatasets200Response(BaseModel):
|
||||
"""
|
||||
GetAiFinetuneHfDatasets200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[HfDataset]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetuneHfDatasets200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetuneHfDatasets200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [HfDataset.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.hf_model import HfModel
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiFinetuneHfModels200Response(BaseModel):
|
||||
"""
|
||||
GetAiFinetuneHfModels200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[HfModel]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetuneHfModels200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetuneHfModels200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [HfModel.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.hf_repo_info import HfRepoInfo
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiFinetuneHfRepo200Response(BaseModel):
|
||||
"""
|
||||
GetAiFinetuneHfRepo200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[HfRepoInfo] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetuneHfRepo200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of data
|
||||
if self.data:
|
||||
_dict['data'] = self.data.to_dict()
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetuneHfRepo200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": HfRepoInfo.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.finetune_job import FinetuneJob
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiFinetuneJobs200Response(BaseModel):
|
||||
"""
|
||||
GetAiFinetuneJobs200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[FinetuneJob]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetuneJobs200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetuneJobs200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [FinetuneJob.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiFinetunePresets200Response(BaseModel):
|
||||
"""
|
||||
GetAiFinetunePresets200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[Dict[str, Any]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetunePresets200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiFinetunePresets200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": obj.get("data"),
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.layout import Layout
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiForms200Response(BaseModel):
|
||||
"""
|
||||
GetAiForms200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Layout]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiForms200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiForms200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Layout.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.graph import Graph
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiGraphs200Response(BaseModel):
|
||||
"""
|
||||
GetAiGraphs200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Graph]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiGraphs200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiGraphs200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Graph.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.memory import Memory
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiMemoryFacts200Response(BaseModel):
|
||||
"""
|
||||
GetAiMemoryFacts200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Memory]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiMemoryFacts200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiMemoryFacts200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Memory.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.message import Message
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GetAiMessages200Response(BaseModel):
|
||||
"""
|
||||
GetAiMessages200Response
|
||||
""" # noqa: E501
|
||||
data: Optional[List[Message]] = None
|
||||
data2: Optional[Any] = None
|
||||
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
|
||||
status: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
|
||||
|
||||
@field_validator('status')
|
||||
def status_validate_enum(cls, value):
|
||||
"""Validates the enum"""
|
||||
if value not in set(['ok', 'error']):
|
||||
raise ValueError("must be one of enum values ('ok', 'error')")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of GetAiMessages200Response from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
||||
_items = []
|
||||
if self.data:
|
||||
for _item_data in self.data:
|
||||
if _item_data:
|
||||
_items.append(_item_data.to_dict())
|
||||
_dict['data'] = _items
|
||||
# set to None if data2 (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.data2 is None and "data2" in self.model_fields_set:
|
||||
_dict['data2'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GetAiMessages200Response from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"data": [Message.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
||||
"data2": obj.get("data2"),
|
||||
"msg": obj.get("msg"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user