modaic 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +87 -0
- package/LICENSE +21 -0
- package/README.md +533 -0
- package/RUNTIMES.md +48 -0
- package/USAGE.md +19 -0
- package/esm/api/client.d.ts +48 -0
- package/esm/api/client.d.ts.map +1 -0
- package/esm/api/client.js +131 -0
- package/esm/api/client.js.map +1 -0
- package/esm/arbiter/arbiter.d.ts +100 -0
- package/esm/arbiter/arbiter.d.ts.map +1 -0
- package/esm/arbiter/arbiter.js +160 -0
- package/esm/arbiter/arbiter.js.map +1 -0
- package/esm/config.d.ts +22 -0
- package/esm/config.d.ts.map +1 -0
- package/esm/config.js +42 -0
- package/esm/config.js.map +1 -0
- package/esm/core.d.ts +10 -0
- package/esm/core.d.ts.map +1 -0
- package/esm/core.js +13 -0
- package/esm/core.js.map +1 -0
- package/esm/exceptions.d.ts +25 -0
- package/esm/exceptions.d.ts.map +1 -0
- package/esm/exceptions.js +37 -0
- package/esm/exceptions.js.map +1 -0
- package/esm/funcs/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.d.ts +20 -0
- package/esm/funcs/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.d.ts.map +1 -0
- package/esm/funcs/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.js +92 -0
- package/esm/funcs/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.js.map +1 -0
- package/esm/funcs/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.d.ts +18 -0
- package/esm/funcs/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.d.ts.map +1 -0
- package/esm/funcs/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.js +90 -0
- package/esm/funcs/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.js.map +1 -0
- package/esm/funcs/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.d.ts +23 -0
- package/esm/funcs/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.d.ts.map +1 -0
- package/esm/funcs/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.js +95 -0
- package/esm/funcs/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.js.map +1 -0
- package/esm/funcs/check-email-api-v1-user-check-email-get.d.ts +18 -0
- package/esm/funcs/check-email-api-v1-user-check-email-get.d.ts.map +1 -0
- package/esm/funcs/check-email-api-v1-user-check-email-get.js +82 -0
- package/esm/funcs/check-email-api-v1-user-check-email-get.js.map +1 -0
- package/esm/funcs/check-username-api-v1-user-check-username-username-get.d.ts +18 -0
- package/esm/funcs/check-username-api-v1-user-check-username-username-get.d.ts.map +1 -0
- package/esm/funcs/check-username-api-v1-user-check-username-username-get.js +85 -0
- package/esm/funcs/check-username-api-v1-user-check-username-username-get.js.map +1 -0
- package/esm/funcs/create-chat-completion-api-v1-arbiters-chat-completions-post.d.ts +15 -0
- package/esm/funcs/create-chat-completion-api-v1-arbiters-chat-completions-post.d.ts.map +1 -0
- package/esm/funcs/create-chat-completion-api-v1-arbiters-chat-completions-post.js +81 -0
- package/esm/funcs/create-chat-completion-api-v1-arbiters-chat-completions-post.js.map +1 -0
- package/esm/funcs/create-chat-completion-api-v1-chat-completions-post.d.ts +14 -0
- package/esm/funcs/create-chat-completion-api-v1-chat-completions-post.d.ts.map +1 -0
- package/esm/funcs/create-chat-completion-api-v1-chat-completions-post.js +70 -0
- package/esm/funcs/create-chat-completion-api-v1-chat-completions-post.js.map +1 -0
- package/esm/funcs/create-prediction-api-v1-arbiters-predictions-post.d.ts +15 -0
- package/esm/funcs/create-prediction-api-v1-arbiters-predictions-post.d.ts.map +1 -0
- package/esm/funcs/create-prediction-api-v1-arbiters-predictions-post.js +81 -0
- package/esm/funcs/create-prediction-api-v1-arbiters-predictions-post.js.map +1 -0
- package/esm/funcs/create-prediction-api-v2-arbiters-predictions-post.d.ts +23 -0
- package/esm/funcs/create-prediction-api-v2-arbiters-predictions-post.d.ts.map +1 -0
- package/esm/funcs/create-prediction-api-v2-arbiters-predictions-post.js +89 -0
- package/esm/funcs/create-prediction-api-v2-arbiters-predictions-post.js.map +1 -0
- package/esm/funcs/delete-examples-api-v1-examples-delete.d.ts +18 -0
- package/esm/funcs/delete-examples-api-v1-examples-delete.d.ts.map +1 -0
- package/esm/funcs/delete-examples-api-v1-examples-delete.js +84 -0
- package/esm/funcs/delete-examples-api-v1-examples-delete.js.map +1 -0
- package/esm/funcs/dispatch-prediction-api-v1-arbiters-predictions-dispatch-post.d.ts +15 -0
- package/esm/funcs/dispatch-prediction-api-v1-arbiters-predictions-dispatch-post.d.ts.map +1 -0
- package/esm/funcs/dispatch-prediction-api-v1-arbiters-predictions-dispatch-post.js +81 -0
- package/esm/funcs/dispatch-prediction-api-v1-arbiters-predictions-dispatch-post.js.map +1 -0
- package/esm/funcs/download-export-api-v1-examples-export-download-get.d.ts +18 -0
- package/esm/funcs/download-export-api-v1-examples-export-download-get.d.ts.map +1 -0
- package/esm/funcs/download-export-api-v1-examples-export-download-get.js +89 -0
- package/esm/funcs/download-export-api-v1-examples-export-download-get.js.map +1 -0
- package/esm/funcs/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.d.ts +23 -0
- package/esm/funcs/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.d.ts.map +1 -0
- package/esm/funcs/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.js +95 -0
- package/esm/funcs/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.js.map +1 -0
- package/esm/funcs/export-examples-api-v1-examples-export-post.d.ts +18 -0
- package/esm/funcs/export-examples-api-v1-examples-export-post.d.ts.map +1 -0
- package/esm/funcs/export-examples-api-v1-examples-export-post.js +84 -0
- package/esm/funcs/export-examples-api-v1-examples-export-post.js.map +1 -0
- package/esm/funcs/get-arbiter-api-v1-arbiters-get.d.ts +15 -0
- package/esm/funcs/get-arbiter-api-v1-arbiters-get.d.ts.map +1 -0
- package/esm/funcs/get-arbiter-api-v1-arbiters-get.js +84 -0
- package/esm/funcs/get-arbiter-api-v1-arbiters-get.js.map +1 -0
- package/esm/funcs/get-arbiter-schema-output-api-v1-arbiters-schema-get.d.ts +15 -0
- package/esm/funcs/get-arbiter-schema-output-api-v1-arbiters-schema-get.d.ts.map +1 -0
- package/esm/funcs/get-arbiter-schema-output-api-v1-arbiters-schema-get.js +85 -0
- package/esm/funcs/get-arbiter-schema-output-api-v1-arbiters-schema-get.js.map +1 -0
- package/esm/funcs/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.d.ts +29 -0
- package/esm/funcs/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.d.ts.map +1 -0
- package/esm/funcs/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.js +101 -0
- package/esm/funcs/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.js.map +1 -0
- package/esm/funcs/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.d.ts +18 -0
- package/esm/funcs/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.d.ts.map +1 -0
- package/esm/funcs/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.js +90 -0
- package/esm/funcs/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.js.map +1 -0
- package/esm/funcs/get-distinct-hashes-api-v1-examples-distinct-hashes-get.d.ts +18 -0
- package/esm/funcs/get-distinct-hashes-api-v1-examples-distinct-hashes-get.d.ts.map +1 -0
- package/esm/funcs/get-distinct-hashes-api-v1-examples-distinct-hashes-get.js +90 -0
- package/esm/funcs/get-distinct-hashes-api-v1-examples-distinct-hashes-get.js.map +1 -0
- package/esm/funcs/get-example-by-id-api-v1-examples-example-id-get.d.ts +16 -0
- package/esm/funcs/get-example-by-id-api-v1-examples-example-id-get.d.ts.map +1 -0
- package/esm/funcs/get-example-by-id-api-v1-examples-example-id-get.js +88 -0
- package/esm/funcs/get-example-by-id-api-v1-examples-example-id-get.js.map +1 -0
- package/esm/funcs/get-graded-count-api-v1-examples-graded-count-get.d.ts +20 -0
- package/esm/funcs/get-graded-count-api-v1-examples-graded-count-get.d.ts.map +1 -0
- package/esm/funcs/get-graded-count-api-v1-examples-graded-count-get.js +89 -0
- package/esm/funcs/get-graded-count-api-v1-examples-graded-count-get.js.map +1 -0
- package/esm/funcs/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.d.ts +21 -0
- package/esm/funcs/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.d.ts.map +1 -0
- package/esm/funcs/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.js +93 -0
- package/esm/funcs/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.js.map +1 -0
- package/esm/funcs/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.d.ts +25 -0
- package/esm/funcs/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.d.ts.map +1 -0
- package/esm/funcs/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.js +97 -0
- package/esm/funcs/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.js.map +1 -0
- package/esm/funcs/get-prediction-confidence-api-v1-arbiters-predictions-confidence-post.d.ts +24 -0
- package/esm/funcs/get-prediction-confidence-api-v1-arbiters-predictions-confidence-post.d.ts.map +1 -0
- package/esm/funcs/get-prediction-confidence-api-v1-arbiters-predictions-confidence-post.js +90 -0
- package/esm/funcs/get-prediction-confidence-api-v1-arbiters-predictions-confidence-post.js.map +1 -0
- package/esm/funcs/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.d.ts +22 -0
- package/esm/funcs/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.d.ts.map +1 -0
- package/esm/funcs/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.js +94 -0
- package/esm/funcs/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.js.map +1 -0
- package/esm/funcs/get-supported-models-api-v1-arbiters-supported-models-get.d.ts +13 -0
- package/esm/funcs/get-supported-models-api-v1-arbiters-supported-models-get.d.ts.map +1 -0
- package/esm/funcs/get-supported-models-api-v1-arbiters-supported-models-get.js +66 -0
- package/esm/funcs/get-supported-models-api-v1-arbiters-supported-models-get.js.map +1 -0
- package/esm/funcs/get-user-by-id-api-v1-user-user-id-get.d.ts +15 -0
- package/esm/funcs/get-user-by-id-api-v1-user-user-id-get.d.ts.map +1 -0
- package/esm/funcs/get-user-by-id-api-v1-user-user-id-get.js +81 -0
- package/esm/funcs/get-user-by-id-api-v1-user-user-id-get.js.map +1 -0
- package/esm/funcs/get-user-by-id-api-v2-users-id-user-id-get.d.ts +15 -0
- package/esm/funcs/get-user-by-id-api-v2-users-id-user-id-get.d.ts.map +1 -0
- package/esm/funcs/get-user-by-id-api-v2-users-id-user-id-get.js +81 -0
- package/esm/funcs/get-user-by-id-api-v2-users-id-user-id-get.js.map +1 -0
- package/esm/funcs/get-user-by-username-api-v1-user-username-username-get.d.ts +15 -0
- package/esm/funcs/get-user-by-username-api-v1-user-username-username-get.d.ts.map +1 -0
- package/esm/funcs/get-user-by-username-api-v1-user-username-username-get.js +82 -0
- package/esm/funcs/get-user-by-username-api-v1-user-username-username-get.js.map +1 -0
- package/esm/funcs/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.d.ts +20 -0
- package/esm/funcs/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.d.ts.map +1 -0
- package/esm/funcs/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.js +89 -0
- package/esm/funcs/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.js.map +1 -0
- package/esm/funcs/health-check-health-get.d.ts +13 -0
- package/esm/funcs/health-check-health-get.d.ts.map +1 -0
- package/esm/funcs/health-check-health-get.js +61 -0
- package/esm/funcs/health-check-health-get.js.map +1 -0
- package/esm/funcs/ingest-examples-api-v1-examples-post.d.ts +14 -0
- package/esm/funcs/ingest-examples-api-v1-examples-post.d.ts.map +1 -0
- package/esm/funcs/ingest-examples-api-v1-examples-post.js +70 -0
- package/esm/funcs/ingest-examples-api-v1-examples-post.js.map +1 -0
- package/esm/funcs/init-arbiter-api-v1-arbiters-post.d.ts +15 -0
- package/esm/funcs/init-arbiter-api-v1-arbiters-post.d.ts.map +1 -0
- package/esm/funcs/init-arbiter-api-v1-arbiters-post.js +81 -0
- package/esm/funcs/init-arbiter-api-v1-arbiters-post.js.map +1 -0
- package/esm/funcs/join-waitlist-api-v2-waitlist-post.d.ts +15 -0
- package/esm/funcs/join-waitlist-api-v2-waitlist-post.d.ts.map +1 -0
- package/esm/funcs/join-waitlist-api-v2-waitlist-post.js +76 -0
- package/esm/funcs/join-waitlist-api-v2-waitlist-post.js.map +1 -0
- package/esm/funcs/list-examples-api-v1-examples-get.d.ts +19 -0
- package/esm/funcs/list-examples-api-v1-examples-get.d.ts.map +1 -0
- package/esm/funcs/list-examples-api-v1-examples-get.js +100 -0
- package/esm/funcs/list-examples-api-v1-examples-get.js.map +1 -0
- package/esm/funcs/login-api-v1-auth-login-post.d.ts +21 -0
- package/esm/funcs/login-api-v1-auth-login-post.d.ts.map +1 -0
- package/esm/funcs/login-api-v1-auth-login-post.js +82 -0
- package/esm/funcs/login-api-v1-auth-login-post.js.map +1 -0
- package/esm/funcs/mfa-verify-api-v1-auth-mfa-verify-post.d.ts +22 -0
- package/esm/funcs/mfa-verify-api-v1-auth-mfa-verify-post.d.ts.map +1 -0
- package/esm/funcs/mfa-verify-api-v1-auth-mfa-verify-post.js +83 -0
- package/esm/funcs/mfa-verify-api-v1-auth-mfa-verify-post.js.map +1 -0
- package/esm/funcs/oauth-callback-api-v1-auth-callback-post.d.ts +21 -0
- package/esm/funcs/oauth-callback-api-v1-auth-callback-post.d.ts.map +1 -0
- package/esm/funcs/oauth-callback-api-v1-auth-callback-post.js +82 -0
- package/esm/funcs/oauth-callback-api-v1-auth-callback-post.js.map +1 -0
- package/esm/funcs/patch-example-api-v1-examples-example-id-annotation-patch.d.ts +18 -0
- package/esm/funcs/patch-example-api-v1-examples-example-id-annotation-patch.d.ts.map +1 -0
- package/esm/funcs/patch-example-api-v1-examples-example-id-annotation-patch.js +91 -0
- package/esm/funcs/patch-example-api-v1-examples-example-id-annotation-patch.js.map +1 -0
- package/esm/funcs/read-badge-badge-get.d.ts +21 -0
- package/esm/funcs/read-badge-badge-get.d.ts.map +1 -0
- package/esm/funcs/read-badge-badge-get.js +85 -0
- package/esm/funcs/read-badge-badge-get.js.map +1 -0
- package/esm/funcs/refresh-token-api-v1-auth-token-refresh-post.d.ts +16 -0
- package/esm/funcs/refresh-token-api-v1-auth-token-refresh-post.d.ts.map +1 -0
- package/esm/funcs/refresh-token-api-v1-auth-token-refresh-post.js +64 -0
- package/esm/funcs/refresh-token-api-v1-auth-token-refresh-post.js.map +1 -0
- package/esm/funcs/register-api-v1-auth-register-post.d.ts +21 -0
- package/esm/funcs/register-api-v1-auth-register-post.d.ts.map +1 -0
- package/esm/funcs/register-api-v1-auth-register-post.js +82 -0
- package/esm/funcs/register-api-v1-auth-register-post.js.map +1 -0
- package/esm/funcs/root-get.d.ts +13 -0
- package/esm/funcs/root-get.d.ts.map +1 -0
- package/esm/funcs/root-get.js +61 -0
- package/esm/funcs/root-get.js.map +1 -0
- package/esm/funcs/slack-callback-api-v1-notifications-slack-callback-get.d.ts +15 -0
- package/esm/funcs/slack-callback-api-v1-notifications-slack-callback-get.d.ts.map +1 -0
- package/esm/funcs/slack-callback-api-v1-notifications-slack-callback-get.js +82 -0
- package/esm/funcs/slack-callback-api-v1-notifications-slack-callback-get.js.map +1 -0
- package/esm/funcs/slack-interactions-api-v1-notifications-slack-interactions-post.d.ts +16 -0
- package/esm/funcs/slack-interactions-api-v1-notifications-slack-interactions-post.d.ts.map +1 -0
- package/esm/funcs/slack-interactions-api-v1-notifications-slack-interactions-post.js +64 -0
- package/esm/funcs/slack-interactions-api-v1-notifications-slack-interactions-post.js.map +1 -0
- package/esm/funcs/start-batch-predictions-job-api-v1-jobs-batch-predictions-post.d.ts +35 -0
- package/esm/funcs/start-batch-predictions-job-api-v1-jobs-batch-predictions-post.d.ts.map +1 -0
- package/esm/funcs/start-batch-predictions-job-api-v1-jobs-batch-predictions-post.js +101 -0
- package/esm/funcs/start-batch-predictions-job-api-v1-jobs-batch-predictions-post.js.map +1 -0
- package/esm/funcs/start-confidence-score-job-api-v1-jobs-confidence-scores-post.d.ts +19 -0
- package/esm/funcs/start-confidence-score-job-api-v1-jobs-confidence-scores-post.d.ts.map +1 -0
- package/esm/funcs/start-confidence-score-job-api-v1-jobs-confidence-scores-post.js +85 -0
- package/esm/funcs/start-confidence-score-job-api-v1-jobs-confidence-scores-post.js.map +1 -0
- package/esm/funcs/start-optimization-job-api-v1-jobs-gepa-post.d.ts +23 -0
- package/esm/funcs/start-optimization-job-api-v1-jobs-gepa-post.d.ts.map +1 -0
- package/esm/funcs/start-optimization-job-api-v1-jobs-gepa-post.js +89 -0
- package/esm/funcs/start-optimization-job-api-v1-jobs-gepa-post.js.map +1 -0
- package/esm/funcs/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.d.ts +32 -0
- package/esm/funcs/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.d.ts.map +1 -0
- package/esm/funcs/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.js +104 -0
- package/esm/funcs/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.js.map +1 -0
- package/esm/funcs/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.d.ts +18 -0
- package/esm/funcs/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.d.ts.map +1 -0
- package/esm/funcs/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.js +90 -0
- package/esm/funcs/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.js.map +1 -0
- package/esm/funcs/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.d.ts +29 -0
- package/esm/funcs/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.d.ts.map +1 -0
- package/esm/funcs/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.js +101 -0
- package/esm/funcs/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.js.map +1 -0
- package/esm/funcs/update-arbiter-metadata-api-v1-arbiters-metadata-patch.d.ts +18 -0
- package/esm/funcs/update-arbiter-metadata-api-v1-arbiters-metadata-patch.d.ts.map +1 -0
- package/esm/funcs/update-arbiter-metadata-api-v1-arbiters-metadata-patch.js +84 -0
- package/esm/funcs/update-arbiter-metadata-api-v1-arbiters-metadata-patch.js.map +1 -0
- package/esm/funcs/validate-invite-code-api-v1-auth-validate-invite-code-post.d.ts +18 -0
- package/esm/funcs/validate-invite-code-api-v1-auth-validate-invite-code-post.d.ts.map +1 -0
- package/esm/funcs/validate-invite-code-api-v1-auth-validate-invite-code-post.js +79 -0
- package/esm/funcs/validate-invite-code-api-v1-auth-validate-invite-code-post.js.map +1 -0
- package/esm/funcs/webhooks-stripe-webhook-api-v1-payments-webhooks-stripe-post.d.ts +13 -0
- package/esm/funcs/webhooks-stripe-webhook-api-v1-payments-webhooks-stripe-post.d.ts.map +1 -0
- package/esm/funcs/webhooks-stripe-webhook-api-v1-payments-webhooks-stripe-post.js +61 -0
- package/esm/funcs/webhooks-stripe-webhook-api-v1-payments-webhooks-stripe-post.js.map +1 -0
- package/esm/git/push.d.ts +37 -0
- package/esm/git/push.d.ts.map +1 -0
- package/esm/git/push.js +113 -0
- package/esm/git/push.js.map +1 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.d.ts.map +1 -0
- package/esm/hooks/hooks.js +80 -0
- package/esm/hooks/hooks.js.map +1 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.d.ts.map +1 -0
- package/esm/hooks/index.js +6 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/types.d.ts +76 -0
- package/esm/hooks/types.d.ts.map +1 -0
- package/esm/hooks/types.js +5 -0
- package/esm/hooks/types.js.map +1 -0
- package/esm/index.d.ts +7 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +24 -0
- package/esm/index.js.map +1 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.d.ts.map +1 -0
- package/esm/lib/base64.js +31 -0
- package/esm/lib/base64.js.map +1 -0
- package/esm/lib/config.d.ts +38 -0
- package/esm/lib/config.d.ts.map +1 -0
- package/esm/lib/config.js +31 -0
- package/esm/lib/config.js.map +1 -0
- package/esm/lib/dlv.d.ts +14 -0
- package/esm/lib/dlv.d.ts.map +1 -0
- package/esm/lib/dlv.js +46 -0
- package/esm/lib/dlv.js.map +1 -0
- package/esm/lib/encodings.d.ts +54 -0
- package/esm/lib/encodings.d.ts.map +1 -0
- package/esm/lib/encodings.js +391 -0
- package/esm/lib/encodings.js.map +1 -0
- package/esm/lib/env.d.ts +15 -0
- package/esm/lib/env.d.ts.map +1 -0
- package/esm/lib/env.js +44 -0
- package/esm/lib/env.js.map +1 -0
- package/esm/lib/files.d.ts +26 -0
- package/esm/lib/files.d.ts.map +1 -0
- package/esm/lib/files.js +91 -0
- package/esm/lib/files.js.map +1 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.d.ts.map +1 -0
- package/esm/lib/http.js +209 -0
- package/esm/lib/http.js.map +1 -0
- package/esm/lib/is-plain-object.d.ts +2 -0
- package/esm/lib/is-plain-object.d.ts.map +1 -0
- package/esm/lib/is-plain-object.js +38 -0
- package/esm/lib/is-plain-object.js.map +1 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.d.ts.map +1 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/logger.js.map +1 -0
- package/esm/lib/matchers.d.ts +59 -0
- package/esm/lib/matchers.d.ts.map +1 -0
- package/esm/lib/matchers.js +202 -0
- package/esm/lib/matchers.js.map +1 -0
- package/esm/lib/primitives.d.ts +26 -0
- package/esm/lib/primitives.d.ts.map +1 -0
- package/esm/lib/primitives.js +103 -0
- package/esm/lib/primitives.js.map +1 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.d.ts.map +1 -0
- package/esm/lib/retries.js +150 -0
- package/esm/lib/retries.js.map +1 -0
- package/esm/lib/schemas.d.ts +21 -0
- package/esm/lib/schemas.d.ts.map +1 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/schemas.js.map +1 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.d.ts.map +1 -0
- package/esm/lib/sdks.js +260 -0
- package/esm/lib/sdks.js.map +1 -0
- package/esm/lib/security.d.ts +83 -0
- package/esm/lib/security.d.ts.map +1 -0
- package/esm/lib/security.js +149 -0
- package/esm/lib/security.js.map +1 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.d.ts.map +1 -0
- package/esm/lib/url.js +24 -0
- package/esm/lib/url.js.map +1 -0
- package/esm/main.d.ts +3 -0
- package/esm/main.d.ts.map +1 -0
- package/esm/main.js +20 -0
- package/esm/main.js.map +1 -0
- package/esm/modaic/api.d.ts +48 -0
- package/esm/modaic/api.d.ts.map +1 -0
- package/esm/modaic/api.js +131 -0
- package/esm/modaic/api.js.map +1 -0
- package/esm/modaic/arbiter.d.ts +101 -0
- package/esm/modaic/arbiter.d.ts.map +1 -0
- package/esm/modaic/arbiter.js +161 -0
- package/esm/modaic/arbiter.js.map +1 -0
- package/esm/modaic/git.d.ts +59 -0
- package/esm/modaic/git.d.ts.map +1 -0
- package/esm/modaic/git.js +193 -0
- package/esm/modaic/git.js.map +1 -0
- package/esm/modaic/index.d.ts +19 -0
- package/esm/modaic/index.d.ts.map +1 -0
- package/esm/modaic/index.js +19 -0
- package/esm/modaic/index.js.map +1 -0
- package/esm/modaic/runtime.d.ts +51 -0
- package/esm/modaic/runtime.d.ts.map +1 -0
- package/esm/modaic/runtime.js +88 -0
- package/esm/modaic/runtime.js.map +1 -0
- package/esm/modaic/serialization.d.ts +197 -0
- package/esm/modaic/serialization.d.ts.map +1 -0
- package/esm/modaic/serialization.js +389 -0
- package/esm/modaic/serialization.js.map +1 -0
- package/esm/modaic/signatures.d.ts +135 -0
- package/esm/modaic/signatures.d.ts.map +1 -0
- package/esm/modaic/signatures.js +290 -0
- package/esm/modaic/signatures.js.map +1 -0
- package/esm/models/annotate-example-request.d.ts +16 -0
- package/esm/models/annotate-example-request.d.ts.map +1 -0
- package/esm/models/annotate-example-request.js +13 -0
- package/esm/models/annotate-example-request.js.map +1 -0
- package/esm/models/arbiter-request.d.ts +18 -0
- package/esm/models/arbiter-request.d.ts.map +1 -0
- package/esm/models/arbiter-request.js +23 -0
- package/esm/models/arbiter-request.js.map +1 -0
- package/esm/models/batch-arbiter.d.ts +14 -0
- package/esm/models/batch-arbiter.d.ts.map +1 -0
- package/esm/models/batch-arbiter.js +19 -0
- package/esm/models/batch-arbiter.js.map +1 -0
- package/esm/models/batch-example.d.ts +51 -0
- package/esm/models/batch-example.d.ts.map +1 -0
- package/esm/models/batch-example.js +30 -0
- package/esm/models/batch-example.js.map +1 -0
- package/esm/models/batch-predictions-job-request.d.ts +30 -0
- package/esm/models/batch-predictions-job-request.d.ts.map +1 -0
- package/esm/models/batch-predictions-job-request.js +23 -0
- package/esm/models/batch-predictions-job-request.js.map +1 -0
- package/esm/models/chat-completion-choice.d.ts +13 -0
- package/esm/models/chat-completion-choice.d.ts.map +1 -0
- package/esm/models/chat-completion-choice.js +22 -0
- package/esm/models/chat-completion-choice.js.map +1 -0
- package/esm/models/chat-completion-request.d.ts +45 -0
- package/esm/models/chat-completion-request.d.ts.map +1 -0
- package/esm/models/chat-completion-request.js +39 -0
- package/esm/models/chat-completion-request.js.map +1 -0
- package/esm/models/chat-completion-response.d.ts +18 -0
- package/esm/models/chat-completion-response.d.ts.map +1 -0
- package/esm/models/chat-completion-response.js +27 -0
- package/esm/models/chat-completion-response.js.map +1 -0
- package/esm/models/chat-message.d.ts +27 -0
- package/esm/models/chat-message.d.ts.map +1 -0
- package/esm/models/chat-message.js +37 -0
- package/esm/models/chat-message.js.map +1 -0
- package/esm/models/completion-usage.d.ts +12 -0
- package/esm/models/completion-usage.d.ts.map +1 -0
- package/esm/models/completion-usage.js +23 -0
- package/esm/models/completion-usage.js.map +1 -0
- package/esm/models/confidence-score-job-request.d.ts +12 -0
- package/esm/models/confidence-score-job-request.d.ts.map +1 -0
- package/esm/models/confidence-score-job-request.js +17 -0
- package/esm/models/confidence-score-job-request.js.map +1 -0
- package/esm/models/confidence-status-response.d.ts +22 -0
- package/esm/models/confidence-status-response.d.ts.map +1 -0
- package/esm/models/confidence-status-response.js +30 -0
- package/esm/models/confidence-status-response.js.map +1 -0
- package/esm/models/delete-examples-request.d.ts +17 -0
- package/esm/models/delete-examples-request.d.ts.map +1 -0
- package/esm/models/delete-examples-request.js +19 -0
- package/esm/models/delete-examples-request.js.map +1 -0
- package/esm/models/dispatch-prediction-request.d.ts +33 -0
- package/esm/models/dispatch-prediction-request.d.ts.map +1 -0
- package/esm/models/dispatch-prediction-request.js +21 -0
- package/esm/models/dispatch-prediction-request.js.map +1 -0
- package/esm/models/errors/http-client-errors.d.ts +44 -0
- package/esm/models/errors/http-client-errors.d.ts.map +1 -0
- package/esm/models/errors/http-client-errors.js +56 -0
- package/esm/models/errors/http-client-errors.js.map +1 -0
- package/esm/models/errors/http-validation-error.d.ts +19 -0
- package/esm/models/errors/http-validation-error.d.ts.map +1 -0
- package/esm/models/errors/http-validation-error.js +36 -0
- package/esm/models/errors/http-validation-error.js.map +1 -0
- package/esm/models/errors/index.d.ts +7 -0
- package/esm/models/errors/index.d.ts.map +1 -0
- package/esm/models/errors/index.js +10 -0
- package/esm/models/errors/index.js.map +1 -0
- package/esm/models/errors/modaic-client-default-error.d.ts +10 -0
- package/esm/models/errors/modaic-client-default-error.d.ts.map +1 -0
- package/esm/models/errors/modaic-client-default-error.js +30 -0
- package/esm/models/errors/modaic-client-default-error.js.map +1 -0
- package/esm/models/errors/modaic-client-error.d.ts +19 -0
- package/esm/models/errors/modaic-client-error.d.ts.map +1 -0
- package/esm/models/errors/modaic-client-error.js +26 -0
- package/esm/models/errors/modaic-client-error.js.map +1 -0
- package/esm/models/errors/modaic-default-error.d.ts +10 -0
- package/esm/models/errors/modaic-default-error.d.ts.map +1 -0
- package/esm/models/errors/modaic-default-error.js +30 -0
- package/esm/models/errors/modaic-default-error.js.map +1 -0
- package/esm/models/errors/modaic-error.d.ts +19 -0
- package/esm/models/errors/modaic-error.d.ts.map +1 -0
- package/esm/models/errors/modaic-error.js +26 -0
- package/esm/models/errors/modaic-error.js.map +1 -0
- package/esm/models/errors/response-validation-error.d.ts +26 -0
- package/esm/models/errors/response-validation-error.d.ts.map +1 -0
- package/esm/models/errors/response-validation-error.js +37 -0
- package/esm/models/errors/response-validation-error.js.map +1 -0
- package/esm/models/errors/sdk-validation-error.d.ts +21 -0
- package/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/esm/models/errors/sdk-validation-error.js +52 -0
- package/esm/models/errors/sdk-validation-error.js.map +1 -0
- package/esm/models/export-examples-request.d.ts +15 -0
- package/esm/models/export-examples-request.d.ts.map +1 -0
- package/esm/models/export-examples-request.js +17 -0
- package/esm/models/export-examples-request.js.map +1 -0
- package/esm/models/export-examples-response.d.ts +17 -0
- package/esm/models/export-examples-response.d.ts.map +1 -0
- package/esm/models/export-examples-response.js +27 -0
- package/esm/models/export-examples-response.js.map +1 -0
- package/esm/models/field-schema.d.ts +26 -0
- package/esm/models/field-schema.d.ts.map +1 -0
- package/esm/models/field-schema.js +23 -0
- package/esm/models/field-schema.js.map +1 -0
- package/esm/models/gepa-job-request.d.ts +21 -0
- package/esm/models/gepa-job-request.d.ts.map +1 -0
- package/esm/models/gepa-job-request.js +26 -0
- package/esm/models/gepa-job-request.js.map +1 -0
- package/esm/models/gepa-job-response.d.ts +37 -0
- package/esm/models/gepa-job-response.d.ts.map +1 -0
- package/esm/models/gepa-job-response.js +44 -0
- package/esm/models/gepa-job-response.js.map +1 -0
- package/esm/models/gepa-kwargs.d.ts +64 -0
- package/esm/models/gepa-kwargs.d.ts.map +1 -0
- package/esm/models/gepa-kwargs.js +59 -0
- package/esm/models/gepa-kwargs.js.map +1 -0
- package/esm/models/get-confidence-request.d.ts +20 -0
- package/esm/models/get-confidence-request.d.ts.map +1 -0
- package/esm/models/get-confidence-request.js +20 -0
- package/esm/models/get-confidence-request.js.map +1 -0
- package/esm/models/index.d.ts +33 -0
- package/esm/models/index.d.ts.map +1 -0
- package/esm/models/index.js +36 -0
- package/esm/models/index.js.map +1 -0
- package/esm/models/init-arbiter-request.d.ts +23 -0
- package/esm/models/init-arbiter-request.d.ts.map +1 -0
- package/esm/models/init-arbiter-request.js +23 -0
- package/esm/models/init-arbiter-request.js.map +1 -0
- package/esm/models/lm.d.ts +18 -0
- package/esm/models/lm.d.ts.map +1 -0
- package/esm/models/lm.js +13 -0
- package/esm/models/lm.js.map +1 -0
- package/esm/models/login-request.d.ts +16 -0
- package/esm/models/login-request.d.ts.map +1 -0
- package/esm/models/login-request.js +14 -0
- package/esm/models/login-request.js.map +1 -0
- package/esm/models/mfa-verify-request.d.ts +16 -0
- package/esm/models/mfa-verify-request.d.ts.map +1 -0
- package/esm/models/mfa-verify-request.js +20 -0
- package/esm/models/mfa-verify-request.js.map +1 -0
- package/esm/models/o-auth-callback-request.d.ts +16 -0
- package/esm/models/o-auth-callback-request.d.ts.map +1 -0
- package/esm/models/o-auth-callback-request.js +21 -0
- package/esm/models/o-auth-callback-request.js.map +1 -0
- package/esm/models/operations/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.d.ts +12 -0
- package/esm/models/operations/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.d.ts.map +1 -0
- package/esm/models/operations/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.js +18 -0
- package/esm/models/operations/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.js.map +1 -0
- package/esm/models/operations/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.d.ts +12 -0
- package/esm/models/operations/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.d.ts.map +1 -0
- package/esm/models/operations/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.js +18 -0
- package/esm/models/operations/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.js.map +1 -0
- package/esm/models/operations/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.d.ts +12 -0
- package/esm/models/operations/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.d.ts.map +1 -0
- package/esm/models/operations/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.js +17 -0
- package/esm/models/operations/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.js.map +1 -0
- package/esm/models/operations/check-email-api-v1-user-check-email-get.d.ts +12 -0
- package/esm/models/operations/check-email-api-v1-user-check-email-get.d.ts.map +1 -0
- package/esm/models/operations/check-email-api-v1-user-check-email-get.js +12 -0
- package/esm/models/operations/check-email-api-v1-user-check-email-get.js.map +1 -0
- package/esm/models/operations/check-username-api-v1-user-check-username-username-get.d.ts +12 -0
- package/esm/models/operations/check-username-api-v1-user-check-username-username-get.d.ts.map +1 -0
- package/esm/models/operations/check-username-api-v1-user-check-username-username-get.js +12 -0
- package/esm/models/operations/check-username-api-v1-user-check-username-username-get.js.map +1 -0
- package/esm/models/operations/download-export-api-v1-examples-export-download-get.d.ts +14 -0
- package/esm/models/operations/download-export-api-v1-examples-export-download-get.d.ts.map +1 -0
- package/esm/models/operations/download-export-api-v1-examples-export-download-get.js +19 -0
- package/esm/models/operations/download-export-api-v1-examples-export-download-get.js.map +1 -0
- package/esm/models/operations/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.d.ts +12 -0
- package/esm/models/operations/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.d.ts.map +1 -0
- package/esm/models/operations/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.js +18 -0
- package/esm/models/operations/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.js.map +1 -0
- package/esm/models/operations/get-arbiter-api-v1-arbiters-get.d.ts +12 -0
- package/esm/models/operations/get-arbiter-api-v1-arbiters-get.d.ts.map +1 -0
- package/esm/models/operations/get-arbiter-api-v1-arbiters-get.js +12 -0
- package/esm/models/operations/get-arbiter-api-v1-arbiters-get.js.map +1 -0
- package/esm/models/operations/get-arbiter-schema-output-api-v1-arbiters-schema-get.d.ts +12 -0
- package/esm/models/operations/get-arbiter-schema-output-api-v1-arbiters-schema-get.d.ts.map +1 -0
- package/esm/models/operations/get-arbiter-schema-output-api-v1-arbiters-schema-get.js +12 -0
- package/esm/models/operations/get-arbiter-schema-output-api-v1-arbiters-schema-get.js.map +1 -0
- package/esm/models/operations/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.d.ts +12 -0
- package/esm/models/operations/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.d.ts.map +1 -0
- package/esm/models/operations/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.js +18 -0
- package/esm/models/operations/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.js.map +1 -0
- package/esm/models/operations/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.d.ts +12 -0
- package/esm/models/operations/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.d.ts.map +1 -0
- package/esm/models/operations/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.js +18 -0
- package/esm/models/operations/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.js.map +1 -0
- package/esm/models/operations/get-distinct-hashes-api-v1-examples-distinct-hashes-get.d.ts +14 -0
- package/esm/models/operations/get-distinct-hashes-api-v1-examples-distinct-hashes-get.d.ts.map +1 -0
- package/esm/models/operations/get-distinct-hashes-api-v1-examples-distinct-hashes-get.js +13 -0
- package/esm/models/operations/get-distinct-hashes-api-v1-examples-distinct-hashes-get.js.map +1 -0
- package/esm/models/operations/get-example-by-id-api-v1-examples-example-id-get.d.ts +15 -0
- package/esm/models/operations/get-example-by-id-api-v1-examples-example-id-get.d.ts.map +1 -0
- package/esm/models/operations/get-example-by-id-api-v1-examples-example-id-get.js +17 -0
- package/esm/models/operations/get-example-by-id-api-v1-examples-example-id-get.js.map +1 -0
- package/esm/models/operations/get-graded-count-api-v1-examples-graded-count-get.d.ts +14 -0
- package/esm/models/operations/get-graded-count-api-v1-examples-graded-count-get.d.ts.map +1 -0
- package/esm/models/operations/get-graded-count-api-v1-examples-graded-count-get.js +13 -0
- package/esm/models/operations/get-graded-count-api-v1-examples-graded-count-get.js.map +1 -0
- package/esm/models/operations/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.d.ts +12 -0
- package/esm/models/operations/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.d.ts.map +1 -0
- package/esm/models/operations/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.js +17 -0
- package/esm/models/operations/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.js.map +1 -0
- package/esm/models/operations/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.d.ts +12 -0
- package/esm/models/operations/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.d.ts.map +1 -0
- package/esm/models/operations/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.js +17 -0
- package/esm/models/operations/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.js.map +1 -0
- package/esm/models/operations/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.d.ts +12 -0
- package/esm/models/operations/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.d.ts.map +1 -0
- package/esm/models/operations/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.js +18 -0
- package/esm/models/operations/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.js.map +1 -0
- package/esm/models/operations/get-user-by-id-api-v1-user-user-id-get.d.ts +12 -0
- package/esm/models/operations/get-user-by-id-api-v1-user-user-id-get.d.ts.map +1 -0
- package/esm/models/operations/get-user-by-id-api-v1-user-user-id-get.js +12 -0
- package/esm/models/operations/get-user-by-id-api-v1-user-user-id-get.js.map +1 -0
- package/esm/models/operations/get-user-by-id-api-v2-users-id-user-id-get.d.ts +12 -0
- package/esm/models/operations/get-user-by-id-api-v2-users-id-user-id-get.d.ts.map +1 -0
- package/esm/models/operations/get-user-by-id-api-v2-users-id-user-id-get.js +17 -0
- package/esm/models/operations/get-user-by-id-api-v2-users-id-user-id-get.js.map +1 -0
- package/esm/models/operations/get-user-by-username-api-v1-user-username-username-get.d.ts +12 -0
- package/esm/models/operations/get-user-by-username-api-v1-user-username-username-get.d.ts.map +1 -0
- package/esm/models/operations/get-user-by-username-api-v1-user-username-username-get.js +12 -0
- package/esm/models/operations/get-user-by-username-api-v1-user-username-username-get.js.map +1 -0
- package/esm/models/operations/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.d.ts +14 -0
- package/esm/models/operations/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.d.ts.map +1 -0
- package/esm/models/operations/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.js +14 -0
- package/esm/models/operations/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.js.map +1 -0
- package/esm/models/operations/index.d.ts +22 -0
- package/esm/models/operations/index.d.ts.map +1 -0
- package/esm/models/operations/index.js +25 -0
- package/esm/models/operations/index.js.map +1 -0
- package/esm/models/operations/list-examples-api-v1-examples-get.d.ts +71 -0
- package/esm/models/operations/list-examples-api-v1-examples-get.d.ts.map +1 -0
- package/esm/models/operations/list-examples-api-v1-examples-get.js +46 -0
- package/esm/models/operations/list-examples-api-v1-examples-get.js.map +1 -0
- package/esm/models/operations/patch-example-api-v1-examples-example-id-annotation-patch.d.ts +18 -0
- package/esm/models/operations/patch-example-api-v1-examples-example-id-annotation-patch.d.ts.map +1 -0
- package/esm/models/operations/patch-example-api-v1-examples-example-id-annotation-patch.js +20 -0
- package/esm/models/operations/patch-example-api-v1-examples-example-id-annotation-patch.js.map +1 -0
- package/esm/models/operations/read-badge-badge-get.d.ts +14 -0
- package/esm/models/operations/read-badge-badge-get.d.ts.map +1 -0
- package/esm/models/operations/read-badge-badge-get.js +13 -0
- package/esm/models/operations/read-badge-badge-get.js.map +1 -0
- package/esm/models/operations/slack-callback-api-v1-notifications-slack-callback-get.d.ts +16 -0
- package/esm/models/operations/slack-callback-api-v1-notifications-slack-callback-get.d.ts.map +1 -0
- package/esm/models/operations/slack-callback-api-v1-notifications-slack-callback-get.js +14 -0
- package/esm/models/operations/slack-callback-api-v1-notifications-slack-callback-get.js.map +1 -0
- package/esm/models/operations/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.d.ts +12 -0
- package/esm/models/operations/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.d.ts.map +1 -0
- package/esm/models/operations/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.js +18 -0
- package/esm/models/operations/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.js.map +1 -0
- package/esm/models/operations/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.d.ts +12 -0
- package/esm/models/operations/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.d.ts.map +1 -0
- package/esm/models/operations/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.js +18 -0
- package/esm/models/operations/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.js.map +1 -0
- package/esm/models/operations/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.d.ts +12 -0
- package/esm/models/operations/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.d.ts.map +1 -0
- package/esm/models/operations/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.js +18 -0
- package/esm/models/operations/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.js.map +1 -0
- package/esm/models/paginated-page.d.ts +16 -0
- package/esm/models/paginated-page.d.ts.map +1 -0
- package/esm/models/paginated-page.js +27 -0
- package/esm/models/paginated-page.js.map +1 -0
- package/esm/models/predict-example-response.d.ts +18 -0
- package/esm/models/predict-example-response.d.ts.map +1 -0
- package/esm/models/predict-example-response.js +24 -0
- package/esm/models/predict-example-response.js.map +1 -0
- package/esm/models/predicted-example.d.ts +58 -0
- package/esm/models/predicted-example.d.ts.map +1 -0
- package/esm/models/predicted-example.js +56 -0
- package/esm/models/predicted-example.js.map +1 -0
- package/esm/models/prediction-annotation.d.ts +19 -0
- package/esm/models/prediction-annotation.d.ts.map +1 -0
- package/esm/models/prediction-annotation.js +21 -0
- package/esm/models/prediction-annotation.js.map +1 -0
- package/esm/models/register-request.d.ts +22 -0
- package/esm/models/register-request.d.ts.map +1 -0
- package/esm/models/register-request.js +17 -0
- package/esm/models/register-request.js.map +1 -0
- package/esm/models/security.d.ts +12 -0
- package/esm/models/security.d.ts.map +1 -0
- package/esm/models/security.js +12 -0
- package/esm/models/security.js.map +1 -0
- package/esm/models/src-api-v1-arbiters-schemas-predict-example-request.d.ts +21 -0
- package/esm/models/src-api-v1-arbiters-schemas-predict-example-request.d.ts.map +1 -0
- package/esm/models/src-api-v1-arbiters-schemas-predict-example-request.js +20 -0
- package/esm/models/src-api-v1-arbiters-schemas-predict-example-request.js.map +1 -0
- package/esm/models/src-api-v2-arbiters-schemas-predict-example-request.d.ts +41 -0
- package/esm/models/src-api-v2-arbiters-schemas-predict-example-request.d.ts.map +1 -0
- package/esm/models/src-api-v2-arbiters-schemas-predict-example-request.js +28 -0
- package/esm/models/src-api-v2-arbiters-schemas-predict-example-request.js.map +1 -0
- package/esm/models/update-arbiter-metadata-request.d.ts +18 -0
- package/esm/models/update-arbiter-metadata-request.d.ts.map +1 -0
- package/esm/models/update-arbiter-metadata-request.js +13 -0
- package/esm/models/update-arbiter-metadata-request.js.map +1 -0
- package/esm/models/validate-invite-code-request.d.ts +12 -0
- package/esm/models/validate-invite-code-request.d.ts.map +1 -0
- package/esm/models/validate-invite-code-request.js +12 -0
- package/esm/models/validate-invite-code-request.js.map +1 -0
- package/esm/models/validation-error.d.ts +22 -0
- package/esm/models/validation-error.d.ts.map +1 -0
- package/esm/models/validation-error.js +32 -0
- package/esm/models/validation-error.js.map +1 -0
- package/esm/models/waitlist-request.d.ts +16 -0
- package/esm/models/waitlist-request.d.ts.map +1 -0
- package/esm/models/waitlist-request.js +14 -0
- package/esm/models/waitlist-request.js.map +1 -0
- package/esm/primitives/module.d.ts +44 -0
- package/esm/primitives/module.d.ts.map +1 -0
- package/esm/primitives/module.js +117 -0
- package/esm/primitives/module.js.map +1 -0
- package/esm/programs/predict.d.ts +65 -0
- package/esm/programs/predict.d.ts.map +1 -0
- package/esm/programs/predict.js +73 -0
- package/esm/programs/predict.js.map +1 -0
- package/esm/sdk/index.d.ts +2 -0
- package/esm/sdk/index.d.ts.map +1 -0
- package/esm/sdk/index.js +5 -0
- package/esm/sdk/index.js.map +1 -0
- package/esm/sdk/sdk.d.ts +325 -0
- package/esm/sdk/sdk.d.ts.map +1 -0
- package/esm/sdk/sdk.js +431 -0
- package/esm/sdk/sdk.js.map +1 -0
- package/esm/sdk/webhooks.d.ts +8 -0
- package/esm/sdk/webhooks.d.ts.map +1 -0
- package/esm/sdk/webhooks.js +15 -0
- package/esm/sdk/webhooks.js.map +1 -0
- package/esm/serialization/config.d.ts +79 -0
- package/esm/serialization/config.d.ts.map +1 -0
- package/esm/serialization/config.js +57 -0
- package/esm/serialization/config.js.map +1 -0
- package/esm/serialization/naming.d.ts +14 -0
- package/esm/serialization/naming.d.ts.map +1 -0
- package/esm/serialization/naming.js +21 -0
- package/esm/serialization/naming.js.map +1 -0
- package/esm/serialization/program.d.ts +45 -0
- package/esm/serialization/program.d.ts.map +1 -0
- package/esm/serialization/program.js +30 -0
- package/esm/serialization/program.js.map +1 -0
- package/esm/serialization/zod_schema.d.ts +33 -0
- package/esm/serialization/zod_schema.d.ts.map +1 -0
- package/esm/serialization/zod_schema.js +269 -0
- package/esm/serialization/zod_schema.js.map +1 -0
- package/esm/signatures/signature.d.ts +68 -0
- package/esm/signatures/signature.d.ts.map +1 -0
- package/esm/signatures/signature.js +222 -0
- package/esm/signatures/signature.js.map +1 -0
- package/esm/signatures/types.d.ts +69 -0
- package/esm/signatures/types.d.ts.map +1 -0
- package/esm/signatures/types.js +68 -0
- package/esm/signatures/types.js.map +1 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.d.ts.map +1 -0
- package/esm/types/async.js +28 -0
- package/esm/types/async.js.map +1 -0
- package/esm/types/blobs.d.ts +4 -0
- package/esm/types/blobs.d.ts.map +1 -0
- package/esm/types/blobs.js +25 -0
- package/esm/types/blobs.js.map +1 -0
- package/esm/types/const-date-time.d.ts +3 -0
- package/esm/types/const-date-time.d.ts.map +1 -0
- package/esm/types/const-date-time.js +10 -0
- package/esm/types/const-date-time.js.map +1 -0
- package/esm/types/default-to-zero-value.d.ts +12 -0
- package/esm/types/default-to-zero-value.d.ts.map +1 -0
- package/esm/types/default-to-zero-value.js +31 -0
- package/esm/types/default-to-zero-value.js.map +1 -0
- package/esm/types/enums.d.ts +9 -0
- package/esm/types/enums.d.ts.map +1 -0
- package/esm/types/enums.js +27 -0
- package/esm/types/enums.js.map +1 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.d.ts.map +1 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/fp.js.map +1 -0
- package/esm/types/index.d.ts +10 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +10 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/operations.d.ts +27 -0
- package/esm/types/operations.d.ts.map +1 -0
- package/esm/types/operations.js +77 -0
- package/esm/types/operations.js.map +1 -0
- package/esm/types/primitives.d.ts +9 -0
- package/esm/types/primitives.d.ts.map +1 -0
- package/esm/types/primitives.js +109 -0
- package/esm/types/primitives.js.map +1 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.d.ts.map +1 -0
- package/esm/types/rfcdate.js +43 -0
- package/esm/types/rfcdate.js.map +1 -0
- package/esm/types/smart-union.d.ts +7 -0
- package/esm/types/smart-union.d.ts.map +1 -0
- package/esm/types/smart-union.js +117 -0
- package/esm/types/smart-union.js.map +1 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.d.ts.map +1 -0
- package/esm/types/streams.js +15 -0
- package/esm/types/streams.js.map +1 -0
- package/esm/types/unrecognized.d.ts +16 -0
- package/esm/types/unrecognized.d.ts.map +1 -0
- package/esm/types/unrecognized.js +31 -0
- package/esm/types/unrecognized.js.map +1 -0
- package/jsr.json +27 -0
- package/package.json +77 -0
- package/src/core.ts +13 -0
- package/src/funcs/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.ts +189 -0
- package/src/funcs/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.ts +187 -0
- package/src/funcs/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.ts +187 -0
- package/src/funcs/create-chat-completion-api-v1-arbiters-chat-completions-post.ts +169 -0
- package/src/funcs/create-chat-completion-api-v1-chat-completions-post.ts +150 -0
- package/src/funcs/create-prediction-api-v1-arbiters-predictions-post.ts +173 -0
- package/src/funcs/create-prediction-api-v2-arbiters-predictions-post.ts +181 -0
- package/src/funcs/delete-examples-api-v1-examples-delete.ts +172 -0
- package/src/funcs/dispatch-prediction-api-v1-arbiters-predictions-dispatch-post.ts +170 -0
- package/src/funcs/download-export-api-v1-examples-export-download-get.ts +182 -0
- package/src/funcs/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.ts +192 -0
- package/src/funcs/export-examples-api-v1-examples-export-post.ts +172 -0
- package/src/funcs/get-arbiter-api-v1-arbiters-get.ts +177 -0
- package/src/funcs/get-arbiter-schema-output-api-v1-arbiters-schema-get.ts +178 -0
- package/src/funcs/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.ts +198 -0
- package/src/funcs/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.ts +187 -0
- package/src/funcs/get-distinct-hashes-api-v1-examples-distinct-hashes-get.ts +183 -0
- package/src/funcs/get-example-by-id-api-v1-examples-example-id-get.ts +180 -0
- package/src/funcs/get-graded-count-api-v1-examples-graded-count-get.ts +182 -0
- package/src/funcs/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.ts +185 -0
- package/src/funcs/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.ts +189 -0
- package/src/funcs/get-prediction-confidence-api-v1-arbiters-predictions-confidence-post.ts +179 -0
- package/src/funcs/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.ts +191 -0
- package/src/funcs/get-supported-models-api-v1-arbiters-supported-models-get.ts +141 -0
- package/src/funcs/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.ts +185 -0
- package/src/funcs/ingest-examples-api-v1-examples-post.ts +150 -0
- package/src/funcs/init-arbiter-api-v1-arbiters-post.ts +169 -0
- package/src/funcs/list-examples-api-v1-examples-get.ts +193 -0
- package/src/funcs/patch-example-api-v1-examples-example-id-annotation-patch.ts +185 -0
- package/src/funcs/start-batch-predictions-job-api-v1-jobs-batch-predictions-post.ts +190 -0
- package/src/funcs/start-confidence-score-job-api-v1-jobs-confidence-scores-post.ts +174 -0
- package/src/funcs/start-optimization-job-api-v1-jobs-gepa-post.ts +177 -0
- package/src/funcs/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.ts +201 -0
- package/src/funcs/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.ts +187 -0
- package/src/funcs/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.ts +198 -0
- package/src/funcs/update-arbiter-metadata-api-v1-arbiters-metadata-patch.ts +173 -0
- package/src/hooks/hooks.ts +129 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +107 -0
- package/src/index.ts +26 -0
- package/src/lib/base64.ts +39 -0
- package/src/lib/config.ts +64 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +529 -0
- package/src/lib/env.ts +57 -0
- package/src/lib/files.ts +104 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +356 -0
- package/src/lib/primitives.ts +150 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +94 -0
- package/src/lib/sdks.ts +405 -0
- package/src/lib/security.ts +275 -0
- package/src/lib/url.ts +35 -0
- package/src/modaic/arbiter.ts +252 -0
- package/src/modaic/git.ts +267 -0
- package/src/modaic/index.ts +61 -0
- package/src/modaic/runtime.ts +107 -0
- package/src/modaic/serialization.ts +592 -0
- package/src/modaic/signatures.ts +398 -0
- package/src/models/annotate-example-request.ts +38 -0
- package/src/models/arbiter-request.ts +46 -0
- package/src/models/batch-arbiter.ts +38 -0
- package/src/models/batch-example.ts +75 -0
- package/src/models/batch-predictions-job-request.ts +68 -0
- package/src/models/chat-completion-choice.ts +44 -0
- package/src/models/chat-completion-request.ts +94 -0
- package/src/models/chat-completion-response.ts +59 -0
- package/src/models/chat-message.ts +73 -0
- package/src/models/completion-usage.ts +45 -0
- package/src/models/confidence-score-job-request.ts +38 -0
- package/src/models/confidence-status-response.ts +62 -0
- package/src/models/delete-examples-request.ts +45 -0
- package/src/models/dispatch-prediction-request.ts +58 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/http-validation-error.ts +53 -0
- package/src/models/errors/index.ts +10 -0
- package/src/models/errors/modaic-client-default-error.ts +40 -0
- package/src/models/errors/modaic-client-error.ts +35 -0
- package/src/models/errors/response-validation-error.ts +50 -0
- package/src/models/errors/sdk-validation-error.ts +54 -0
- package/src/models/export-examples-request.ts +41 -0
- package/src/models/export-examples-response.ts +54 -0
- package/src/models/field-schema.ts +50 -0
- package/src/models/gepa-job-request.ts +55 -0
- package/src/models/gepa-job-response.ts +79 -0
- package/src/models/gepa-kwargs.ts +122 -0
- package/src/models/get-confidence-request.ts +45 -0
- package/src/models/index.ts +36 -0
- package/src/models/init-arbiter-request.ts +58 -0
- package/src/models/lm.ts +26 -0
- package/src/models/operations/cancel-batch-predictions-job-api-v1-jobs-batch-predictions-job-id-delete.ts +45 -0
- package/src/models/operations/cancel-confidence-score-job-api-v1-jobs-confidence-scores-job-id-delete.ts +45 -0
- package/src/models/operations/cancel-optimization-job-api-v1-jobs-gepa-job-id-delete.ts +42 -0
- package/src/models/operations/download-export-api-v1-examples-export-download-get.ts +46 -0
- package/src/models/operations/enqueue-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-post.ts +45 -0
- package/src/models/operations/get-arbiter-api-v1-arbiters-get.ts +32 -0
- package/src/models/operations/get-arbiter-schema-output-api-v1-arbiters-schema-get.ts +34 -0
- package/src/models/operations/get-batch-predictions-job-status-api-v1-jobs-batch-predictions-job-id-get.ts +45 -0
- package/src/models/operations/get-confidence-score-job-status-api-v1-jobs-confidence-scores-job-id-get.ts +45 -0
- package/src/models/operations/get-distinct-hashes-api-v1-examples-distinct-hashes-get.ts +37 -0
- package/src/models/operations/get-example-by-id-api-v1-examples-example-id-get.ts +45 -0
- package/src/models/operations/get-graded-count-api-v1-examples-graded-count-get.ts +37 -0
- package/src/models/operations/get-optimization-job-logs-api-v1-jobs-gepa-job-id-logs-get.ts +42 -0
- package/src/models/operations/get-optimization-job-status-api-v1-jobs-gepa-job-id-get.ts +42 -0
- package/src/models/operations/get-prediction-confidence-status-api-v1-arbiters-predictions-prediction-id-confidence-get.ts +45 -0
- package/src/models/operations/has-uncalibrated-predictions-api-v1-examples-has-uncalibrated-get.ts +37 -0
- package/src/models/operations/index.ts +25 -0
- package/src/models/operations/list-examples-api-v1-examples-get.ts +121 -0
- package/src/models/operations/patch-example-api-v1-examples-example-id-annotation-patch.ts +49 -0
- package/src/models/operations/stream-batch-predictions-events-api-v1-jobs-batch-predictions-job-id-events-get.ts +45 -0
- package/src/models/operations/stream-batch-predictions-results-api-v1-jobs-batch-predictions-job-id-results-get.ts +45 -0
- package/src/models/operations/stream-prediction-confidence-api-v1-arbiters-predictions-prediction-id-confidence-stream-get.ts +45 -0
- package/src/models/paginated-page.ts +55 -0
- package/src/models/predict-example-response.ts +48 -0
- package/src/models/predicted-example.ts +124 -0
- package/src/models/prediction-annotation.ts +49 -0
- package/src/models/security.ts +26 -0
- package/src/models/src-api-v1-arbiters-schemas-predict-example-request.ts +53 -0
- package/src/models/src-api-v2-arbiters-schemas-predict-example-request.ts +74 -0
- package/src/models/update-arbiter-metadata-request.ts +35 -0
- package/src/models/validation-error.ts +75 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/sdk.ts +750 -0
- package/src/types/async.ts +69 -0
- package/src/types/blobs.ts +33 -0
- package/src/types/const-date-time.ts +15 -0
- package/src/types/default-to-zero-value.ts +33 -0
- package/src/types/enums.ts +45 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +13 -0
- package/src/types/operations.ts +105 -0
- package/src/types/primitives.ts +140 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/smart-union.ts +153 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
package/FUNCTIONS.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Standalone Functions
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This section is useful if you are using a bundler and targeting browsers and
|
|
5
|
+
> runtimes where the size of an application affects performance and load times.
|
|
6
|
+
|
|
7
|
+
Every method in this SDK is also available as a standalone function. This
|
|
8
|
+
alternative API is suitable when targeting the browser or serverless runtimes
|
|
9
|
+
and using a bundler to build your application since all unused functionality
|
|
10
|
+
will be tree-shaken away. This includes code for unused methods, Zod schemas,
|
|
11
|
+
encoding helpers and response handlers. The result is dramatically smaller
|
|
12
|
+
impact on the application's final bundle size which grows very slowly as you use
|
|
13
|
+
more and more functionality from this SDK.
|
|
14
|
+
|
|
15
|
+
Calling methods through the main SDK class remains a valid and generally more
|
|
16
|
+
more ergonomic option. Standalone functions represent an optimisation for a
|
|
17
|
+
specific category of applications.
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { ModaicClientCore } from "modaic/core.js";
|
|
23
|
+
import { createChatCompletionApiV1ChatCompletionsPost } from "modaic/funcs/create-chat-completion-api-v1-chat-completions-post.js";
|
|
24
|
+
|
|
25
|
+
// Use `ModaicClientCore` for best tree-shaking performance.
|
|
26
|
+
// You can create one instance of it to use across an application.
|
|
27
|
+
const modaicClient = new ModaicClientCore({
|
|
28
|
+
token: process.env["MODAIC_TOKEN"] ?? "",
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
async function run() {
|
|
32
|
+
const res = await createChatCompletionApiV1ChatCompletionsPost(modaicClient);
|
|
33
|
+
if (res.ok) {
|
|
34
|
+
const { value: result } = res;
|
|
35
|
+
console.log(result);
|
|
36
|
+
} else {
|
|
37
|
+
console.log("createChatCompletionApiV1ChatCompletionsPost failed:", res.error);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
run();
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Result types
|
|
45
|
+
|
|
46
|
+
Standalone functions differ from SDK methods in that they return a
|
|
47
|
+
`Result<Value, Error>` type to capture _known errors_ and document them using
|
|
48
|
+
the type system. By avoiding throwing errors, application code maintains clear
|
|
49
|
+
control flow and error-handling become part of the regular flow of application
|
|
50
|
+
code.
|
|
51
|
+
|
|
52
|
+
> We use the term "known errors" because standalone functions, and JavaScript
|
|
53
|
+
> code in general, can still throw unexpected errors such as `TypeError`s,
|
|
54
|
+
> `RangeError`s and `DOMException`s. Exhaustively catching all errors may be
|
|
55
|
+
> something this SDK addresses in the future. Nevertheless, there is still a lot
|
|
56
|
+
> of benefit from capturing most errors and turning them into values.
|
|
57
|
+
|
|
58
|
+
The second reason for this style of programming is because these functions will
|
|
59
|
+
typically be used in front-end applications where exception throwing is
|
|
60
|
+
sometimes discouraged or considered unidiomatic. React and similar ecosystems
|
|
61
|
+
and libraries tend to promote this style of programming so that components
|
|
62
|
+
render useful content under all states (loading, success, error and so on).
|
|
63
|
+
|
|
64
|
+
The general pattern when calling standalone functions looks like this:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { Core } from "<sdk-package-name>";
|
|
68
|
+
import { fetchSomething } from "<sdk-package-name>/funcs/fetchSomething.js";
|
|
69
|
+
|
|
70
|
+
const client = new Core();
|
|
71
|
+
|
|
72
|
+
async function run() {
|
|
73
|
+
const result = await fetchSomething(client, { id: "123" });
|
|
74
|
+
if (!result.ok) {
|
|
75
|
+
// You can throw the error or handle it. It's your choice now.
|
|
76
|
+
throw result.error;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
console.log(result.value);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
run();
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Notably, `result.error` above will have an explicit type compared to a try-catch
|
|
86
|
+
variation where the error in the catch block can only be of type `unknown` (or
|
|
87
|
+
`any` depending on your TypeScript settings).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Modaic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
# @modaic/modaic-ts
|
|
2
|
+
|
|
3
|
+
TypeScript client for [Modaic](https://modaic.dev) Arbiters (LLM judges).
|
|
4
|
+
|
|
5
|
+
`Arbiter` is a thin wrapper over the Modaic REST API and git — it never runs an
|
|
6
|
+
LLM locally. `predict()` calls the API; `create()` / `update()` write the judge's
|
|
7
|
+
`config.json` (signature schema) and `program.json` (stored prompt) and push them
|
|
8
|
+
to Modaic Hub via git. These files are produced the same way as the Python SDK so
|
|
9
|
+
the two interoperate.
|
|
10
|
+
|
|
11
|
+
## Quickstart
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Arbiter, Signature } from "@modaic/modaic-ts";
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
|
|
17
|
+
const signature = new Signature({
|
|
18
|
+
instructions: "Decide whether the answer correctly addresses the question.",
|
|
19
|
+
input: z.object({
|
|
20
|
+
question: z.string().describe("The user's question"),
|
|
21
|
+
answer: z.string().describe("The answer to judge"),
|
|
22
|
+
}),
|
|
23
|
+
output: z.object({
|
|
24
|
+
verdict: z.string().describe("correct | incorrect"),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Create + push a new judge (private by default). Uses MODAIC_TOKEN.
|
|
29
|
+
const arbiter = await Arbiter.create({
|
|
30
|
+
repo: "modaic/quality-judge",
|
|
31
|
+
signature,
|
|
32
|
+
commit_message: "initial judge",
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Run it (the server runs the LLM).
|
|
36
|
+
const result = await arbiter.predict({ question: "...", answer: "..." });
|
|
37
|
+
console.log(result.output, result.reasoning);
|
|
38
|
+
|
|
39
|
+
// Update later (optional new signature / metadata / extra files).
|
|
40
|
+
await arbiter.update({ signature, commit_message: "tweak prompt" });
|
|
41
|
+
|
|
42
|
+
// Open an existing judge at a specific revision.
|
|
43
|
+
const existing = new Arbiter("modaic/quality-judge", { rev: "v1" });
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
| Env var | Default | Purpose |
|
|
49
|
+
| ---------------- | ------------------------- | ------------------------------------ |
|
|
50
|
+
| `MODAIC_TOKEN` | — | Access token (or pass `access_token`)|
|
|
51
|
+
| `MODAIC_API_URL` | `https://api.modaic.dev` | Modaic REST API base URL |
|
|
52
|
+
| `MODAIC_GIT_URL` | `https://git.modaic.dev` | Modaic git host |
|
|
53
|
+
| `MODAIC_CACHE` | `~/.cache/modaic` | Staging dir for git working trees |
|
|
54
|
+
|
|
55
|
+
## Develop
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bun install
|
|
59
|
+
bun test
|
|
60
|
+
bun run build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> Note: `serializeSignatureToConfig` (signature → `config.json`) is provided
|
|
64
|
+
> separately and currently throws. `create()`/`update()` with a signature will
|
|
65
|
+
> not push until that lands; `predict()` and `program.json` generation work today.
|
|
66
|
+
|
|
67
|
+
<!-- Start Summary [summary] -->
|
|
68
|
+
## Summary
|
|
69
|
+
|
|
70
|
+
Modaic API: A FastAPI application for Modaic
|
|
71
|
+
<!-- End Summary [summary] -->
|
|
72
|
+
|
|
73
|
+
<!-- Start Table of Contents [toc] -->
|
|
74
|
+
## Table of Contents
|
|
75
|
+
<!-- $toc-max-depth=2 -->
|
|
76
|
+
* [@modaic/modaic-ts](#modaicmodaic-ts)
|
|
77
|
+
* [Quickstart](#quickstart)
|
|
78
|
+
* [Configuration](#configuration)
|
|
79
|
+
* [Develop](#develop)
|
|
80
|
+
* [SDK Installation](#sdk-installation)
|
|
81
|
+
* [Requirements](#requirements)
|
|
82
|
+
* [SDK Example Usage](#sdk-example-usage)
|
|
83
|
+
* [Authentication](#authentication)
|
|
84
|
+
* [Available Resources and Operations](#available-resources-and-operations)
|
|
85
|
+
* [Standalone functions](#standalone-functions)
|
|
86
|
+
* [Retries](#retries)
|
|
87
|
+
* [Error Handling](#error-handling)
|
|
88
|
+
* [Server Selection](#server-selection)
|
|
89
|
+
* [Custom HTTP Client](#custom-http-client)
|
|
90
|
+
* [Debugging](#debugging)
|
|
91
|
+
|
|
92
|
+
<!-- End Table of Contents [toc] -->
|
|
93
|
+
|
|
94
|
+
<!-- Start SDK Installation [installation] -->
|
|
95
|
+
## SDK Installation
|
|
96
|
+
|
|
97
|
+
> [!TIP]
|
|
98
|
+
> To finish publishing your SDK to npm and others you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
|
|
102
|
+
|
|
103
|
+
### NPM
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm add <UNSET>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### PNPM
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pnpm add <UNSET>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Bun
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
bun add <UNSET>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Yarn
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
yarn add <UNSET>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
> [!NOTE]
|
|
128
|
+
> This package is published as an ES Module (ESM) only. For applications using
|
|
129
|
+
> CommonJS, use `await import()` to import and use this package.
|
|
130
|
+
<!-- End SDK Installation [installation] -->
|
|
131
|
+
|
|
132
|
+
<!-- Start Requirements [requirements] -->
|
|
133
|
+
## Requirements
|
|
134
|
+
|
|
135
|
+
For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
|
|
136
|
+
<!-- End Requirements [requirements] -->
|
|
137
|
+
|
|
138
|
+
<!-- Start SDK Example Usage [usage] -->
|
|
139
|
+
## SDK Example Usage
|
|
140
|
+
|
|
141
|
+
### Example
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import { ModaicClient } from "modaic";
|
|
145
|
+
|
|
146
|
+
const modaicClient = new ModaicClient({
|
|
147
|
+
token: process.env["MODAIC_TOKEN"] ?? "",
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
async function run() {
|
|
151
|
+
const result = await modaicClient
|
|
152
|
+
.createChatCompletionApiV1ChatCompletionsPost();
|
|
153
|
+
|
|
154
|
+
console.log(result);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
run();
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
<!-- End SDK Example Usage [usage] -->
|
|
161
|
+
|
|
162
|
+
<!-- Start Authentication [security] -->
|
|
163
|
+
## Authentication
|
|
164
|
+
|
|
165
|
+
### Per-Client Security Schemes
|
|
166
|
+
|
|
167
|
+
This SDK supports the following security scheme globally:
|
|
168
|
+
|
|
169
|
+
| Name | Type | Scheme | Environment Variable |
|
|
170
|
+
| ------- | ---- | ----------- | -------------------- |
|
|
171
|
+
| `token` | http | HTTP Bearer | `MODAIC_TOKEN` |
|
|
172
|
+
|
|
173
|
+
To authenticate with the API the `token` parameter must be set when initializing the SDK client instance. For example:
|
|
174
|
+
```typescript
|
|
175
|
+
import { ModaicClient } from "modaic";
|
|
176
|
+
|
|
177
|
+
const modaicClient = new ModaicClient({
|
|
178
|
+
token: process.env["MODAIC_TOKEN"] ?? "",
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
async function run() {
|
|
182
|
+
const result = await modaicClient
|
|
183
|
+
.createChatCompletionApiV1ChatCompletionsPost();
|
|
184
|
+
|
|
185
|
+
console.log(result);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
run();
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
<!-- End Authentication [security] -->
|
|
192
|
+
|
|
193
|
+
<!-- Start Available Resources and Operations [operations] -->
|
|
194
|
+
## Available Resources and Operations
|
|
195
|
+
|
|
196
|
+
<details open>
|
|
197
|
+
<summary>Available methods</summary>
|
|
198
|
+
|
|
199
|
+
### [ModaicClient SDK](docs/sdks/modaicclient/README.md)
|
|
200
|
+
|
|
201
|
+
* [createChatCompletionApiV1ChatCompletionsPost](docs/sdks/modaicclient/README.md#createchatcompletionapiv1chatcompletionspost) - Create Chat Completion
|
|
202
|
+
* [startConfidenceScoreJobApiV1JobsConfidenceScoresPost](docs/sdks/modaicclient/README.md#startconfidencescorejobapiv1jobsconfidencescorespost) - Start Confidence Score Job
|
|
203
|
+
* [getConfidenceScoreJobStatusApiV1JobsConfidenceScoresJobIdGet](docs/sdks/modaicclient/README.md#getconfidencescorejobstatusapiv1jobsconfidencescoresjobidget) - Get Confidence Score Job Status
|
|
204
|
+
* [cancelConfidenceScoreJobApiV1JobsConfidenceScoresJobIdDelete](docs/sdks/modaicclient/README.md#cancelconfidencescorejobapiv1jobsconfidencescoresjobiddelete) - Cancel Confidence Score Job
|
|
205
|
+
* [startOptimizationJobApiV1JobsGepaPost](docs/sdks/modaicclient/README.md#startoptimizationjobapiv1jobsgepapost) - Start Optimization Job
|
|
206
|
+
* [cancelOptimizationJobApiV1JobsGepaJobIdDelete](docs/sdks/modaicclient/README.md#canceloptimizationjobapiv1jobsgepajobiddelete) - Cancel Optimization Job
|
|
207
|
+
* [getOptimizationJobStatusApiV1JobsGepaJobIdGet](docs/sdks/modaicclient/README.md#getoptimizationjobstatusapiv1jobsgepajobidget) - Get Optimization Job Status
|
|
208
|
+
* [getOptimizationJobLogsApiV1JobsGepaJobIdLogsGet](docs/sdks/modaicclient/README.md#getoptimizationjoblogsapiv1jobsgepajobidlogsget) - Get Optimization Job Logs
|
|
209
|
+
* [startBatchPredictionsJobApiV1JobsBatchPredictionsPost](docs/sdks/modaicclient/README.md#startbatchpredictionsjobapiv1jobsbatchpredictionspost) - Start Batch Predictions Job
|
|
210
|
+
* [getBatchPredictionsJobStatusApiV1JobsBatchPredictionsJobIdGet](docs/sdks/modaicclient/README.md#getbatchpredictionsjobstatusapiv1jobsbatchpredictionsjobidget) - Get Batch Predictions Job Status
|
|
211
|
+
* [cancelBatchPredictionsJobApiV1JobsBatchPredictionsJobIdDelete](docs/sdks/modaicclient/README.md#cancelbatchpredictionsjobapiv1jobsbatchpredictionsjobiddelete) - Cancel Batch Predictions Job
|
|
212
|
+
* [streamBatchPredictionsEventsApiV1JobsBatchPredictionsJobIdEventsGet](docs/sdks/modaicclient/README.md#streambatchpredictionseventsapiv1jobsbatchpredictionsjobideventsget) - Stream Batch Predictions Events
|
|
213
|
+
* [streamBatchPredictionsResultsApiV1JobsBatchPredictionsJobIdResultsGet](docs/sdks/modaicclient/README.md#streambatchpredictionsresultsapiv1jobsbatchpredictionsjobidresultsget) - Stream Batch Predictions Results
|
|
214
|
+
* [getArbiterApiV1ArbitersGet](docs/sdks/modaicclient/README.md#getarbiterapiv1arbitersget) - Get Arbiter
|
|
215
|
+
* [getArbiterSchemaOutputApiV1ArbitersSchemaGet](docs/sdks/modaicclient/README.md#getarbiterschemaoutputapiv1arbitersschemaget) - Get Arbiter Schema Output
|
|
216
|
+
* [createPredictionApiV1ArbitersPredictionsPost](docs/sdks/modaicclient/README.md#createpredictionapiv1arbiterspredictionspost) - Create Prediction
|
|
217
|
+
* [getPredictionConfidenceApiV1ArbitersPredictionsConfidencePost](docs/sdks/modaicclient/README.md#getpredictionconfidenceapiv1arbiterspredictionsconfidencepost) - Get Prediction Confidence
|
|
218
|
+
* [enqueuePredictionConfidenceApiV1ArbitersPredictionsPredictionIdConfidencePost](docs/sdks/modaicclient/README.md#enqueuepredictionconfidenceapiv1arbiterspredictionspredictionidconfidencepost) - Enqueue Prediction Confidence
|
|
219
|
+
* [getPredictionConfidenceStatusApiV1ArbitersPredictionsPredictionIdConfidenceGet](docs/sdks/modaicclient/README.md#getpredictionconfidencestatusapiv1arbiterspredictionspredictionidconfidenceget) - Get Prediction Confidence Status
|
|
220
|
+
* [streamPredictionConfidenceApiV1ArbitersPredictionsPredictionIdConfidenceStreamGet](docs/sdks/modaicclient/README.md#streampredictionconfidenceapiv1arbiterspredictionspredictionidconfidencestreamget) - Stream Prediction Confidence
|
|
221
|
+
* [dispatchPredictionApiV1ArbitersPredictionsDispatchPost](docs/sdks/modaicclient/README.md#dispatchpredictionapiv1arbiterspredictionsdispatchpost) - Dispatch Prediction
|
|
222
|
+
* [createChatCompletionApiV1ArbitersChatCompletionsPost](docs/sdks/modaicclient/README.md#createchatcompletionapiv1arbiterschatcompletionspost) - Create Chat Completion
|
|
223
|
+
* [getSupportedModelsApiV1ArbitersSupportedModelsGet](docs/sdks/modaicclient/README.md#getsupportedmodelsapiv1arbiterssupportedmodelsget) - Get Supported Models
|
|
224
|
+
* [initArbiterApiV1ArbitersPost](docs/sdks/modaicclient/README.md#initarbiterapiv1arbiterspost) - Init Arbiter
|
|
225
|
+
* [updateArbiterMetadataApiV1ArbitersMetadataPatch](docs/sdks/modaicclient/README.md#updatearbitermetadataapiv1arbitersmetadatapatch) - Update Arbiter Metadata
|
|
226
|
+
* [ingestExamplesApiV1ExamplesPost](docs/sdks/modaicclient/README.md#ingestexamplesapiv1examplespost) - Ingest Examples
|
|
227
|
+
* [listExamplesApiV1ExamplesGet](docs/sdks/modaicclient/README.md#listexamplesapiv1examplesget) - List Examples
|
|
228
|
+
* [deleteExamplesApiV1ExamplesDelete](docs/sdks/modaicclient/README.md#deleteexamplesapiv1examplesdelete) - Delete Examples
|
|
229
|
+
* [exportExamplesApiV1ExamplesExportPost](docs/sdks/modaicclient/README.md#exportexamplesapiv1examplesexportpost) - Export Examples
|
|
230
|
+
* [downloadExportApiV1ExamplesExportDownloadGet](docs/sdks/modaicclient/README.md#downloadexportapiv1examplesexportdownloadget) - Download Export
|
|
231
|
+
* [getDistinctHashesApiV1ExamplesDistinctHashesGet](docs/sdks/modaicclient/README.md#getdistincthashesapiv1examplesdistincthashesget) - Get Distinct Hashes
|
|
232
|
+
* [hasUncalibratedPredictionsApiV1ExamplesHasUncalibratedGet](docs/sdks/modaicclient/README.md#hasuncalibratedpredictionsapiv1exampleshasuncalibratedget) - Has Uncalibrated Predictions
|
|
233
|
+
* [getGradedCountApiV1ExamplesGradedCountGet](docs/sdks/modaicclient/README.md#getgradedcountapiv1examplesgradedcountget) - Get Graded Count
|
|
234
|
+
* [patchExampleApiV1ExamplesExampleIdAnnotationPatch](docs/sdks/modaicclient/README.md#patchexampleapiv1examplesexampleidannotationpatch) - Patch Example
|
|
235
|
+
* [getExampleByIdApiV1ExamplesExampleIdGet](docs/sdks/modaicclient/README.md#getexamplebyidapiv1examplesexampleidget) - Get Example By Id
|
|
236
|
+
* [createPredictionApiV2ArbitersPredictionsPost](docs/sdks/modaicclient/README.md#createpredictionapiv2arbiterspredictionspost) - Create Prediction
|
|
237
|
+
|
|
238
|
+
</details>
|
|
239
|
+
<!-- End Available Resources and Operations [operations] -->
|
|
240
|
+
|
|
241
|
+
<!-- Start Standalone functions [standalone-funcs] -->
|
|
242
|
+
## Standalone functions
|
|
243
|
+
|
|
244
|
+
All the methods listed above are available as standalone functions. These
|
|
245
|
+
functions are ideal for use in applications running in the browser, serverless
|
|
246
|
+
runtimes or other environments where application bundle size is a primary
|
|
247
|
+
concern. When using a bundler to build your application, all unused
|
|
248
|
+
functionality will be either excluded from the final bundle or tree-shaken away.
|
|
249
|
+
|
|
250
|
+
To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
251
|
+
|
|
252
|
+
<details>
|
|
253
|
+
|
|
254
|
+
<summary>Available standalone functions</summary>
|
|
255
|
+
|
|
256
|
+
- [`cancelBatchPredictionsJobApiV1JobsBatchPredictionsJobIdDelete`](docs/sdks/modaicclient/README.md#cancelbatchpredictionsjobapiv1jobsbatchpredictionsjobiddelete) - Cancel Batch Predictions Job
|
|
257
|
+
- [`cancelConfidenceScoreJobApiV1JobsConfidenceScoresJobIdDelete`](docs/sdks/modaicclient/README.md#cancelconfidencescorejobapiv1jobsconfidencescoresjobiddelete) - Cancel Confidence Score Job
|
|
258
|
+
- [`cancelOptimizationJobApiV1JobsGepaJobIdDelete`](docs/sdks/modaicclient/README.md#canceloptimizationjobapiv1jobsgepajobiddelete) - Cancel Optimization Job
|
|
259
|
+
- [`createChatCompletionApiV1ArbitersChatCompletionsPost`](docs/sdks/modaicclient/README.md#createchatcompletionapiv1arbiterschatcompletionspost) - Create Chat Completion
|
|
260
|
+
- [`createChatCompletionApiV1ChatCompletionsPost`](docs/sdks/modaicclient/README.md#createchatcompletionapiv1chatcompletionspost) - Create Chat Completion
|
|
261
|
+
- [`createPredictionApiV1ArbitersPredictionsPost`](docs/sdks/modaicclient/README.md#createpredictionapiv1arbiterspredictionspost) - Create Prediction
|
|
262
|
+
- [`createPredictionApiV2ArbitersPredictionsPost`](docs/sdks/modaicclient/README.md#createpredictionapiv2arbiterspredictionspost) - Create Prediction
|
|
263
|
+
- [`deleteExamplesApiV1ExamplesDelete`](docs/sdks/modaicclient/README.md#deleteexamplesapiv1examplesdelete) - Delete Examples
|
|
264
|
+
- [`dispatchPredictionApiV1ArbitersPredictionsDispatchPost`](docs/sdks/modaicclient/README.md#dispatchpredictionapiv1arbiterspredictionsdispatchpost) - Dispatch Prediction
|
|
265
|
+
- [`downloadExportApiV1ExamplesExportDownloadGet`](docs/sdks/modaicclient/README.md#downloadexportapiv1examplesexportdownloadget) - Download Export
|
|
266
|
+
- [`enqueuePredictionConfidenceApiV1ArbitersPredictionsPredictionIdConfidencePost`](docs/sdks/modaicclient/README.md#enqueuepredictionconfidenceapiv1arbiterspredictionspredictionidconfidencepost) - Enqueue Prediction Confidence
|
|
267
|
+
- [`exportExamplesApiV1ExamplesExportPost`](docs/sdks/modaicclient/README.md#exportexamplesapiv1examplesexportpost) - Export Examples
|
|
268
|
+
- [`getArbiterApiV1ArbitersGet`](docs/sdks/modaicclient/README.md#getarbiterapiv1arbitersget) - Get Arbiter
|
|
269
|
+
- [`getArbiterSchemaOutputApiV1ArbitersSchemaGet`](docs/sdks/modaicclient/README.md#getarbiterschemaoutputapiv1arbitersschemaget) - Get Arbiter Schema Output
|
|
270
|
+
- [`getBatchPredictionsJobStatusApiV1JobsBatchPredictionsJobIdGet`](docs/sdks/modaicclient/README.md#getbatchpredictionsjobstatusapiv1jobsbatchpredictionsjobidget) - Get Batch Predictions Job Status
|
|
271
|
+
- [`getConfidenceScoreJobStatusApiV1JobsConfidenceScoresJobIdGet`](docs/sdks/modaicclient/README.md#getconfidencescorejobstatusapiv1jobsconfidencescoresjobidget) - Get Confidence Score Job Status
|
|
272
|
+
- [`getDistinctHashesApiV1ExamplesDistinctHashesGet`](docs/sdks/modaicclient/README.md#getdistincthashesapiv1examplesdistincthashesget) - Get Distinct Hashes
|
|
273
|
+
- [`getExampleByIdApiV1ExamplesExampleIdGet`](docs/sdks/modaicclient/README.md#getexamplebyidapiv1examplesexampleidget) - Get Example By Id
|
|
274
|
+
- [`getGradedCountApiV1ExamplesGradedCountGet`](docs/sdks/modaicclient/README.md#getgradedcountapiv1examplesgradedcountget) - Get Graded Count
|
|
275
|
+
- [`getOptimizationJobLogsApiV1JobsGepaJobIdLogsGet`](docs/sdks/modaicclient/README.md#getoptimizationjoblogsapiv1jobsgepajobidlogsget) - Get Optimization Job Logs
|
|
276
|
+
- [`getOptimizationJobStatusApiV1JobsGepaJobIdGet`](docs/sdks/modaicclient/README.md#getoptimizationjobstatusapiv1jobsgepajobidget) - Get Optimization Job Status
|
|
277
|
+
- [`getPredictionConfidenceApiV1ArbitersPredictionsConfidencePost`](docs/sdks/modaicclient/README.md#getpredictionconfidenceapiv1arbiterspredictionsconfidencepost) - Get Prediction Confidence
|
|
278
|
+
- [`getPredictionConfidenceStatusApiV1ArbitersPredictionsPredictionIdConfidenceGet`](docs/sdks/modaicclient/README.md#getpredictionconfidencestatusapiv1arbiterspredictionspredictionidconfidenceget) - Get Prediction Confidence Status
|
|
279
|
+
- [`getSupportedModelsApiV1ArbitersSupportedModelsGet`](docs/sdks/modaicclient/README.md#getsupportedmodelsapiv1arbiterssupportedmodelsget) - Get Supported Models
|
|
280
|
+
- [`hasUncalibratedPredictionsApiV1ExamplesHasUncalibratedGet`](docs/sdks/modaicclient/README.md#hasuncalibratedpredictionsapiv1exampleshasuncalibratedget) - Has Uncalibrated Predictions
|
|
281
|
+
- [`ingestExamplesApiV1ExamplesPost`](docs/sdks/modaicclient/README.md#ingestexamplesapiv1examplespost) - Ingest Examples
|
|
282
|
+
- [`initArbiterApiV1ArbitersPost`](docs/sdks/modaicclient/README.md#initarbiterapiv1arbiterspost) - Init Arbiter
|
|
283
|
+
- [`listExamplesApiV1ExamplesGet`](docs/sdks/modaicclient/README.md#listexamplesapiv1examplesget) - List Examples
|
|
284
|
+
- [`patchExampleApiV1ExamplesExampleIdAnnotationPatch`](docs/sdks/modaicclient/README.md#patchexampleapiv1examplesexampleidannotationpatch) - Patch Example
|
|
285
|
+
- [`startBatchPredictionsJobApiV1JobsBatchPredictionsPost`](docs/sdks/modaicclient/README.md#startbatchpredictionsjobapiv1jobsbatchpredictionspost) - Start Batch Predictions Job
|
|
286
|
+
- [`startConfidenceScoreJobApiV1JobsConfidenceScoresPost`](docs/sdks/modaicclient/README.md#startconfidencescorejobapiv1jobsconfidencescorespost) - Start Confidence Score Job
|
|
287
|
+
- [`startOptimizationJobApiV1JobsGepaPost`](docs/sdks/modaicclient/README.md#startoptimizationjobapiv1jobsgepapost) - Start Optimization Job
|
|
288
|
+
- [`streamBatchPredictionsEventsApiV1JobsBatchPredictionsJobIdEventsGet`](docs/sdks/modaicclient/README.md#streambatchpredictionseventsapiv1jobsbatchpredictionsjobideventsget) - Stream Batch Predictions Events
|
|
289
|
+
- [`streamBatchPredictionsResultsApiV1JobsBatchPredictionsJobIdResultsGet`](docs/sdks/modaicclient/README.md#streambatchpredictionsresultsapiv1jobsbatchpredictionsjobidresultsget) - Stream Batch Predictions Results
|
|
290
|
+
- [`streamPredictionConfidenceApiV1ArbitersPredictionsPredictionIdConfidenceStreamGet`](docs/sdks/modaicclient/README.md#streampredictionconfidenceapiv1arbiterspredictionspredictionidconfidencestreamget) - Stream Prediction Confidence
|
|
291
|
+
- [`updateArbiterMetadataApiV1ArbitersMetadataPatch`](docs/sdks/modaicclient/README.md#updatearbitermetadataapiv1arbitersmetadatapatch) - Update Arbiter Metadata
|
|
292
|
+
|
|
293
|
+
</details>
|
|
294
|
+
<!-- End Standalone functions [standalone-funcs] -->
|
|
295
|
+
|
|
296
|
+
<!-- Start Retries [retries] -->
|
|
297
|
+
## Retries
|
|
298
|
+
|
|
299
|
+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
|
300
|
+
|
|
301
|
+
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
|
|
302
|
+
```typescript
|
|
303
|
+
import { ModaicClient } from "modaic";
|
|
304
|
+
|
|
305
|
+
const modaicClient = new ModaicClient({
|
|
306
|
+
token: process.env["MODAIC_TOKEN"] ?? "",
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
async function run() {
|
|
310
|
+
const result = await modaicClient
|
|
311
|
+
.createChatCompletionApiV1ChatCompletionsPost({
|
|
312
|
+
retries: {
|
|
313
|
+
strategy: "backoff",
|
|
314
|
+
backoff: {
|
|
315
|
+
initialInterval: 1,
|
|
316
|
+
maxInterval: 50,
|
|
317
|
+
exponent: 1.1,
|
|
318
|
+
maxElapsedTime: 100,
|
|
319
|
+
},
|
|
320
|
+
retryConnectionErrors: false,
|
|
321
|
+
},
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
console.log(result);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
run();
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
|
|
332
|
+
```typescript
|
|
333
|
+
import { ModaicClient } from "modaic";
|
|
334
|
+
|
|
335
|
+
const modaicClient = new ModaicClient({
|
|
336
|
+
retryConfig: {
|
|
337
|
+
strategy: "backoff",
|
|
338
|
+
backoff: {
|
|
339
|
+
initialInterval: 1,
|
|
340
|
+
maxInterval: 50,
|
|
341
|
+
exponent: 1.1,
|
|
342
|
+
maxElapsedTime: 100,
|
|
343
|
+
},
|
|
344
|
+
retryConnectionErrors: false,
|
|
345
|
+
},
|
|
346
|
+
token: process.env["MODAIC_TOKEN"] ?? "",
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
async function run() {
|
|
350
|
+
const result = await modaicClient
|
|
351
|
+
.createChatCompletionApiV1ChatCompletionsPost();
|
|
352
|
+
|
|
353
|
+
console.log(result);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
run();
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
<!-- End Retries [retries] -->
|
|
360
|
+
|
|
361
|
+
<!-- Start Error Handling [errors] -->
|
|
362
|
+
## Error Handling
|
|
363
|
+
|
|
364
|
+
[`ModaicClientError`](./src/models/errors/modaic-client-error.ts) is the base class for all HTTP error responses. It has the following properties:
|
|
365
|
+
|
|
366
|
+
| Property | Type | Description |
|
|
367
|
+
| ------------------- | ---------- | --------------------------------------------------------------------------------------- |
|
|
368
|
+
| `error.message` | `string` | Error message |
|
|
369
|
+
| `error.statusCode` | `number` | HTTP response status code eg `404` |
|
|
370
|
+
| `error.headers` | `Headers` | HTTP response headers |
|
|
371
|
+
| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. |
|
|
372
|
+
| `error.rawResponse` | `Response` | Raw HTTP response |
|
|
373
|
+
| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
|
|
374
|
+
|
|
375
|
+
### Example
|
|
376
|
+
```typescript
|
|
377
|
+
import { ModaicClient } from "modaic";
|
|
378
|
+
import * as errors from "modaic/models/errors";
|
|
379
|
+
|
|
380
|
+
const modaicClient = new ModaicClient({
|
|
381
|
+
token: process.env["MODAIC_TOKEN"] ?? "",
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
async function run() {
|
|
385
|
+
try {
|
|
386
|
+
const result = await modaicClient
|
|
387
|
+
.createChatCompletionApiV1ChatCompletionsPost();
|
|
388
|
+
|
|
389
|
+
console.log(result);
|
|
390
|
+
} catch (error) {
|
|
391
|
+
// The base class for HTTP error responses
|
|
392
|
+
if (error instanceof errors.ModaicClientError) {
|
|
393
|
+
console.log(error.message);
|
|
394
|
+
console.log(error.statusCode);
|
|
395
|
+
console.log(error.body);
|
|
396
|
+
console.log(error.headers);
|
|
397
|
+
|
|
398
|
+
// Depending on the method different errors may be thrown
|
|
399
|
+
if (error instanceof errors.HTTPValidationError) {
|
|
400
|
+
console.log(error.data$.detail); // ValidationError[]
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
run();
|
|
407
|
+
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Error Classes
|
|
411
|
+
**Primary errors:**
|
|
412
|
+
* [`ModaicClientError`](./src/models/errors/modaic-client-error.ts): The base class for HTTP error responses.
|
|
413
|
+
* [`HTTPValidationError`](./src/models/errors/http-validation-error.ts): Validation Error. Status code `422`. *
|
|
414
|
+
|
|
415
|
+
<details><summary>Less common errors (6)</summary>
|
|
416
|
+
|
|
417
|
+
<br />
|
|
418
|
+
|
|
419
|
+
**Network errors:**
|
|
420
|
+
* [`ConnectionError`](./src/models/errors/http-client-errors.ts): HTTP client was unable to make a request to a server.
|
|
421
|
+
* [`RequestTimeoutError`](./src/models/errors/http-client-errors.ts): HTTP request timed out due to an AbortSignal signal.
|
|
422
|
+
* [`RequestAbortedError`](./src/models/errors/http-client-errors.ts): HTTP request was aborted by the client.
|
|
423
|
+
* [`InvalidRequestError`](./src/models/errors/http-client-errors.ts): Any input used to create a request is invalid.
|
|
424
|
+
* [`UnexpectedClientError`](./src/models/errors/http-client-errors.ts): Unrecognised or unexpected error.
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
**Inherit from [`ModaicClientError`](./src/models/errors/modaic-client-error.ts)**:
|
|
428
|
+
* [`ResponseValidationError`](./src/models/errors/response-validation-error.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
|
|
429
|
+
|
|
430
|
+
</details>
|
|
431
|
+
|
|
432
|
+
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
|
|
433
|
+
<!-- End Error Handling [errors] -->
|
|
434
|
+
|
|
435
|
+
<!-- Start Server Selection [server] -->
|
|
436
|
+
## Server Selection
|
|
437
|
+
|
|
438
|
+
### Override Server URL Per-Client
|
|
439
|
+
|
|
440
|
+
The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
|
|
441
|
+
```typescript
|
|
442
|
+
import { ModaicClient } from "modaic";
|
|
443
|
+
|
|
444
|
+
const modaicClient = new ModaicClient({
|
|
445
|
+
serverURL: "https://api.modaic.dev",
|
|
446
|
+
token: process.env["MODAIC_TOKEN"] ?? "",
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
async function run() {
|
|
450
|
+
const result = await modaicClient
|
|
451
|
+
.createChatCompletionApiV1ChatCompletionsPost();
|
|
452
|
+
|
|
453
|
+
console.log(result);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
run();
|
|
457
|
+
|
|
458
|
+
```
|
|
459
|
+
<!-- End Server Selection [server] -->
|
|
460
|
+
|
|
461
|
+
<!-- Start Custom HTTP Client [http-client] -->
|
|
462
|
+
## Custom HTTP Client
|
|
463
|
+
|
|
464
|
+
The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
|
|
465
|
+
[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
|
|
466
|
+
client is a thin wrapper around `fetch` and provides the ability to attach hooks
|
|
467
|
+
around the request lifecycle that can be used to modify the request or handle
|
|
468
|
+
errors and response.
|
|
469
|
+
|
|
470
|
+
The `HTTPClient` constructor takes an optional `fetcher` argument that can be
|
|
471
|
+
used to integrate a third-party HTTP client or when writing tests to mock out
|
|
472
|
+
the HTTP client and feed in fixtures.
|
|
473
|
+
|
|
474
|
+
The following example shows how to:
|
|
475
|
+
- route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent
|
|
476
|
+
- use the `"beforeRequest"` hook to add a custom header and a timeout to requests
|
|
477
|
+
- use the `"requestError"` hook to log errors
|
|
478
|
+
|
|
479
|
+
```typescript
|
|
480
|
+
import { ModaicClient } from "modaic";
|
|
481
|
+
import { ProxyAgent } from "undici";
|
|
482
|
+
import { HTTPClient } from "modaic/lib/http";
|
|
483
|
+
|
|
484
|
+
const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
|
|
485
|
+
|
|
486
|
+
const httpClient = new HTTPClient({
|
|
487
|
+
// 'fetcher' takes a function that has the same signature as native 'fetch'.
|
|
488
|
+
fetcher: (input, init) =>
|
|
489
|
+
// 'dispatcher' is specific to undici and not part of the standard Fetch API.
|
|
490
|
+
fetch(input, { ...init, dispatcher } as RequestInit),
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
httpClient.addHook("beforeRequest", (request) => {
|
|
494
|
+
const nextRequest = new Request(request, {
|
|
495
|
+
signal: request.signal || AbortSignal.timeout(5000)
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
nextRequest.headers.set("x-custom-header", "custom value");
|
|
499
|
+
|
|
500
|
+
return nextRequest;
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
httpClient.addHook("requestError", (error, request) => {
|
|
504
|
+
console.group("Request Error");
|
|
505
|
+
console.log("Reason:", `${error}`);
|
|
506
|
+
console.log("Endpoint:", `${request.method} ${request.url}`);
|
|
507
|
+
console.groupEnd();
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
const sdk = new ModaicClient({ httpClient: httpClient });
|
|
511
|
+
```
|
|
512
|
+
<!-- End Custom HTTP Client [http-client] -->
|
|
513
|
+
|
|
514
|
+
<!-- Start Debugging [debug] -->
|
|
515
|
+
## Debugging
|
|
516
|
+
|
|
517
|
+
You can setup your SDK to emit debug logs for SDK requests and responses.
|
|
518
|
+
|
|
519
|
+
You can pass a logger that matches `console`'s interface as an SDK option.
|
|
520
|
+
|
|
521
|
+
> [!WARNING]
|
|
522
|
+
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
|
|
523
|
+
|
|
524
|
+
```typescript
|
|
525
|
+
import { ModaicClient } from "modaic";
|
|
526
|
+
|
|
527
|
+
const sdk = new ModaicClient({ debugLogger: console });
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
You can also enable a default debug logger by setting an environment variable `MODAIC_DEBUG` to true.
|
|
531
|
+
<!-- End Debugging [debug] -->
|
|
532
|
+
|
|
533
|
+
<!-- Placeholder for Future Speakeasy SDK Sections -->
|